[Qt-jambi-interest] Tracking down a problem in native-code

Tom Schindl listom at bestsolution.at
Fri Nov 7 16:23:43 CET 2008


Gunnar Sletta schrieb:
> Tom Schindl wrote:
>> Hi Gunnar,
>>
>> The first thing I found out is that it looks like a problem in QList and
>> Event-Listeners.
>>
>>> Thread 0 Crashed:
>>> 0   <<00000000>>     0x26594a85 0 + 643385989
>>> 1   libqtjambi.jnilib     0x0275367e qtjambi_event_notify(void**) + 80
>>> 2   libQtCore.4.dylib     0x0896fd53
>>> QInternal::activateCallbacks(QInternal::Callback, void**) + 115
>>> 3   libQtCore.4.dylib     0x08a60b11
>>> QCoreApplication::notifyInternal(QObject*, QEvent*) + 49
>>> 4   libQtCore.4.dylib     0x08a63de1
>>> QCoreApplicationPrivate::sendPostedEvents(QObject*, int,
>>> QThreadData*) + 689
>>> 5   libQtGui.4.dylib      0x08d4d68b
>>> QEventDispatcherMac::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
>>> + 107
>>> 6   libQtCore.4.dylib     0x08a60231
>>> QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 65
>>> 7   libQtCore.4.dylib     0x08a602fd
>>> QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 157
>>> 8   libQtCore.4.dylib     0x08a64021 QCoreApplication::exec() + 161
> 
> I'm afraid not ;)
> 
> This only states that the problem occured while an event was being
> delivered, most likely it was a DeleteLater event, caused by a GUI
> object being collected on the GC thread and the deletion being delegated
> back to the GUI thread. We spent a lot of effort ironing out these
> issues back in may, and I was rather confident that we had caught these
> problems, but alas..
> 
> Places to look:
>  * Do you have any disposeLater() or dispose() in your code?

No dispose() / disposeLater() at all :-(

>  * Start looking at the parts of the app where you use temporary GUI
> objects: QFonts, QPixmaps, QRegions, QGraphicsItems, QBrushes, QPens, etc.
> 

None of the above is used :-(

Another stacktrace I just got:
> Thread 0 Crashed:
> 0   libcom_trolltech_qt_gui.jnilib 	0x0982eedc qtjambi_destructor(void*) + 12
> 1   libqtjambi.jnilib              	0x027547ef QtJambiDestructorEvent::callDestructor() + 57
> 2   libqtjambi.jnilib              	0x0275367e qtjambi_event_notify(void**) + 80
> 3   libQtCore.4.dylib              	0x0896fd53 QInternal::activateCallbacks(QInternal::Callback, void**) + 115
> 4   libQtCore.4.dylib              	0x08a60b11 QCoreApplication::notifyInternal(QObject*, QEvent*) + 49
> 5   libQtCore.4.dylib              	0x08a63de1 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 689
> 6   libQtGui.4.dylib               	0x08d4d68b QEventDispatcherMac::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 107
> 7   libQtCore.4.dylib              	0x08a60231 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 65
> 8   libQtCore.4.dylib              	0x08a602fd QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 157
> 9   libQtCore.4.dylib              	0x08a64021 QCoreApplication::exec() + 161

The problem occurs with some of my ListWidget-code because when I
comment certain parts the crash is not happening any more.

E.g. when I comment the remove-code or the selection-update-code I don't
get a crash.

The call order is like this:
a) insert x items
b) remove x old items
c) clear the widget
d) set a new selection

I tried to extract the call order but naturally then it doesn't crash.


Tom
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ListViewer.java
Url: http://lists.qt.nokia.com/pipermail/qt-jambi-interest/attachments/20081107/ef6dff06/attachment.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: QTListBug.java
Url: http://lists.qt.nokia.com/pipermail/qt-jambi-interest/attachments/20081107/ef6dff06/attachment-0001.pl 


More information about the Qt-jambi-interest mailing list