<div>Hello,</div><div><br></div><div>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. </div>

<div><br></div><div>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.</div>


<div><br></div><div>If anyone can offer clues as to what might cause this, I would be most grateful. </div><div><br></div><div>Luke</div><div><br></div><div><br></div><div><br></div><div><div>(gdb) backtr                                                                                                                                               </div>

<div>#0  0x0012d422 in __kernel_vsyscall ()                                                                                                                     </div><div>#1  0x00138015 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0                                                                </div>

<div>#2  0x015038c2 in QMutexPrivate::wait (this=0x8f70bc0, timeout=-1) at thread/qmutex_unix.cpp:84                                                            </div><div>#3  0x014ff072 in QMutex::lock (this=0x8f70bb0) at thread/qmutex.cpp:205                                                                                   </div>

<div>#4  0x0161d150 in QOrderedMutexLocker::relock (this=0x940a890, __in_chrg=<value optimized out>)                                                            </div><div>    at ../../include/QtCore/private/../../../src/corelib/thread/qorderedmutexlocker_p.h:107                                                                </div>

<div>#5  ~QObject (this=0x940a890, __in_chrg=<value optimized out>) at kernel/qobject.cpp:945                                                                   </div><div>#6  0x01d96eaf in PyQtProxy::~PyQtProxy() () from /usr/lib/pymodules/python2.6/PyQt4/QtCore.so                                                             </div>

<div>#7  0x01d957f9 in PyQtProxy::unislot(void**) () from /usr/lib/pymodules/python2.6/PyQt4/QtCore.so                                                          </div><div>#8  0x01d958a5 in PyQtProxy::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/pymodules/python2.6/PyQt4/QtCore.so                              </div>

<div>#9  0x0160bc9a in QMetaObject::metacall (object=0x940a890, cl=128, idx=5, argv=0xbfffe75c) at kernel/qmetaobject.cpp:237                                   </div><div>#10 0x0161a3d5 in QMetaObject::activate (sender=0x914aff8, m=0x1719188, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3293                         </div>

<div>#11 0x01621fe7 in QSingleShotTimer::timeout (this=0x914aff8) at .moc/release-shared/qtimer.moc:82                                                          </div><div>#12 0x016220fc in QSingleShotTimer::timerEvent (this=0x914aff8) at kernel/qtimer.cpp:308                                                                   </div>

<div>#13 0x01617254 in QObject::event (this=0x914aff8, e=0xd) at kernel/qobject.cpp:1212                                                                        </div><div>#14 0x00b574dc in QApplicationPrivate::notify_helper (this=0x8a49dd0, receiver=0x914aff8, e=0xbfffec80) at kernel/qapplication.cpp:4300                    </div>

<div>#15 0x00b5e05e in QApplication::notify (this=0x8a3b860, receiver=0x914aff8, e=0xbfffec80) at kernel/qapplication.cpp:3704                                  </div><div>#16 0x008381d7 in sipQApplication::notify (this=0x8a3b860, a0=0x914aff8, a1=0xbfffec80) at sipQtGuipart9.cpp:18539                                         </div>

<div>#17 0x01606a3b in QCoreApplication::notifyInternal (this=0x8a3b860, receiver=0x914aff8, event=0xbfffec80) at kernel/qcoreapplication.cpp:704               </div><div>#18 0x01635d66 in QCoreApplication::sendEvent (this=0x8b2c784) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215                     </div>

<div>#19 QTimerInfoList::activateTimers (this=0x8b2c784) at kernel/qeventdispatcher_unix.cpp:603                                                                </div><div>#20 0x01632917 in timerSourceDispatch (source=0x8b2c7b8) at kernel/qeventdispatcher_glib.cpp:184                                                           </div>

<div>#21 idleTimerSourceDispatch (source=0x8b2c7b8) at kernel/qeventdispatcher_glib.cpp:231                                                                     </div><div>#22 0x018b35e5 in g_main_context_dispatch () from /lib/libglib-2.0.so.0                                                                                    </div>

<div>#23 0x018b72d8 in ?? () from /lib/libglib-2.0.so.0                                                                                                         </div><div>#24 0x018b74b8 in g_main_context_iteration () from /lib/libglib-2.0.so.0                                                                                   </div>

<div>#25 0x016325d5 in QEventDispatcherGlib::processEvents (this=0x8b29948, flags=...) at kernel/qeventdispatcher_glib.cpp:412                                  </div><div>#26 0x00c17135 in QGuiEventDispatcherGlib::processEvents (this=0x8b29948, flags=...) at kernel/qguieventdispatcher_glib.cpp:204                            </div>

<div>#27 0x01605059 in QEventLoop::processEvents (this=0xbfffef44, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.                                                                                                                                       </div>

<div>) at kernel/qeventloop.cpp:149                                                                                                                             </div><div>#28 0x016054aa in QEventLoop::exec (this=0xbfffef44, flags=...) at kernel/qeventloop.cpp:201                                                               </div>

<div>#29 0x0160969f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981                                                                             </div><div>#30 0x00b57577 in QApplication::exec () at kernel/qapplication.cpp:3579</div>

</div><div><br></div><div><br></div>