Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.2.0 RC2
-
None
Description
Calling FileSystemWatcher::addPaths sometimes crashes with
1 QHash<QFileSystemWatcherPathKey,QWindowsFileSystemWatcherEngine::PathInfo>::~QHash<QFileSystemWatcherPathKey,QWindowsFileSystemWatcherEngine::PathInfo> qhash.h 776 0x7ffed19e0a32 2 QHashPrivate::Data<QHashPrivate::Node<void *,QHash<QFileSystemWatcherPathKey,QWindowsFileSystemWatcherEngine::PathInfo>>>::erase qhash.h 649 0x7ffed19e308a
or
1 QHash<void *,QHash<QFileSystemWatcherPathKey,QWindowsFileSystemWatcherEngine::PathInfo>>::emplace<QHash<QFileSystemWatcherPathKey,QWindowsFileSystemWatcherEngine::PathInfo> const &> qhash.h 1181 0x7ffe54dff9b6
2 QWindowsFileSystemWatcherEngine::addPaths qfilesystemwatcher_win.cpp 434 0x7ffe54e0230e
After a closer look at the code there is a problem with the path iterator pit in the method:
QWindowsFileSystemWatcherEngine::addPaths ->
Qt6 does not guarantee stable iterators after an insert.
QHash<QString, int> myHash; auto i = myHash.find("foo"); myHash.insert("foo", 789); i.value(); // possible crash myHash.erase(i); // possible crash
Attachments
Issue Links
- relates to
-
QDS-5029 QDS occasionally crashes when opening an existing project
- Closed