Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.9.1
-
None
-
Windows 7 Enterprise SP1, 64bit
VS14.0.25325.01, Update 3
-
e612fe8d47bc0fe762668617a5189117ad1aee15 (qtbase/5.9, 3.8.2017, 5.9.2)
Description
New in qt5.9:
QFileSystemWatcher's QWindowsFileSystemWatcherEngine creates a QWindowsRemovableDriveListener;
DriveListener in turn installs a NativeEventFilter;
For QFileSystem's default constructor, the parent-pointer that gets passed through to the NativeEventFilter is of course null, yet the constructor for the nativeEventFilter doesn't check if the filter object is null, thus crashes when fetching the data via qGetPtrHelper
Call stack:
Qt5Cored.dll!QScopedPointer<QObjectData,QScopedPointerDeleter<QObjectData> >::data() Zeile 140 Qt5Cored.dll!qGetPtrHelper<QScopedPointer<QObjectData,QScopedPointerDeleter<QObjectData> > >(const QScopedPointer<QObjectData,QScopedPointerDeleter<QObjectData> > & p) Zeile 999 Qt5Cored.dll!QAbstractEventDispatcher::d_func() Zeile 59 Qt5Cored.dll!QAbstractEventDispatcher::installNativeEventFilter(QAbstractNativeEventFilter * filterObj) Zeile 405 Qt5Cored.dll!QWindowsRemovableDriveListener::QWindowsRemovableDriveListener(QObject * parent) Zeile 125 Qt5Cored.dll!QWindowsFileSystemWatcherEngine::QWindowsFileSystemWatcherEngine(QObject * parent) Zeile 328 Qt5Cored.dll!QFileSystemWatcherPrivate::createNativeEngine(QObject * parent) Zeile 75 Qt5Cored.dll!QFileSystemWatcherPrivate::init() Zeile 98 Qt5Cored.dll!QFileSystemWatcher::QFileSystemWatcher(QObject * parent) Zeile 262 QTDebug.exe!main() Zeile 7 [Externer Code]
I attached a minimal code example that crashes
Attachments
For Gerrit Dashboard: QTBUG-62242 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
201444,2 | QFileSystemWatcher/Windows: Fix crash when no QCoreApplication is present | 5.9 | qt/qtbase | Status: MERGED | +2 | 0 |