MonoDevelop and Qyoto segfaults

Hi,

I’m trying to figure out how to write Qt applications in C# in MonoDevelop. I have Qt-devel, MonoDevelop, Qyoto stuff installed. Plus I included all qt references I could find just to be sure. When I try a simple code


using Qyoto;

namespace QyotoTutorial
{
    public class HelloWorld
    {
        public static int Main(string] args){
            QApplication app = new QApplication(args);
            QPushButton button1 = new QPushButton("Hello World!");
            button1.Resize(100,30);
            button1.Show();
            return QApplication.Exec();
        }
    }
} 

It gives me a lot of these errors:


Stacktrace:

  at (wrapper managed-to-native) Qyoto.Qyoto.Init_qyoto () <0x00052>
  at (wrapper managed-to-native) Qyoto.Qyoto.Init_qyoto () <0xffffffff>
  at Qyoto.SmokeInvocation.InitRuntime () <0x0002b>
  at Qyoto.SmokeInvocation..cctor () <0x000df>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>
  at Qyoto.QApplication..cctor () <0xffffffff>
  at Qyoto.QApplication..cctor () <0x00014>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>
  at QyotoTutorial.HelloWorld.Main (string]) [0x00028] in /home/linuxoid/Develop/Qyoto/Qyoto/qyoto.cs:13
  at QyotoTutorial.HelloWorld.Main (string]) [0x00000] in /home/linuxoid/Develop/Qyoto/Qyoto/qyoto.cs:8
  at (wrapper runtime-invoke) QyotoTutorial.HelloWorld.runtime_invoke_int_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

	/usr/bin/mono [0x47a5ff]
	/usr/bin/mono [0x4ada3f]
	/lib64/libpthread.so.0 [0x7f8ada9dfc00]
	/usr/lib64/libQtCore.so.4(_ZN10QByteArrayC1EPKc+0x16) [0x7f8ad7683196]
	/usr/lib64/libqyoto.so(Init_qyoto+0xc0) [0x7f8ad9356e80]
	[0x41a8bbc2]

Debug info from gdb:

Missing separate debuginfo for /usr/bin/mono
Try: zypper install -C "debuginfo(build-id)=58ebdfb40b6f552e97e3b1dd7e2569b150cbfa72"
Missing separate debuginfo for /usr/lib64/libgthread-2.0.so.0
Try: zypper install -C "debuginfo(build-id)=bf745d8917d27e255bf174e08e0e6775de77075b"
Missing separate debuginfo for /usr/lib64/libglib-2.0.so.0
Try: zypper install -C "debuginfo(build-id)=7e3842ab0a347df5f56a0697077f4eca83bfe5fe"
Missing separate debuginfo for /lib64/librt.so.1
Try: zypper install -C "debuginfo(build-id)=c663e79551b37d4c0c9bc93b252b917bfdedb150"
Missing separate debuginfo for /lib64/libdl.so.2
Try: zypper install -C "debuginfo(build-id)=44e66ebae672563bd496f290e08d316bc3bf0ac7"
Missing separate debuginfo for /lib64/libpthread.so.0
Try: zypper install -C "debuginfo(build-id)=7bcbabc9da24424f1f5ef7be77b575fd3d796288"
Missing separate debuginfo for /lib64/libm.so.6
Try: zypper install -C "debuginfo(build-id)=57fc1891d8d9f419fb8c7fc06a8285563b53a47e"
Missing separate debuginfo for /lib64/libc.so.6
Try: zypper install -C "debuginfo(build-id)=c5a3dfd66bf61fcdec9bc22153b2fbd0d6697960"
Missing separate debuginfo for /lib64/libpcre.so.0
Try: zypper install -C "debuginfo(build-id)=faf1aba9b565a29c99ce1d3944978347d6209cc3"
Missing separate debuginfo for /lib64/ld-linux-x86-64.so.2
Try: zypper install -C "debuginfo(build-id)=591af1afa33f255704fb6a60859b93d00e205302"
Missing separate debuginfo for /usr/lib64/libqyoto.so
Try: zypper install -C "debuginfo(build-id)=351f31bad9e8bcbf80f0b171663edf7bb8f88428"
Missing separate debuginfo for /usr/lib64/libqyotoshared.so.1
Try: zypper install -C "debuginfo(build-id)=6cf3df212b629ec447f31dce5d7e94f7ac909a92"
Missing separate debuginfo for /usr/lib64/libsmokeqtcore.so.3
Try: zypper install -C "debuginfo(build-id)=523abd8535f5e22e0024389ba96ea5673c291f45"
Missing separate debuginfo for /usr/lib64/libsmokeqtgui.so.3
Try: zypper install -C "debuginfo(build-id)=a9b77892dd6e7e6b6f325bf963b7b70b83c7469b"
Missing separate debuginfo for /usr/lib64/libsmokeqtxml.so.3
Try: zypper install -C "debuginfo(build-id)=c8e70557a27040b2dfd955db4441b2cecb10ca42"
Missing separate debuginfo for /usr/lib64/libsmokeqtopengl.so.3
Try: zypper install -C "debuginfo(build-id)=36aa8b65a1973394158355198d779196a13bec5d"
Missing separate debuginfo for /usr/lib64/libsmokeqtsql.so.3
Try: zypper install -C "debuginfo(build-id)=fbd3c21f9c661c28bf3faa8ce93bc562a8eddf58"
Missing separate debuginfo for /usr/lib64/libsmokeqtnetwork.so.3
Try: zypper install -C "debuginfo(build-id)=76ba3bd900c939e88765f5667749aa738fab97e9"
Missing separate debuginfo for /usr/lib64/libsmokeqtdbus.so.3
Try: zypper install -C "debuginfo(build-id)=aa430b4a1f3a6c2ee52522ca73d89c911a8fb1d1"
Missing separate debuginfo for /usr/lib64/libsmokeqtsvg.so.3
Try: zypper install -C "debuginfo(build-id)=e447c4f8414c5fb4eb327bea7371705304f208d6"
Missing separate debuginfo for /usr/lib64/libstdc++.so.6
Try: zypper install -C "debuginfo(build-id)=62220ad5c8941afb5d332c0c47d32f8beec8ac50"
Missing separate debuginfo for /usr/lib64/libQtGui.so.4
Try: zypper install -C "debuginfo(build-id)=36f2da39a96411c27e4442b820c8136ce7bf93ab"
Missing separate debuginfo for /usr/lib64/libQtOpenGL.so.4
Try: zypper install -C "debuginfo(build-id)=50d34983742e1fec3092d9891fbb61e3906fd491"
Missing separate debuginfo for /usr/lib64/libQtSql.so.4
Try: zypper install -C "debuginfo(build-id)=59cc351d7e5d2dd05ab0d54120cee1724e7d198f"
Missing separate debuginfo for /usr/lib64/libQtSvg.so.4
Try: zypper install -C "debuginfo(build-id)=675dba5528253887a20e622ac6a2371bc795ddef"
Missing separate debuginfo for /lib64/libz.so.1
Try: zypper install -C "debuginfo(build-id)=763926681ebc75fcd9de7b99f7229ff15c7d1754"
Missing separate debuginfo for /lib64/libgcc_s.so.1
Try: zypper install -C "debuginfo(build-id)=0206e11fa8ca0db0633073adcbf1349a7871e1dc"
Missing separate debuginfo for /lib64/libdbus-1.so.3
Try: zypper install -C "debuginfo(build-id)=4ad4dd106eb3658fc1a4e032843edfade99815e7"
Missing separate debuginfo for /usr/lib64/libpng12.so.0
Try: zypper install -C "debuginfo(build-id)=67ebdd04bd0be9a64a35354cb80d8ba2b0221f8f"
Missing separate debuginfo for /usr/lib64/libgobject-2.0.so.0
Try: zypper install -C "debuginfo(build-id)=f19847d70b70328d99de6303ce77402c1c0ad267"
Missing separate debuginfo for /usr/lib64/libSM.so.6
Try: zypper install -C "debuginfo(build-id)=51a2a639c0e174691e5fa6f5d648d835750bc44d"
Missing separate debuginfo for /usr/lib64/libICE.so.6
Try: zypper install -C "debuginfo(build-id)=43a0fa4cde51095b57558eb7ed0c90dd90e99fae"
Missing separate debuginfo for /usr/lib64/libXi.so.6
Try: zypper install -C "debuginfo(build-id)=d278c56b4359f6a219af5e13576873a38581c25c"
Missing separate debuginfo for /usr/lib64/libXrender.so.1
Try: zypper install -C "debuginfo(build-id)=55f90cfa8482fae594e59cce00c20937e7257446"
Missing separate debuginfo for /usr/lib64/libXrandr.so.2
Try: zypper install -C "debuginfo(build-id)=6a1fccee186ebf368f2d6a7d5ccd582943fd1953"
Missing separate debuginfo for /usr/lib64/libXfixes.so.3
Try: zypper install -C "debuginfo(build-id)=6495446f04c2f9a4fa3021f7322d6f12c4017305"
Missing separate debuginfo for /usr/lib64/libXcursor.so.1
Try: zypper install -C "debuginfo(build-id)=56d901d8946aefda2e4b5e12dba24c13ac3f61a9"
Missing separate debuginfo for /usr/lib64/libXinerama.so.1
Try: zypper install -C "debuginfo(build-id)=c7af2457b235b84f26ce24f1c4d260ec7eeb9f88"
Missing separate debuginfo for /usr/lib64/libfontconfig.so.1
Try: zypper install -C "debuginfo(build-id)=91c40a3235e928f04acc6b7d9c308f9db5502b20"
Missing separate debuginfo for /usr/lib64/libXext.so.6
Try: zypper install -C "debuginfo(build-id)=a14cd41f23af7f31d0ac2bd8eada730888690b27"
Missing separate debuginfo for /usr/lib64/libX11.so.6
Try: zypper install -C "debuginfo(build-id)=5fa84adc30db95abcbaea20ed7ec1c8dd94dfff2"
Missing separate debuginfo for /lib64/libuuid.so.1
Try: zypper install -C "debuginfo(build-id)=926afd158a155c4b03dd155013053efcaa53dba0"
Missing separate debuginfo for /lib64/libexpat.so.1
Try: zypper install -C "debuginfo(build-id)=73c6b7e33c0787039a38d01b8a08db4f6cac375d"
Missing separate debuginfo for /usr/lib64/libxcb.so.1
Try: zypper install -C "debuginfo(build-id)=54a77c10d44b40080d6d8e65d277ccb7ab2a5b4a"
Missing separate debuginfo for /usr/lib64/libXau.so.6
Try: zypper install -C "debuginfo(build-id)=72341bb9d8a1ad2ca2bbced007f3a785121aac28"
[Thread debugging using libthread_db enabled]
[New Thread 0x7f8ad9a79910 (LWP 18697)]
[New Thread 0x7f8adb6c9910 (LWP 18694)]
0x00007f8ada9deabb in read () from /lib64/libpthread.so.0
  3 Thread 0x7f8adb6c9910 (LWP 18694)  0x00007f8ada9df341 in nanosleep ()
   from /lib64/libpthread.so.0
  2 Thread 0x7f8ad9a79910 (LWP 18697)  0x00007f8ada9dde11 in sem_wait ()
   from /lib64/libpthread.so.0
* 1 Thread 0x7f8adb6bc730 (LWP 18693)  0x00007f8ada9deabb in read ()
   from /lib64/libpthread.so.0

Thread 3 (Thread 0x7f8adb6c9910 (LWP 18694)):
#0  0x00007f8ada9df341 in nanosleep () from /lib64/libpthread.so.0
#1  0x0000000000557972 in ?? ()
#2  0x00007f8ada9d765d in start_thread () from /lib64/libpthread.so.0
#3  0x00007f8ada4f214d in clone () from /lib64/libc.so.6
#4  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f8ad9a79910 (LWP 18697)):
#0  0x00007f8ada9dde11 in sem_wait () from /lib64/libpthread.so.0
#1  0x000000000051d10a in ?? ()
#2  0x00000000004d50ba in ?? ()
#3  0x0000000000555cc3 in ?? ()
#4  0x0000000000574081 in ?? ()
#5  0x00007f8ada9d765d in start_thread () from /lib64/libpthread.so.0
#6  0x00007f8ada4f214d in clone () from /lib64/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f8adb6bc730 (LWP 18693)):
#0  0x00007f8ada9deabb in read () from /lib64/libpthread.so.0
#1  0x000000000047a774 in ?? ()
#2  0x00000000004ada3f in ?? ()
#3  <signal handler called>
#4  QByteArray::QByteArray (this=0x7fffedfe5bc0, str=
    0x313a700010003 <Address 0x313a700010003 out of bounds>)
    at tools/qbytearray.cpp:1257
#5  0x00007f8ad9356e80 in Init_qyoto () from /usr/lib64/libqyoto.so
#6  0x0000000041a8bbc2 in ?? ()
#7  0x00007fffedfe5f90 in ?? ()
#8  0x0000000000938360 in ?? ()
#9  0x0000000000936e30 in ?? ()
#10 0x0000000000000001 in ?? ()
#11 0x000000000090d718 in ?? ()
#12 0x00007fffedfe5da0 in ?? ()
#13 0x00007fffedfe5c90 in ?? ()
#14 0x0000000000938360 in ?? ()
#15 0x0000000000936e30 in ?? ()
#16 0x0000000000000001 in ?? ()
#17 0x0000000000947048 in ?? ()
#18 0x0000000041a8ba1c in ?? ()
#19 0x0000000000947048 in ?? ()
#20 0x0000000041a8b9f0 in ?? ()
#21 0x00007fffedfe5da0 in ?? ()
#22 0x0000000041a8a670 in ?? ()
#23 0x00007f8adb4edd80 in ?? ()
#24 0x00007f8adb4f9fe0 in ?? ()
#25 0x00007f8adb4edde0 in ?? ()
#26 0x0000000041a8a47a in ?? ()
#27 0x0000000000000000 in ?? ()

=================================================================
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 application was terminated by a signal: SIGABRT

Does anyone know what’s going on? Anyone tried this stuff? What am I missing?

Thank you.

Good progress - uninstalled Qt & Mono and reinstalled them and now it all works.

Does anyone know how to

  1. either convert .ui GUI files made in Qt Creator to C# for re-use in MonoDevelop
  2. or design GUI in MonoDevelop but use Qt (Qyoto) calls to GUI widgets

I’m guessing from the username that you’ve been asking on the KDE Bindings email list as well. For everyone else’s reference, here is the thread, which contains discussion and a link to my recent Using Qyoto tutorial that I wrote after first learning to use Qyoto in MonoDevelop.

The best way I found with .ui files is to set up a custom command on build that uses “uics” to compile the .cs files from them (my sample is in the tutorial).