Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
5.9.4
-
None
-
This is running on a windows 10 system with Qt 5.9.4 msvc 2015 64 / 32 bit.
Description
Creating a QFileSystemWatcher and then later calling QObject::moveToThread() on it or a parent will cause a crash when it is later deleted. This seems like it may be related to https://bugreports.qt.io/browse/QTBUG-64171
A minimal example of this is
#include <QApplication> #include <QMessageBox> #include <QFileSystemWatcher> #include <QThread> int main(int argc, char *argv[]) { QApplication a(argc, argv); QThread thread; thread.start(); QFileSystemWatcher *watcher = new QFileSystemWatcher(); watcher->moveToThread(&thread); QMessageBox box; box.show(); watcher->deleteLater(); return a.exec(); }
Attachments
Issue Links
- is duplicated by
-
QTBUG-93291 QFileSystemWatcher not safe wrt moveToThread
-
- Closed
-