[PyQt] QMutex deadlock during QObject destructor

Thomas Berg merlin66b at gmail.com
Sat Apr 16 13:10:59 BST 2011


Hi,

On Sat, Apr 16, 2011 at 5:45 AM, 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.
> Luke
>

This is a long shot, I just thought I should mention it: a deadlock
[1] in QMutex was fixed in qt-4.7.2 [2]. If you are using and older Qt
version, the new one may be worth a try.

Hope this helps,
Thomas

[1] http://bugreports.qt.nokia.com/browse/QTBUG-16115
[2] http://qt.nokia.com/developer/changes/changes-4.7.2/


More information about the PyQt mailing list