[PyKDE] PyQt 3.12 introduces race condition/deadlock with QApplication.postEvent.

Truls A. Tangstad kerfue+pykde at herocamp.org
Fri Aug 6 12:56:06 BST 2004

We've had a lot of problems with our application (SciCraft[1]) hanging
at odd times after upgrading to PyQt 3.12 (package python2.3-qt3) in
debian.  The problem seems to occur whenever we do a postEvent from
another thread while the event/gui-thread is handling a previous
event. Using PyQt 3.12 the application deadlocks when posting the
second event, while using version 3.11 gives none of these problems.

Attached is an example script showing the problem. The script runs
successfully (for me) using 3.11 and hangs on postEvent in 3.12. The
script uses a custom event with a data object with a slow __del__ to
make sure that the event handling is stalled long enough for the
second postEvent to occur.

Does anyone know a workaround, fix or even a kludge for this problem?

I'm running on Debian Unstable using the following package versions:
libqt3c102-mt       3.2.3-4
python2.3-qt3       3.12-1
python2.3-sip4-qt3  4.0-2

[1] - http://www.scicraft.org

Truls A. Tangstad - <kerfue+pykde at h e r o c a m p.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: posteventbug.py
Type: text/x-python
Size: 1828 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20040806/d581f042/posteventbug.py

More information about the PyQt mailing list