Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.3.1, 6.5.2
-
None
-
Qt 6.5.2 and 6.3.1
Qt Creator 11.0.0
macOS 12.6.4
-
-
e66cbdf68 (dev), 3ef96cc18 (6.6), 09d561b07 (6.5), af43fa46d (tqtc/lts-6.2)
Description
There's a crash on macOS if the app loses focus immediately after a QMenu sub-menu item is selected. The QMenu has Qt::WA_DeleteOnClose set and is displayed using QMenu::Popup().
- Build and run the attached sample project. (20230731-1001.zip.)
- Click the Show menu button to show a context menu.
- Position the mouse cursor over a window from another app.
- Use the keyboard arrow keys to navigate to the Fruit > Apple sub-menu item.
- Press the space key (to select the menu item) and immediately click the left mouse button (to switch focus to the other app).
- The sample app crashes.
I've tested Qt 6.3.1 and 6.5.2 and the same happens in both.
Possibly related: QTBUG-82349.
Attachments
For Gerrit Dashboard: QTBUG-115597 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
496081,6 | Harden QMenuPrivate::hideMenu() against menu argument becoming stale | dev | qt/qtbase | Status: MERGED | +2 | 0 |
496415,2 | Harden QMenuPrivate::hideMenu() against menu argument becoming stale | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |
496416,2 | Harden QMenuPrivate::hideMenu() against menu argument becoming stale | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |
496418,2 | Harden QMenuPrivate::hideMenu() against menu argument becoming stale | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |