[PyQt] QMutex deadlock during QObject destructor

Luke Campagnola lcampagn at email.unc.edu
Sat Apr 16 14:00:50 BST 2011


On Sat, Apr 16, 2011 at 04:22, Phil Thompson
<phil at riverbankcomputing.com> wrote:
> On Fri, 15 Apr 2011 23:45:15 -0400, Luke Campagnola
> <lcampagn at email.unc.edu> wrote:
>> Hello,
>>
>> I have a multi-threaded application that locks up periodically while
>> drawing
>> graphics. The application is quite large and due to the randomness of
> the
>> lockup (usually takes between 10 minutes and 10 hours), I have not been
>> able
>> to work out the exact cause. I do believe that all GUI calls are being
>> correctly restricted to the main thread. Below is a partial stack trace
>> collected while locked. Notably, the lockup occurs in the destructor for
>> some QObject following a QTimer single-shot signal.
>>
>> The application displays live video from a camera, and as far as I can
>> tell,
>> the only objects being deleted would be related to 1) signals being sent
> as
>> new camera frames arrive, 2) QTimer signals that drive the video
> display,
>> and 3) QImage/QPixmap pairs that are used to update a
> QGraphicsPixmapItem.
>>
>> If anyone can offer clues as to what might cause this, I would be most
>> grateful.
>
> Version numbers?

I'm sorry!
I'm using PyQt 4.7.2 on Ubuntu 10.04 (This uses Qt 4.6.2).
I also have a seemingly-identical problem on windows using version
4.8.3-1 (I don't know how to get debugging symbols on this platform,
though, so it is very difficult to trace the hangup). The last windows
version that did not exhibit this bug was 4.5.4.

Luke


More information about the PyQt mailing list