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

Non-native QFileDialog gets frozen on destruction if remote mapped drive is disconnected

    XMLWordPrintable

Details

    • Windows
    • 0786c17bb (dev), 4c864a0e8 (6.7), 7e7b502e3 (6.6), 38dbd7516 (dev), 95acccea1 (6.7), 57f02a814 (6.6)

    Description

      Related to QTBUG-6039. Closing the QFileDialog may freeze the application because destruction of QFileInfoGatherer waits for the thread to finish:

      QFileInfoGatherer::~QFileInfoGatherer()
      {
          abort.storeRelaxed(true);
          QMutexLocker locker(&mutex);
          condition.wakeAll();
          locker.unlock();
          wait();
      }
      

      But the worker thread is still trying hard to get file infos and is stuck here until it is done and can abort the operation:

      1 ntdll!ZwQueryFullAttributesFile 0x7ff90322f8b4
      2 KERNELBASE!GetFileAttributesExW 0x7ff900a91e5c
      3 QFileSystemEngine::fillMetaData qfilesystemengine_win.cpp 1374 0x7ff8a50311ac
      4 QFileInfo::stat qfileinfo.cpp 1567 0x7ff8a4e7a3cf
      5 QFileInfoGatherer::getFileInfos qfileinfogatherer.cpp 355 0x7ff8a32d71f4
      6 QFileInfoGatherer::run qfileinfogatherer.cpp 295 0x7ff8a32d8389
      7 QThreadPrivate::start qthread_win.cpp 290 0x7ff8a5049be6
      8 KERNEL32!BaseThreadInitThunk 0x7ff902117344
      9 ntdll!RtlUserThreadStart 0x7ff9031e26b1
      10 ?? 
      

      Maybe the whole QFileInfoGatherer instance could be just dropped and made to destroy itself when the thread finally quits so it wouldn't have to blockingly wait in the main thread?

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vhilshei Volker Hilsheimer
            poikelin Joni Poikelin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: