Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.9.2
-
None
-
Only tested with macOS Sierra 12.6.
-
cbbf843e96de3067e4cb7c0a7b4e59a6c27b10f7
Description
Example reproducing the bug is attached. This is not a bug in 5.9.1, but in the latest git version (5.9 branch).
A Window object is defined in its own .qml file containing a shortcut to close itself. If the window is created with Qt.createComponent and the shortcut is pressed, the application crashes with call stack:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 org.qt-project.QtGui 0x0000000103e062a4 QPlatformWindow::window() const + 4
1 libqcocoa.dylib 0x00000001060288d8 -[QNSView handleKeyEvent:eventType:] + 744
2 libqcocoa.dylib 0x0000000106028bc8 -[QNSView keyDown:] + 88
3 com.apple.AppKit 0x00007fff881482cc -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 4086
4 com.apple.AppKit 0x00007fff88146f0a -[NSWindow(NSEventRouting) sendEvent:] + 541
5 libqcocoa.dylib 0x0000000106016937 -[QNSWindow superSendEvent:] + 39
6 libqcocoa.dylib 0x00000001060161f4 -[QNSWindowHelper handleWindowEvent:] + 564
7 com.apple.AppKit 0x00007fff87fcc4a8 -[NSApplication(NSEvent) sendEvent:] + 4768
8 libqcocoa.dylib 0x0000000106031bc9 -[QNSApplication sendEvent:] + 89
9 com.apple.AppKit 0x00007fff87846427 -[NSApplication run] + 1002
10 libqcocoa.dylib 0x000000010602e44d QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 2397
11 org.qt-project.QtCore 0x0000000104526da2 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 418
12 org.qt-project.QtCore 0x000000010452b742 QCoreApplication::exec() + 402
13 com.yourcompany.extra-window-bug 0x0000000103971016 main + 326 (main.cpp:14)
14 libdyld.dylib 0x00007fff9f4d8235 start + 1
Attachments
Issue Links
- relates to
-
QTBUG-59782 Qt.quit() exits immediately without sending a QCloseEvent
-
- Closed
-
For Gerrit Dashboard: QTBUG-63389 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
207025,4 | macOS: Bail out early when handling shortcut event results in closing window | 5.9 | qt/qtbase | Status: MERGED | +2 | 0 |
207098,1 | macOS: Bail out early when handling shortcut event results in closing window | 5.10 | qt/qtbase | Status: ABANDONED | 0 | 0 |