Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.6.1
-
-
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
For Gerrit Dashboard: QTBUG-120062 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
523239,4 | qfilesystemmodel.cpp: Fix building with -no-feature-filesystemwatcher | dev | qt/qtbase | Status: MERGED | +2 | 0 |
525378,4 | Try harder to clean up the file info gatherer without blocking | dev | qt/qtbase | Status: MERGED | +2 | 0 |
526032,2 | Try harder to clean up the file info gatherer without blocking | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |
526038,2 | Try harder to clean up the file info gatherer without blocking | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |
526660,2 | qfilesystemmodel.cpp: Fix building with -no-feature-filesystemwatcher | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |
526835,2 | qfilesystemmodel.cpp: Fix building with -no-feature-filesystemwatcher | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |