[Kde-bindings] Qyoto - adding QTextEdit as centralWidget does not end app on closing main window

Cvetoslav Ludmiloff ludmiloff at gmail.com
Wed Feb 1 16:51:04 UTC 2012


Hi all
here the output when using assemblygen and all other sources mentioned by
Dimitar Dobrev

Stacktrace:

  at (wrapper managed-to-native) Qyoto.SmokeInvocation.CallSmokeMethod
(intptr,int,intptr,intptr,int) <IL 0x00028, 0xffffffff>
  at Qyoto.SmokeInvocation.Invoke (string,string,System.Type,bool,object[])
<IL 0x00134, 0x0026f>
  at Qyoto.QApplication.Exec () <IL 0x00020, 0x00047>
  at MainWindow.Main (string[]) [0x00013] in
/home/Data/Projects/testmono2/testmono2/MainWindow.cs:31
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object
(object,intptr,intptr,intptr) <IL 0x0005c, 0xffffffff>

Native stacktrace:

/usr/bin/mono() [0x80e1d4c]
/usr/bin/mono() [0x812104c]
/usr/bin/mono() [0x806107d]
[0xb778240c]
/usr/lib/libQtCore.so.4(_ZNK11QMetaObject4castEP7QObject+0x32) [0xb5d12a12]
/usr/lib/kde4/plugins/styles/qtcurve.so(+0xeb2a) [0xb3030b2a]
/usr/lib/kde4/plugins/styles/qtcurve.so(+0x22c45) [0xb3044c45]
/usr/lib/libQtGui.so.4(_ZN7QWidget5eventEP6QEvent+0xc57) [0xb4ad0157]
/usr/lib/libQtGui.so.4(_ZN11QRubberBand5eventEP6QEvent+0x23) [0xb4f41863]
/usr/lib/libQtGui.so.4(_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0xc4)
[0xb4a75914]
/usr/lib/libQtGui.so.4(_ZN12QApplication6notifyEP7QObjectP6QEvent+0x22a)
[0xb4a7adea]
/usr/lib/libsmokeqtgui.so.3(_ZN12__smokeqtgui14x_QApplication6notifyEP7QObjectP6QEvent+0x88)
[0xb560f598]
/usr/lib/libQtCore.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x8e)
[0xb5d0bb7e]
/usr/lib/libQtGui.so.4(_ZNK7QWidget14ensurePolishedEv+0x66) [0xb4ac6be6]
/usr/lib/libQtGui.so.4(_ZN7QWidget5eventEP6QEvent+0xc37) [0xb4ad0137]
/usr/lib/libQtGui.so.4(_ZN11QRubberBand5eventEP6QEvent+0x23) [0xb4f41863]
/usr/lib/libQtGui.so.4(_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0xc4)
[0xb4a75914]
/usr/lib/libQtGui.so.4(_ZN12QApplication6notifyEP7QObjectP6QEvent+0x22a)
[0xb4a7adea]
/usr/lib/libsmokeqtgui.so.3(_ZN12__smokeqtgui14x_QApplication6notifyEP7QObjectP6QEvent+0x88)
[0xb560f598]
/usr/lib/libQtCore.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x8e)
[0xb5d0bb7e]
/usr/lib/libQtCore.so.4(_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData+0x3d8)
[0xb5d0f7f8]
/usr/lib/libQtCore.so.4(_ZN16QCoreApplication16sendPostedEventsEP7QObjecti+0x2c)
[0xb5d0fb2c]
/usr/lib/libQtCore.so.4(+0x1ad284) [0xb5d3e284]
/usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x1df) [0xb59be01f]
/usr/lib/libglib-2.0.so.0(+0x43750) [0xb59be750]
/usr/lib/libglib-2.0.so.0(g_main_context_iteration+0x6a) [0xb59be9ea]
/usr/lib/libQtCore.so.4(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x67)
[0xb5d3e677]
/usr/lib/libQtGui.so.4(+0x1ed22a) [0xb4b2922a]
/usr/lib/libQtCore.so.4(_ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE+0x4d)
[0xb5d0a70d]
/usr/lib/libQtCore.so.4(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0xf9)
[0xb5d0a9a9]
/usr/lib/libQtCore.so.4(_ZN16QCoreApplication4execEv+0x9a) [0xb5d0fbda]
/usr/lib/libQtGui.so.4(_ZN12QApplication4execEv+0x24) [0xb4a73774]
/usr/lib/libsmokeqtgui.so.3(_ZN12__smokeqtgui18xcall_QApplicationEsPvPN5Smoke9StackItemE+0x70c)
[0xb55fcb8c]
/usr/lib/libqyoto-qtcore-native.so.2(_ZN5Qyoto10MethodCall10callMethodEv+0x1ed)
[0xb5fbd28d]
/usr/lib/libqyoto-qtcore-native.so.2(_ZN5Qyoto10MethodCall4nextEv+0x67)
[0xb5fbd5b7]
/usr/lib/libqyoto-qtcore-native.so.2(CallSmokeMethod+0x9b) [0xb5fc729b]
[0xb5ff9028]
[0xb5fefab0]
[0xb5ffe8b8]
[0xb6667d48]
[0xb6667e16]
/usr/bin/mono() [0x806535c]

Debug info from gdb:


=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================


The source code:

using System;
using Qyoto;

public class MainWindow : QMainWindow
{
public QTextEdit editor;
public MainWindow() : base()
{
SetupEditor();
SetCentralWidget(editor);
Resize(400, 200);
}
 private void SetupEditor()
{
editor = new QTextEdit();
}
 protected override void OnCloseEvent(QCloseEvent ev)
{
Console.WriteLine("On close event");
ev.Accept();
}
 public static int Main(String[] args)
{
new QApplication(args);
MainWindow w = new MainWindow();
//w.SetCentralWidget(new QTextEdit());
w.Show();
QApplication.Exec();
//Console.WriteLine("exiting");
return 0;
}

}

when run, program does only output error messages and return to command
line.

Also, if i change the source a bit like this:
.....

public static int Main(String[] args)
{
new QApplication(args);
QMainWindow w = new QMainWindow();
w.SetCentralWidget(new QTextEdit());
w.Show();
QApplication.Exec();
Console.WriteLine("exiting");
return 0;
}

everything is ok.

When using smokegen, smokeqt and qyoto compiled from source from here
ftp://ftp.kde.org/pub/kde/stable/4.8.0/src/
all working ok.

Cvetoslav Ludmiloff
http://archstable.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20120201/3fc7c918/attachment.html>


More information about the Kde-bindings mailing list