[PyKDE] PyQt 3.12 introduces deadlock with QCustomEvent's destructor.
Truls A. Tangstad
kerfue+pykde at herocamp.org
Fri Aug 6 16:23:00 BST 2004
This problem might be somewhat related to my last post "PyQt 3.12
introduces race condition/deadlock with QApplication.postEvent." (see
It seems that the destructor of QCustomEvent causes problems/hangs
just by creating an instance of it and then deleting it in a thread
other than the GUI/event/main-thread. This only occurs in version 3.12
of PyQt, and was not a problem in 3.11.
The problem does not seem to occur when sending the event object to
qt.qApp.postEvent before deleting it, even when the posting function
should be the only one left with a reference to the object.
One rarely creates a QCustomEvent without posting it, but the behavior
is still strange.
In the enclosed example two threads are started, one creates a
QCustomEvent object, posts it, then deletes it, after waiting to make
sure the event handler is done with it. The second thread creates a
QCustomEvent object then deletes it, causing the application to hang
with PyQt 3.12.
I'm running on Debian Unstable using the following package versions:
Truls A. Tangstad - <kerfue+pykde at h e r o c a m p.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 885 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20040806/26023980/customeventdtorbug.py
More information about the PyQt