Thanks! that would be awesome. So there is only one problem that I've
found so far. I get this with mono:
mono: xcb_lock.c:33: _XCBUnlockDisplay: Assertion `xcb_get_request_sent
(dpy->xcb->connection) == dpy->request' failed.
To fix the problem I'm catching the exception in IKVM (and ignoring
it). In the file JniInterface line 2087 I'm adding a try catch block
to the GetFieldAccessor(). That prevents the whole app to crash and
keeps it running and it seems that it doesn't affect to the
functionality BUT consumes a lot of CPU. This is line 2087:
internal static void SetLongField(JNIEnv* pEnv, jobject obj, jfieldID
fieldID, jlong val)
{
GetFieldAccessor(fieldID).setLong(pEnv->UnwrapRef(obj), (long)val);
}
This is the complete error I get on linux:
QtJambi: Exception pending in native code
java.lang.NullPointerException
at IKVM.Runtime.JNIEnv.InvokeHelper(Unknown Source)
at IKVM.Runtime.JNIEnv.InvokeHelper(Unknown Source)
at IKVM.Runtime.JNIEnv.CallVoidMethodA(Unknown Source)
Unhandled Exception: System.NullReferenceException: Object reference
not set to an instance of an object
at (wrapper dynamic-method) com.trolltech.qt.QtJambiObject.__<Setter>
(object,long) <0x00028>
at (wrapper delegate-invoke)
IKVM.NativeCode.sun.reflect.ReflectionFactory/FieldAccessorImplBase/
FastLongFieldAccessor/Setter.invoke_void__this___object_long
(object,long) <0x0005c>
at IKVM.NativeCode.sun.reflect.ReflectionFactory/FieldAccessorImplBase/
FastLongFieldAccessor.setLong (object,long) <0x00018>
at IKVM.Runtime.JNIEnv.SetLongField
(IKVM.Runtime.JNIEnv*,intptr,intptr,long) <0x0003e>
at (wrapper native-to-managed) IKVM.Runtime.JNIEnv.SetLongField
(IKVM.Runtime.JNIEnv*,intptr,intptr,long) <0x0004f>
mono: xcb_lock.c:33: _XCBUnlockDisplay: Assertion `xcb_get_request_sent
(dpy->xcb->connection) == dpy->request' failed.
Stacktrace:
Native stacktrace:
/usr/bin/mono [0x80cbd24]
[0xffffe410]
/lib/libc.so.6(abort+0x188) [0xb7dfe238]
/lib/libc.so.6(__assert_fail+0xee) [0xb7df570e]
/usr/lib/libX11.so.6 [0xb368680e]
/usr/lib/libXrender.so.1(XRenderSetPictureClipRectangles+0x7c)
[0xb382da1c]
/usr/lib/libQtGui.so.4 [0xb3b783e4]
/usr/lib/libQtGui.so.4 [0xb3b79004]
/usr/lib/libQtGui.so.4 [0xb3ac943b]
/usr/lib/libQtGui.so.4 [0xb3ac950b]
/usr/lib/libQtGui.so.4(_ZN8QPainter9drawLinesEPK5QLinei+0x46)
[0xb3acf486]
/usr/lib/libQtGui.so.4 [0xb3c70a14]
/usr/lib/libQtGui.so.4 [0xb3d5b0ce]
/usr/lib/libQtGui.so.4 [0xb3d5bc70]
/usr/lib/libQtGui.so.4 [0xb3d5be41]
/usr/lib/libQtGui.so.4(_ZN10QLCDNumber10paintEventEP11QPaintEvent
+0x78) [0xb3d5c048]
/usr/lib/libcom_trolltech_qt_gui.so
(_ZN23QtJambiShell_QLCDNumber10paintEventEP11QPaintEvent+0x13a)
[0xb320d39a]
/usr/lib/libQtGui.so.4(_ZN7QWidget5eventEP6QEvent+0x78b) [0xb3a1984b]
/usr/lib/libQtGui.so.4(_ZN6QFrame5eventEP6QEvent+0x33) [0xb3d50ec3]
/usr/lib/libQtGui.so.4(_ZN10QLCDNumber5eventEP6QEvent+0x24)
[0xb3d59fa4]
/usr/lib/libcom_trolltech_qt_gui.so
(_ZN23QtJambiShell_QLCDNumber5eventEP6QEvent+0x10f) [0xb320e38f]
/usr/lib/libQtGui.so.4
(_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0xbc)
[0xb39c182c]
/usr/lib/libQtGui.so.4(_ZN12QApplication6notifyEP7QObjectP6QEvent
+0x18a) [0xb39c979a]
/usr/lib/libcom_trolltech_qt_gui.so
(_ZN25QtJambiShell_QApplication6notifyEP7QObjectP6QEvent+0x141)
[0xb309a911]
/usr/lib/libQtCore.so.4
(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0xb1)
[0xb46a5a71]
/usr/lib/libQtGui.so.4 [0xb3a224fe]
/usr/lib/libQtGui.so.4
(_ZN14QWidgetPrivate10drawWidgetEP12QPaintDeviceRK7QRegionRK6QPointiP8QPainter
+0x530) [0xb3a18210]
/usr/lib/libQtGui.so.4
(_ZN14QWidgetPrivate22paintSiblingsRecursiveEP12QPaintDeviceRK5QListIP7QObjectEiRK7QRegionRK6QPointiP8QPainter
+0x2cd) [0xb3a189bd]
/usr/lib/libQtGui.so.4
(_ZN14QWidgetPrivate22paintSiblingsRecursiveEP12QPaintDeviceRK5QListIP7QObjectEiRK7QRegionRK6QPointiP8QPainter
+0x1d9) [0xb3a188c9]
/usr/lib/libQtGui.so.4
(_ZN14QWidgetPrivate10drawWidgetEP12QPaintDeviceRK7QRegionRK6QPointiP8QPainter
+0x1a8) [0xb3a17e88]
/usr/lib/libQtGui.so.4
(_ZN14QWidgetPrivate22paintSiblingsRecursiveEP12QPaintDeviceRK5QListIP7QObjectEiRK7QRegionRK6QPointiP8QPainter
+0x2cd) [0xb3a189bd]
/usr/lib/libQtGui.so.4
(_ZN14QWidgetPrivate10drawWidgetEP12QPaintDeviceRK7QRegionRK6QPointiP8QPainter
+0x1a8) [0xb3a17e88]
/usr/lib/libQtGui.so.4 [0xb3b8754e]
/usr/lib/libQtGui.so.4 [0xb3b87a47]
/usr/lib/libQtGui.so.4(_ZN7QWidget5eventEP6QEvent+0x5b6) [0xb3a19676]
/usr/lib/libcom_trolltech_qt_gui.so
(_ZN20QtJambiShell_QWidget5eventEP6QEvent+0x10f) [0xb341b8cf]
/usr/lib/libQtGui.so.4
(_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0xbc)
[0xb39c182c]
/usr/lib/libQtGui.so.4(_ZN12QApplication6notifyEP7QObjectP6QEvent
+0x18a) [0xb39c979a]
/usr/lib/libcom_trolltech_qt_gui.so
(_ZN25QtJambiShell_QApplication6notifyEP7QObjectP6QEvent+0x141)
[0xb309a911]
/usr/lib/libQtCore.so.4
(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0xb1)
[0xb46a5a71]
/usr/lib/libQtCore.so.4
(_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData
+0x2a5) [0xb46a66e5]
/usr/lib/libQtCore.so.4
(_ZN16QCoreApplication16sendPostedEventsEP7QObjecti+0x2d) [0xb46a68dd]
/usr/lib/libQtCore.so.4 [0xb46d05bf]
/usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x1e9) [0xb7fc42d9]
/usr/lib/libglib-2.0.so.0 [0xb7fc785b]
/usr/lib/libglib-2.0.so.0(g_main_context_iteration+0x68) [0xb7fc79d8]
/usr/lib/libQtCore.so.4
(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE
+0x58) [0xb46d0208]
/usr/lib/libQtGui.so.4 [0xb3a5a8c5]
/usr/lib/libQtCore.so.4
(_ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE+0x4a)
[0xb46a414a]
/usr/lib/libQtCore.so.4
(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0xea)
[0xb46a430a]
/usr/lib/libQtCore.so.4(_ZN16QCoreApplication4execEv+0xb5)
[0xb46a69a5]
/usr/lib/libQtGui.so.4(_ZN12QApplication4execEv+0x27) [0xb39c16a7]
/usr/lib/libcom_trolltech_qt_gui.so
(Java_com_trolltech_qt_gui_QApplication_exec__+0x17) [0xb3099147]
[0xb2b1bccf]
[0xb78db2bd]
[0xb78db203]
/usr/bin/mono(mono_runtime_exec_main+0xe5) [0x8113405]
/usr/bin/mono(mono_runtime_run_main+0x16d) [0x8113bad]
/usr/bin/mono(mono_main+0x18ea) [0x80b3d7a]
/usr/bin/mono [0x805aec1]
/lib/libc.so.6(__libc_start_main+0xe5) [0xb7de85f5]
/usr/bin/mono [0x805adf1]
Debug info from gdb:
[?1034h(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 0xb7dd06f0 (LWP 5392)]
[New Thread 0xb43efb90 (LWP 5398)]
[New Thread 0xb751db90 (LWP 5397)]
[New Thread 0xb7541b90 (LWP 5395)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
0xffffe430 in __kernel_vsyscall ()
4 Thread 0xb7541b90 (LWP 5395) 0xffffe430 in __kernel_vsyscall ()
3 Thread 0xb751db90 (LWP 5397) 0xffffe430 in __kernel_vsyscall ()
2 Thread 0xb43efb90 (LWP 5398) 0xffffe430 in __kernel_vsyscall ()
1 Thread 0xb7dd06f0 (LWP 5392) 0xffffe430 in __kernel_vsyscall ()
Thread 4 (Thread 0xb7541b90 (LWP 5395)):
#0 0xffffe430 in __kernel_vsyscall ()
#1 0xb7f483e6 in nanosleep () from /lib/libpthread.so.0
#2 0x081a6ee8 in ?? ()
#3 0xb7f41175 in start_thread () from /lib/libpthread.so.0
#4 0xb7e9fdae in clone () from /lib/libc.so.6
Thread 3 (Thread 0xb751db90 (LWP 5397)):
#0 0xffffe430 in __kernel_vsyscall ()
#1 0xb7f44c15 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/
libpthread.so.0
#2 0xb3603067 in ?? () from /usr/lib/libxcb.so.1
#3 0xb3604004 in xcb_send_request () from /usr/lib/libxcb.so.1
#4 0xb36863c6 in _XPutXCBBuffer () from /usr/lib/libX11.so.6
#5 0xb3686790 in ?? () from /usr/lib/libX11.so.6
#6 0xb382d042 in XRenderFreePicture () from /usr/lib/libXrender.so.1
#7 0xb3a9222f in ?? () from /usr/lib/libQtGui.so.4
#8 0xb3a92ced in ?? () from /usr/lib/libQtGui.so.4
#9 0xb3a8757d in QPixmap::deref () from /usr/lib/libQtGui.so.4
#10 0xb3a87980 in QPixmap::~QPixmap () from /usr/lib/libQtGui.so.4
#11 0xb2b4237a in ?? () from /usr/lib/kde4/plugins/styles/oxygen.so
#12 0xb2b4d64f in ?? () from /usr/lib/kde4/plugins/styles/oxygen.so
#13 0xb2b4e724 in ?? () from /usr/lib/kde4/plugins/styles/oxygen.so
#14 0xb2b4fb25 in ?? () from /usr/lib/kde4/plugins/styles/oxygen.so
#15 0xb2b65b1b in ?? () from /usr/lib/kde4/plugins/styles/oxygen.so
#16 0xb7dff8f1 in exit () from /lib/libc.so.6
#17 0x0805e276 in ?? ()
#18 0x080cb803 in ?? ()
#19 0x080f69e6 in ?? ()
#20 0xb4416498 in ?? ()
#21 0xb2c4142d in ?? ()
#22 0xb2c40711 in ?? ()
#23 0xb2c406af in ?? ()
#24 0xb48003a8 in ?? ()
#25 0xb444bbd6 in QtJambiLink::aboutToMakeObjectInvalid ()
from /usr/lib/libqtjambi.so
#26 0xb444c012 in QtJambiLink::releaseJavaObject () from /usr/lib/
libqtjambi.so
#27 0xb444c0c2 in QtJambiLink::cleanUpAll () from /usr/lib/
libqtjambi.so
#28 0xb444c2d9 in QtJambiLink::javaObjectFinalized ()
from /usr/lib/libqtjambi.so
#29 0xb44584b9 in Java_com_trolltech_qt_QtJambiObject_finalize ()
from /usr/lib/libqtjambi.so
#30 0xb2b1f7b3 in ?? ()
#31 0xb2b1f6b7 in ?? ()
#32 0xb78e4d98 in ?? ()
#33 0x0812df89 in ?? ()
#34 0x081d89a1 in ?? ()
#35 0x0812e174 in ?? ()
#36 0x08151b68 in ?? ()
#37 0x081c3a46 in ?? ()
#38 0x081e35d5 in ?? ()
#39 0xb7f41175 in start_thread () from /lib/libpthread.so.0
#40 0xb7e9fdae in clone () from /lib/libc.so.6
Thread 2 (Thread 0xb43efb90 (LWP 5398)):
#0 0xffffe430 in __kernel_vsyscall ()
#1 0xb7f483e6 in nanosleep () from /lib/libpthread.so.0
#2 0x081c2840 in ?? ()
#3 0x0815100b in ?? ()
#4 0xb440e4a4 in ?? ()
#5 0xb440e43d in ?? ()
#6 0xb440e136 in ?? ()
#7 0xb440dedf in ?? ()
#8 0xb440d8ea in ?? ()
#9 0xb440d86d in ?? ()
#10 0xb78e04e8 in ?? ()
#11 0x08110ad4 in mono_runtime_delegate_invoke ()
#12 0x08151bef in ?? ()
#13 0x081c3a46 in ?? ()
#14 0x081e35d5 in ?? ()
#15 0xb7f41175 in start_thread () from /lib/libpthread.so.0
#16 0xb7e9fdae in clone () from /lib/libc.so.6
Thread 1 (Thread 0xb7dd06f0 (LWP 5392)):
#0 0xffffe430 in __kernel_vsyscall ()
#1 0xb7f47bab in read () from /lib/libpthread.so.0
#2 0x080cbec6 in ?? ()
#3 <signal handler called>
#4 0xffffe430 in __kernel_vsyscall ()
#5 0xb7dfc900 in raise () from /lib/libc.so.6
#6 0xb7dfe238 in abort () from /lib/libc.so.6
#7 0xb7df570e in __assert_fail () from /lib/libc.so.6
#8 0xb368680e in ?? () from /usr/lib/libX11.so.6
#9 0xb382da1c in XRenderSetPictureClipRectangles ()
from /usr/lib/libXrender.so.1
#10 0xb3b783e4 in ?? () from /usr/lib/libQtGui.so.4
#11 0xb3b79004 in ?? () from /usr/lib/libQtGui.so.4
#12 0xb3ac943b in ?? () from /usr/lib/libQtGui.so.4
#13 0xb3ac950b in ?? () from /usr/lib/libQtGui.so.4
#14 0xb3acf486 in QPainter::drawLines () from /usr/lib/libQtGui.so.4
#15 0xb3c70a14 in ?? () from /usr/lib/libQtGui.so.4
#16 0xb3d5b0ce in ?? () from /usr/lib/libQtGui.so.4
#17 0xb3d5bc70 in ?? () from /usr/lib/libQtGui.so.4
#18 0xb3d5be41 in ?? () from /usr/lib/libQtGui.so.4
#19 0xb3d5c048 in QLCDNumber::paintEvent () from /usr/lib/libQtGui.so.
4
#20 0xb320d39a in QtJambiShell_QLCDNumber::paintEvent ()
from /usr/lib/libcom_trolltech_qt_gui.so
#21 0xb3a1984b in QWidget::event () from /usr/lib/libQtGui.so.4
#22 0xb3d50ec3 in QFrame::event () from /usr/lib/libQtGui.so.4
#23 0xb3d59fa4 in QLCDNumber::event () from /usr/lib/libQtGui.so.4
#24 0xb320e38f in QtJambiShell_QLCDNumber::event ()
from /usr/lib/libcom_trolltech_qt_gui.so
#25 0xb39c182c in QApplicationPrivate::notify_helper ()
from /usr/lib/libQtGui.so.4
#26 0xb39c979a in QApplication::notify () from /usr/lib/libQtGui.so.4
#27 0xb309a911 in QtJambiShell_QApplication::notify ()
from /usr/lib/libcom_trolltech_qt_gui.so
#28 0xb46a5a71 in QCoreApplication::notifyInternal ()
from /usr/lib/libQtCore.so.4
#29 0xb3a224fe in ?? () from /usr/lib/libQtGui.so.4
#30 0xb3a18210 in QWidgetPrivate::drawWidget () from /usr/lib/
libQtGui.so.4
#31 0xb3a189bd in QWidgetPrivate::paintSiblingsRecursive ()
from /usr/lib/libQtGui.so.4
#32 0xb3a188c9 in QWidgetPrivate::paintSiblingsRecursive ()
from /usr/lib/libQtGui.so.4
#33 0xb3a17e88 in QWidgetPrivate::drawWidget () from /usr/lib/
libQtGui.so.4
#34 0xb3a189bd in QWidgetPrivate::paintSiblingsRecursive ()
from /usr/lib/libQtGui.so.4
#35 0xb3a17e88 in QWidgetPrivate::drawWidget () from /usr/lib/
libQtGui.so.4
#36 0xb3b8754e in ?? () from /usr/lib/libQtGui.so.4
#37 0xb3b87a47 in ?? () from /usr/lib/libQtGui.so.4
#38 0xb3a19676 in QWidget::event () from /usr/lib/libQtGui.so.4
#39 0xb341b8cf in QtJambiShell_QWidget::event ()
from /usr/lib/libcom_trolltech_qt_gui.so
#40 0xb39c182c in QApplicationPrivate::notify_helper ()
from /usr/lib/libQtGui.so.4
#41 0xb39c979a in QApplication::notify () from /usr/lib/libQtGui.so.4
#42 0xb309a911 in QtJambiShell_QApplication::notify ()
from /usr/lib/libcom_trolltech_qt_gui.so
#43 0xb46a5a71 in QCoreApplication::notifyInternal ()
from /usr/lib/libQtCore.so.4
#44 0xb46a66e5 in QCoreApplicationPrivate::sendPostedEvents ()
from /usr/lib/libQtCore.so.4
#45 0xb46a68dd in QCoreApplication::sendPostedEvents ()
from /usr/lib/libQtCore.so.4
#46 0xb46d05bf in ?? () from /usr/lib/libQtCore.so.4
#47 0xb7fc42d9 in g_main_context_dispatch () from /usr/lib/
libglib-2.0.so.0
#48 0xb7fc785b in ?? () from /usr/lib/libglib-2.0.so.0
#49 0xb7fc79d8 in g_main_context_iteration () from /usr/lib/
libglib-2.0.so.0
#50 0xb46d0208 in QEventDispatcherGlib::processEvents ()
from /usr/lib/libQtCore.so.4
#51 0xb3a5a8c5 in ?? () from /usr/lib/libQtGui.so.4
#52 0xb46a414a in QEventLoop::processEvents () from /usr/lib/
libQtCore.so.4
#53 0xb46a430a in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#54 0xb46a69a5 in QCoreApplication::exec () from /usr/lib/libQtCore.so.
4
#55 0xb39c16a7 in QApplication::exec () from /usr/lib/libQtGui.so.4
#56 0xb3099147 in Java_com_trolltech_qt_gui_QApplication_exec__ ()
from /usr/lib/libcom_trolltech_qt_gui.so
#57 0xb2b1bccf in ?? ()
#58 0xb78db2bd in ?? ()
#59 0xb78db203 in ?? ()
#60 0x08113405 in mono_runtime_exec_main ()
#61 0x08113bad in mono_runtime_run_main ()
#62 0x080b3d7a in mono_main ()
#63 0x0805aec1 in ?? ()
#64 0xb7de85f5 in __libc_start_main () from /lib/libc.so.6
#65 0x0805adf1 in ?? ()
#0 0xffffe430 in __kernel_vsyscall ()
=================================================================
Got a SIGABRT 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
-------------------
You can reproduce the problem downloading the Win32 packages from the
downloads section and running an example with mono.
Please let me know if you need more information or how may I help you
finding and fixing the problem.
Thanks!
David.