Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.15.11, 6.2.7
-
-
f0049873d (dev), ea50f0924 (6.5), c34af8f51 (6.6), 41389ce13 (tqtc/lts-6.2)
Description
Hello,
We found a bug related to Tear Off Menu handling.
If there are 3 levels of Menus that support tear off:
* tear off first menu
- tear of second level menu
- close first menu
- tear off third level menu
This will crash the application
This can be reproduced with Qt5 and Qt6. It looks like that QTornOffMenu holds a reference to its previously opend torn off off parent. As the flag Qt::WA_DeleteOnClose is set for QTornOffMenu, this reference is invalid, after closing the menu.
I attached a small sample program reproduces it. There is also small video showing steps to crash the example.
Attachments
For Gerrit Dashboard: QTBUG-112217 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
482123,3 | QMenu: don't crash when nested tear-off menus are closed | dev | qt/qtbase | Status: MERGED | +2 | 0 |
483614,2 | QMenu: don't crash when nested tear-off menus are closed | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |
483615,2 | QMenu: don't crash when nested tear-off menus are closed | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |
483620,3 | QMenu: don't crash when nested tear-off menus are closed | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |