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

Crash on QMessageBox destruction

    XMLWordPrintable

Details

    • macOS

    Description

      I can't reproduce it, but one of our users says that our application crashes under certain conditions. Sounds like some sort of a race condition bug.

      Here is the stack trace and exception info: 

      "exception" : {"codes":"0x000000000000000d, 0x0000000000000000","rawCodes":[13,0],"type":"EXC_BAD_ACCESS","signal":"SIGSEGV","subtype":"UNKNOWN_0xD at 0x0000000000000000"}
      typeinfo name for QMetaCallEvent
      QAccessible::setActive(bool)
      NSAccessibilityGetObjectForAttributeUsingLegacyAPI
      NSAccessibilityGetObjectValueForAttribute
      -[NSView accessibilityParent]
      -[NSAccessibilityAttributeAccessorInfo getAttributeValue:forObject:]
      ___NSAccessibilityEntryPointValueForAttribute_block_invoke.818
      NSAccessibilityPerformEntryPointObject
      _NSAccessibilityEntryPointValueForAttribute
      NSAccessibilityGetObjectForAttributeUsingLegacyAPI
      ___NSAccessibilityEntryPointValueForAttribute_block_invoke.818
      NSAccessibilityPerformEntryPointObject
      _NSAccessibilityEntryPointValueForAttribute
      -[NSWindow(NSWindowAccessibility) accessibilityFocusedUIElement]
      NSAccessibilityHandleFocusChangedForce
      -[NSWindow _realMakeFirstResponder:]
      QWindowPrivate::destroy()
      QWidgetPrivate::deleteTLSysExtra()
      QWidget::destroy(bool, bool)
      QWidget::~QWidget()
      QMessageBox::~QMessageBox()
      QObjectPrivate::deleteChildren()
      QObject::~QObject()
      QQuickItem::~QQuickItem()
      QObjectPrivate::deleteChildren()
      QObject::~QObject()
      QQuickItem::~QQuickItem()
      QObject::event(QEvent*)
      QApplicationPrivate::notify_helper(QObject*, QEvent*)
      QApplication::notify(QObject*, QEvent*)
      QCoreApplication::notifyInternal2(QObject*, QEvent*)
      QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)
      __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
      __CFRunLoopDoSource0
      __CFRunLoopDoSources0
      __CFRunLoopRun
      CFRunLoopRunSpecific
      RunCurrentEventLoopInMode
      ReceiveNextEventCommon
      _BlockUntilNextEventMatchingListInModeWithFilter
      _DPSNextEvent
      -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
      -[NSApplication run]
      QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
      QCoreApplication::exec()
      App::runImpl()
      App::run(bool)
      main
      start
      

      I've checked the code of QAccessible::setActive function. It seems that list of observers inside of qAccessibleActivationObservers can change while the code is calling observers' accessibilityActiveChanged callback. Thus it's getting invalid pointers and tries to call invalid objects then.

      Can anything be done to work around this?

       

       

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            alervd Alexander Dyagilev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes