[Interest] [QQuickView] deadlock on exit

Tim Blechmann tim at klingt.org
Wed Jan 8 15:08:31 CET 2014


hi,

not sure, if i am doing something completely wrong here.
i'm using a QMainWindow with a QQuickView as central widget. the
application does not make use of QApplication::exec, but i'm polling the
event loop manually from the application.

however the application deadlock on exit, when i'm deleting the
QApplication:

> * thread #1: tid = 0x4164ee, 0x00007fff8ffd5716 libsystem_kernel.dylib`__psynch_cvwait + 10, queue = 'com.apple.main-thread, stop reason = signal SIGSTOP
>     frame #0: 0x00007fff8ffd5716 libsystem_kernel.dylib`__psynch_cvwait + 10
>     frame #1: 0x00007fff95ae4c3b libsystem_pthread.dylib`_pthread_cond_wait + 727
>     frame #2: 0x0000000101e19511 QtCore`QWaitConditionPrivate::wait(unsigned long) + 49
>     frame #3: 0x0000000101e193ca QtCore`QWaitCondition::wait(QMutex*, unsigned long) + 170
>     frame #4: 0x000000010118fb44 QtQml`QQmlThread::shutdown() + 116
>     frame #5: 0x0000000101122e8f QtQml`QQmlTypeLoader::~QQmlTypeLoader() + 31
>     frame #6: 0x00000001010c4b8a QtQml`QQmlEnginePrivate::~QQmlEnginePrivate() + 1946
>     frame #7: 0x00000001010c43ce QtQml`QQmlEnginePrivate::~QQmlEnginePrivate() + 14
>     frame #8: 0x0000000102029334 QtCore`QObject::~QObject() + 1748
>     frame #9: 0x00000001010c68b2 QtQml`QQmlEngine::~QQmlEngine() + 386
>     frame #10: 0x00000001010c670e QtQml`QQmlEngine::~QQmlEngine() + 14
>     frame #11: 0x000000010202950e QtCore`QObjectPrivate::deleteChildren() + 110
>     frame #12: 0x0000000102029314 QtCore`QObject::~QObject() + 1716
>     frame #13: 0x00000001006f9a7c QtGui`QWindow::~QWindow() + 140
>     frame #14: 0x0000000101506f67 QtQuick`QQuickView::~QQuickView() + 151
>     frame #15: 0x0000000101506e7e QtQuick`QQuickView::~QQuickView() + 14
>     frame #16: 0x000000010202950e QtCore`QObjectPrivate::deleteChildren() + 110
>     frame #17: 0x0000000102029314 QtCore`QObject::~QObject() + 1716
>     frame #18: 0x00000001006f9a7c QtGui`QWindow::~QWindow() + 140
>     frame #19: 0x000000010181b51b QtWidgets`QWidgetWindow::~QWidgetWindow() + 139
>     frame #20: 0x000000010181b43e QtWidgets`QWidgetWindow::~QWidgetWindow() + 14
>     frame #21: 0x0000000101818cd3 QtWidgets`QWidgetPrivate::deleteTLSysExtra() + 83
>     frame #22: 0x0000000101818b28 QtWidgets`QWidget::destroy(bool, bool) + 888
>     frame #23: 0x00000001017c25fe QtWidgets`QApplication::~QApplication() + 270
>     frame #24: 0x00000001017c24ce QtWidgets`QApplication::~QApplication() + 14

there seems to be one other qt-related thread:
> * thread #6: tid = 0x416536, 0x00007fff8ffd59aa libsystem_kernel.dylib`select$DARWIN_EXTSN + 10, name = 'QThread
>     frame #0: 0x00007fff8ffd59aa libsystem_kernel.dylib`select$DARWIN_EXTSN + 10
>     frame #1: 0x000000010204e213 QtCore`qt_safe_select(int, fd_set*, fd_set*, fd_set*, timespec const*) + 547
>     frame #2: 0x000000010204ef58 QtCore`QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timespec*) + 680
>     frame #3: 0x000000010204fdca QtCore`QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 250
>     frame #4: 0x0000000101ffd05d QtCore`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 397
>     frame #5: 0x0000000101e140e3 QtCore`QThread::exec() + 115
>     frame #6: 0x0000000101e17e60 QtCore`QThreadPrivate::start(void*) + 352
>     frame #7: 0x00007fff95ae2899 libsystem_pthread.dylib`_pthread_body + 138
>     frame #8: 0x00007fff95ae272a libsystem_pthread.dylib`_pthread_start + 137
>     frame #9: 0x00007fff95ae6fc9 libsystem_pthread.dylib`thread_start + 13

platform is osx 10.9, qt-5.2. any idea, how to further debug this issue?

thanks in advance,
tim




More information about the Interest mailing list