Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.2.0 Beta4
-
None
-
-
45af5ef2f63704adc515e29260ad8c6aaf51f08e (qt/qtdeclarative/dev) e91051dd829522a157f5488344ab3ab347a1f971 (qt/qtdeclarative/6.2) 51e3aee67a (qt/tqtc-qtquickcontrols2/5.15)
Description
The attached app demonstrates a scenario where processing a shortcut key (delete) causes the application to crash due to a dangling pointer in QShortcutEntry::owner.
Please follow the instructions embedded in the app:
1. open New Page
2. close the page
3. press delete key
4. crash
You can avoid the crash by modifying the code as follows:
a. comment out shortcut
b. comment out MenuItem
Initial analysis shows that QShortcutEntry::owner pointer should be protected against unexpected deletion. In addition, there is a bug in the declarative side as well, because the shortcut entry is not properly cleared for MenuItem.
Attachments
Issue Links
- resulted from
-
QTBUG-96561 MenuItem does not clear shortcuts from GUI kernel
- Closed
For Gerrit Dashboard: QTBUG-96551 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
371180,4 | Wrap QShortcutEntry::owner into QPointer | dev | qt/qtbase | Status: ABANDONED | -1 | 0 |
371842,10 | QQuickAction: don't grab the same shortcut multiple times | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
372891,2 | QQuickAction: don't grab the same shortcut multiple times | 6.2 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
391016,2 | QQuickAction: don't grab the same shortcut multiple times | tqtc/lts-5.15 | qt/tqtc-qtquickcontrols2 | Status: MERGED | +2 | 0 |