Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-63389

Shortcut in Window in QML-file crashes if it closes window

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.9.2
    • Fix Version/s: 5.9.3
    • Component/s: GUI: Window management
    • Labels:
      None
    • Environment:
      Only tested with macOS Sierra 12.6.
    • Commits:
      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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              srutledg Shawn Rutledge
              Reporter:
              anderhaf Anders Hafreager
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes