Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-93298

Windows: Application hangs (or crashes) on quit while QtQuick FileDialog is open

    XMLWordPrintable

Details

    • Windows
    • 66bcb66a51 (qt/qtbase/dev) 66bcb66a51 (qt/tqtc-qtbase/dev) 2b466e1734 (qt/qtbase/6.3) 2b466e1734 (qt/tqtc-qtbase/6.3) 66bcb66a51 (qt/tqtc-qtbase/6.4)

    Description

      App hangs (see attached example) if it closes while QtQuick FileDialog is open.

      1 ZwWaitForSingleObject ntdll 0x77aa2f5c 
      2 QMutexPrivate::wait qmutex_win.cpp 64 0x78ad9051 
      3 QBasicMutex::lockInternal qmutex.cpp 645 0x78ad8985 
      4 QBasicMutex::lockInternal qmutex.cpp 562 0x78ad8781 
      5 QMutex::lock qmutex.cpp 236 0x78ad8d95 
      6 QMutexLocker::QMutexLocker qmutex.h 234 0x78aa0e43 
      7 QThread::isRunning qthread.cpp 485 0x78ad0e13 
      8 QWindowsDialogHelperBase<QPlatformFileDialogHelper>::cleanupThread qwindowsdialoghelpers.cpp 218 0x79493352 
      9 QWindowsDialogHelperBase<QPlatformFileDialogHelper>::~QWindowsDialogHelperBase<QPlatformFileDialogHelper> qwindowsdialoghelpers.h 70 0x79491458 
      10 QWindowsDialogHelperBase<QPlatformFileDialogHelper>::`scalar deleting destructor' qwindowsd 0x7949202f 
      11 QQuickPlatformFileDialog1::~QQuickPlatformFileDialog1 qquickplatformfiledialog.cpp 178 0x52f9d30 
      12 QQuickPlatformFileDialog1::`scalar deleting destructor' dialogplugind 0x52fa0af 
      13 qDeleteInEventHandler qobject.cpp 4815 0x78df0c45 
      14 QObject::event qobject.cpp 1301 0x78de988b 
      15 QCoreApplicationPrivate::notify_helper qcoreapplication.cpp 1224 0x78d9c2b2 
      16 doNotify qcoreapplication.cpp 1153 0x78d9d909 
      17 QCoreApplication::notify qcoreapplication.cpp 1139 0x78d99e23 
      18 QGuiApplication::notify qguiapplication.cpp 1936 0x7bd88f3f 
      19 QCoreApplication::notifyInternal2 qcoreapplication.cpp 1063 0x78d9b215 
      20 QCoreApplication::sendEvent qcoreapplication.cpp 1458 0x78d99849 
      21 QCoreApplicationPrivate::sendPostedEvents qcoreapplication.cpp 1817 0x78d9cad1 
      22 QCoreApplication::sendPostedEvents qcoreapplication.cpp 1676 0x78d99af2 
      23 QThreadPrivate::finish qthread_win.cpp 422 0x78ad4e07 
      24 QThread::terminate qthread_win.cpp 610 0x78ad487e 
      25 QWindowsDialogHelperBase<QPlatformFileDialogHelper>::cleanupThread qwindowsdialoghelpers.cpp 222 0x79493393 
      26 QWindowsDialogHelperBase<QPlatformFileDialogHelper>::~QWindowsDialogHelperBase<QPlatformFileDialogHelper> qwindowsdialoghelpers.h 70 0x79491458 
      27 QWindowsFileDialogHelper::~QWindowsFileDialogHelper qwindowsd 0x7949163a 
      28 QWindowsFileDialogHelper::`scalar deleting destructor' qwindowsd 0x7949212f 
      29 QQuickPlatformFileDialog1::~QQuickPlatformFileDialog1 qquickplatformfiledialog.cpp 178 0x52f9d30 
      30 QQmlPrivate::QQmlElement<QQuickPlatformFileDialog1>::~QQmlElement<QQuickPlatformFileDialog1> qqmlprivate.h 144 0x5307fb5 
      31 QQmlPrivate::QQmlElement<QQuickPlatformFileDialog1>::`scalar deleting destructor' dialogplugind 0x530887f 
      32 QObjectPrivate::deleteChildren qobject.cpp 2104 0x78def280 
      33 QObject::~QObject qobject.cpp 1085 0x78de9768 
      34 QQuickItem::~QQuickItem qquickitem.cpp 2365 0x7999f0e4 
      35 QQuickImplicitSizeItem::~QQuickImplicitSizeItem Qt5Quickd 0x7985a89f 
      36 QQuickLoader::~QQuickLoader qquickloader.cpp 317 0x79a856e7 
      37 QQmlPrivate::QQmlElement<QQuickLoader>::~QQmlElement<QQuickLoader> qqmlprivate.h 144 0x79c1638f 
      38 QQmlPrivate::QQmlElement<QQuickLoader>::`scalar deleting destructor' Qt5Quickd 0x79c19e2f 
      39 QObjectPrivate::deleteChildren qobject.cpp 2104 0x78def280 
      40 QObject::~QObject qobject.cpp 1085 0x78de9768 
      41 QWindow::~QWindow qwindow.cpp 227 0x7bda5cc6 
      42 QQuickWindow::~QQuickWindow qquickwindow.cpp 1554 0x799d7cba 
      43 QQuickWindowQmlImpl::~QQuickWindowQmlImpl Qt5Quickd 0x79aae10b 
      44 QQmlPrivate::QQmlElement<QQuickWindowQmlImpl>::~QQmlElement<QQuickWindowQmlImpl> qqmlprivate.h 144 0x52c80ba 
      45 QQmlPrivate::QQmlElement<QQuickWindowQmlImpl>::`scalar deleting destructor' windowplugind 0x52c864f 
      46 qDeleteAll<QList<QObject *>::const_iterator> qalgorithms.h 320 0x1321fef 
      47 qDeleteAll<QList<QObject *>> qalgorithms.h 328 0x1321f9c 
      48 QQmlApplicationEnginePrivate::cleanUp qqmlapplicationengine.cpp 66 0x1320f5a 
      49 QQmlApplicationEngine::~QQmlApplicationEngine qqmlapplicationengine.cpp 264 0x13208f1 
      50 main main.cpp 21 0xf32870 
      51 WinMain qtmain_win.cpp 97 0xf35814 
      52 invoke_main exe_common.inl 107 0xf33f2d 
      53 __scrt_common_main_seh exe_common.inl 288 0xf33db7 
      54 __scrt_common_main exe_common.inl 331 0xf33c4d 
      55 WinMainCRTStartup exe_winmain.cpp 17 0xf33fa8 
      56 BaseThreadInitThunk KERNEL32 0x75256359 
      57 RtlGetAppContainerNamedObjectPath ntdll 0x77a98964 
      58 RtlGetAppContainerNamedObjectPath ntdll 0x77a98934
      
      

       Attached minimal reproducible example, you need just launch it and wait 2 seconds while it'll quit by timer and hang.

      In slightly complex cases it may even crash. It looks like more generic and serious issue than just an issue with QtQuick FileDialog.

      It seems that recursive QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete) call sometimes may destroy the same objects twice. 

      Pay attention above how ~QWindowsDialogHelperBase<QPlatformFileDialogHelper> destructor was called twice (recursively) for the same object.

       

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-93298
          # Subject Branch Project Status CR V

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              studiosus Vladimir Belyavsky
              Votes:
              8 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes