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

Crash in QV4::QObjectSlotDispatcher aka Loader does not disconnect signals

    XMLWordPrintable

Details

    • All

    Description

      Application will crash when signal is delivered to already deleted Item that was loaded through Loader.

      Example stack:

      ...
          frame #6: 0x00000001099d051f isllight`QV4::ArrowFunction::virtualCall(QV4::FunctionObject const*, QV4::Value const*, QV4::Value const*, int) + 367
          frame #7: 0x0000000109a0f1be isllight`QV4::QObjectSlotDispatcher::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) + 718
          frame #8: 0x0000000108f56102 isllight`void doActivate<false>(QObject*, int, void**) + 1138
          frame #9: 0x00000001090d07cf isllight`QGuiApplicationPrivate::processActivatedEvent(QWindowSystemInterfacePrivate::ActivatedWindowEvent*) + 927
          frame #10: 0x00000001090b7ee3 isllight`bool QWindowSystemInterfacePrivate::handleWindowSystemEvent<QWindowSystemInterface::SynchronousDelivery>(QWindowSystemInterfacePrivate::WindowSystemEvent*) + 115
          frame #11: 0x000000010985f63e isllight`QCocoaWindow::windowDidBecomeKey() + 238
      ...
          frame #13: 0x0000000109862dc1 isllight`___ZL30qRegisterNotificationCallbacksv_block_invoke + 2529
      ...
          frame #22: 0x00007fff2eb550ec AppKit`-[NSWindow becomeKeyWindow] + 1117
      

      Sample app - shows wrong behavior but does not crash: qt_bug_connect_crash.qml. There should be no CRASH string in console log.

      To reproduce application coredump connect qApp signal to a component initialized through QML Loader, switch source with QQuickView::setSource and issue the qApp signal.

      Attachments

        Issue Links

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

          Activity

            People

              qtqmlteam Qt Qml Team User
              gasper Gašper Lah
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes