-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
6.8.4
When invoking QFileDialog::getExistingDirectory() directly in a QAction::triggered() slot (triggered via QMenu from a QMainWindow), the application crashes. However, deferring the call using QMetaObject::invokeMethod() with Qt::QueuedConnection prevents the crash.
The issue arises when showing a modal file dialog immediately in response to a context menu action.The crash does not happen when the call is deferred with Qt::QueuedConnection, or if the dialog is shown inside a lambda posted to the event loop.The QMainWindow is still valid, and no object is being deleted.
epro Steps:
Using attached example it can be easily seen:
Right-click to open a context menu in a QMainWindow.
Trigger a menu action that says "direct"
Close the file dialog.
Application crashes.
For Gerrit Dashboard: QTBUG-138803 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
666867,4 | QWidgetWindow: fix crash while accessing deleted object | dev | qt/qtbase | Status: NEW | 0 | 0 |