Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.4.2, 6.5.2
-
None
-
-
e73f35d9c (dev), e36e681a2 (6.5), a1045b2b0 (6.6), 061a83afc (tqtc/lts-6.2), 505ed52cd (dev), 115c7f591 (6.5), 9044a8e03 (6.6)
Description
Creating a native QFileDialog on macOS with a nested widget as parent (not the window) will crash the application if the parent widget is deleted before the dialog.
Steps to reproduce:
- create a QFileDialog with a non-window widget as parent
- delete the parent widget
Expected behaviour:
- widget and file dialog are gone
Actual behaviour:
- widget and file dialog are cleaned up
- native file dialog is still visible
- finishing the dialog now crashes the app (use after free)
I added a simple example to showcase the issue.
Attachments
For Gerrit Dashboard: QTBUG-116277 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
500723,5 | QPrintDialog on macOS: Don't crash when parent is not a window | dev | qt/qtbase | Status: MERGED | +2 | 0 |
500724,6 | Dialogs: clean up native dialogs when object gets destroyed | dev | qt/qtbase | Status: MERGED | +2 | 0 |
502008,2 | QPrintDialog on macOS: Don't crash when parent is not a window | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |
502009,2 | QPrintDialog on macOS: Don't crash when parent is not a window | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |
502015,2 | QPrintDialog on macOS: Don't crash when parent is not a window | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
502330,2 | Dialogs: clean up native dialogs when object gets destroyed | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |
502331,2 | Dialogs: clean up native dialogs when object gets destroyed | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |