[PyQt] random deadlocks in pyqt application

Giovanni Bajo rasky at develer.com
Mon Aug 31 01:28:14 BST 2009


On dom, 2009-08-30 at 11:22 +0200, Erik Janssens wrote:
> Hi,
> 
> I'm having random deadlocks in my pyqt application (I don't do
> any locking and such in the app itself, but the app has
> 2 QThreads).
> 
> They appear to occur random when the application is used like
> a madman (opening and closing windows all the time).  A strange
> observation is that the chances for deadlock are higher when using
> xvfb instead of the normal x display.  (I use this for running
> unittests overnight)
> 
> I'm running Ubuntu 9.04 using python2.5 (the deadlocks also 
> appear when using python2.6)
> 
> The first line in the stack trace is always :
> 
> "xcb_wait_for_reply () from /usr/lib/libxcb.so.1"
> 
> Has anybody seen this before or can give me a clue on how
> to proceed with this issue ?

This exact segfault doesn't ring any bell to me, so I only have generic
advices for you.

I saw many segfaults related to the fact that the QThreads are not being
used in the way that they should:
http://qt.nokia.com/doc/4.5/threads.html#threads-and-qobjects

Make sure that you are following all the advices in there.

Also, don't use Python's threading module if you're going to touch Qt's
objects.
-- 
Giovanni Bajo
Develer S.r.l.
http://www.develer.com




More information about the PyQt mailing list