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

Q_ASSERT hit in QAccessible::registerAccessibleInterface

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • None
    • 5.6.1
    • None
    • OSX 10.10

    Description

      Our Qt 5.6.1 based application crashes on Macintosh in a particular situation. This is very reproducible, but it's unlikely that I'll be able to come up with a simplified example that I could post here.

      Here is the relevant call stack:

      1   __pthread_kill                                                                                                                                                                                         0x7fff8a0e3286 
      2   pthread_kill                                                                                                                                                                                           0x7fff8b5d19f9 
      3   abort                                                                                                                                                                                                  0x7fff82ec19ab 
      4   qt_message_fatal(QtMsgType, QMessageLogContext const&, QString const&)                                                                                                qlogging.cpp                1648 0x10b2d0988    
      5   QMessageLogger::fatal(const char *, ...) const                                                                                                                        qlogging.cpp                790  0x10b2d2cae    
      6   qt_assert(const char *, const char *, int)                                                                                                                            qglobal.cpp                 2999 0x10b2c8ed2    
      7   QAccessible::registerAccessibleInterface(QAccessibleInterface *)                                                                                                      qaccessible.cpp             739  0x10a511e82    
      8   QAccessible::uniqueId(QAccessibleInterface *)                                                                                                                         qaccessible.cpp             760  0x10a511f2c    
      9   QAccessibleEvent::uniqueId() const                                                                                                                                    qaccessible.cpp             1372 0x10a5126c1    
      10  QCocoaAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *)                                                                                                    qcocoaaccessibility.mm      56   0x11425dacc    
      11  QAccessible::updateAccessibility(QAccessibleEvent *)                                                                                                                  qaccessible.cpp             869  0x10a512192    
      12  QTableView::selectionChanged(QItemSelection const&, QItemSelection const&)                                                                                            qtableview.cpp              3336 0x109afe715    
      13  QAbstractItemView::qt_static_metacall(QObject *, QMetaObject::Call, int, void * *)                                                                                    moc_qabstractitemview.cpp   413  0x109abe37b    
      14  QMetaObject::activate(QObject *, int, int, void * *)                                                                                                                  qobject.cpp                 3730 0x10b61ca49    
      15  QMetaObject::activate(QObject *, QMetaObject const *, int, void * *)                                                                                                  qobject.cpp                 3595 0x10b61be9d    
      16  QItemSelectionModel::selectionChanged(QItemSelection const&, QItemSelection const&)                                                                                   moc_qitemselectionmodel.cpp 481  0x10b55182b    
      17  QItemSelectionModel::emitSelectionChanged(QItemSelection const&, QItemSelection const&)                                                                               qitemselectionmodel.cpp     1809 0x10b555e5f    
      18  QItemSelectionModel::select(QItemSelection const&, QFlags<QItemSelectionModel::SelectionFlag>)                                                                        qitemselectionmodel.cpp     1296 0x10b555d53    
      19  QItemSelectionModel::select(QModelIndex const&, QFlags<QItemSelectionModel::SelectionFlag>)                                                                           qitemselectionmodel.cpp     1157 0x10b5558c8    
      20  QItemSelectionModel::setCurrentIndex(QModelIndex const&, QFlags<QItemSelectionModel::SelectionFlag>)                                                                  qitemselectionmodel.cpp     1371 0x10b55689f    
      21  QAbstractItemView::setCurrentIndex(QModelIndex const&)                                                                                                                qabstractitemview.cpp       1064 0x109ab12a2    
      22  QAbstractItemViewPrivate::checkPersistentEditorFocus()                                                                                                                qabstractitemview.cpp       4254 0x109ab28de    
      23  QAbstractItemView::event(QEvent *)                                                                                                                                    qabstractitemview.cpp       1619 0x109ab27f2    
      24  QTableWidget::event(QEvent *)                                                                                                                                         qtablewidget.cpp            2672 0x109b46188    
      25  QApplicationPrivate::notify_helper(QObject *, QEvent *)                                                                                                               qapplication.cpp            3804 0x10973c39e    
      26  QApplication::notify(QObject *, QEvent *)                                                                                                                             qapplication.cpp            3767 0x109741771    
      27  IgorAppObject::notify(QObject *, QEvent *)                                                                                                                            IgorAppObject.cpp           803  0x100085dec    
      28  QCoreApplication::notifyInternal2(QObject *, QEvent *)                                                                                                                qcoreapplication.cpp        1015 0x10b5c9b48    
      29  QCoreApplication::sendEvent(QObject *, QEvent *)                                                                                                                      qcoreapplication.h          225  0x10972e1cc    
      30  QApplicationPrivate::setFocusWidget(QWidget *, Qt::FocusReason)                                                                                                       qapplication.cpp            1860 0x109739bc3    
      31  QWidget::setFocus(Qt::FocusReason)                                                                                                                                    qwidget.cpp                 6519 0x10979dd16    
      32  QApplicationPrivate::giveFocusAccordingToFocusPolicy(QWidget *, QEvent *, QPoint)                                                                                     qapplication.cpp            4290 0x109741abf    
      33  QApplication::notify(QObject *, QEvent *)                                                                                                                             qapplication.cpp            3230 0x10973e75e    
      34  IgorAppObject::notify(QObject *, QEvent *)                                                                                                                            IgorAppObject.cpp           803  0x100085dec    
      35  QCoreApplication::notifyInternal2(QObject *, QEvent *)                                                                                                                qcoreapplication.cpp        1015 0x10b5c9b48    
      36  QCoreApplication::sendSpontaneousEvent(QObject *, QEvent *)                                                                                                           qcoreapplication.h          228  0x109746301    
      37  QApplicationPrivate::sendMouseEvent(QWidget *, QMouseEvent *, QWidget *, QWidget *, QWidget * *, QPointer<QWidget>&, bool)                                            qapplication.cpp            2773 0x10973d2e3    
      38  QWidgetWindow::handleMouseEvent(QMouseEvent *)                                                                                                                        qwidgetwindow.cpp           602  0x1097d5e41    
      39  QWidgetWindow::event(QEvent *)                                                                                                                                        qwidgetwindow.cpp           233  0x1097d47ec    
      40  QApplicationPrivate::notify_helper(QObject *, QEvent *)                                                                                                               qapplication.cpp            3804 0x10973c39e    
      41  QApplication::notify(QObject *, QEvent *)                                                                                                                             qapplication.cpp            3163 0x10973e236    
      42  IgorAppObject::notify(QObject *, QEvent *)                                                                                                                            IgorAppObject.cpp           759  0x100085b49    
      43  QCoreApplication::notifyInternal2(QObject *, QEvent *)                                                                                                                qcoreapplication.cpp        1015 0x10b5c9b48    
      44  QCoreApplication::sendSpontaneousEvent(QObject *, QEvent *)                                                                                                           qcoreapplication.h          228  0x10a54d4a1    
      45  QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent *)                                                                                qguiapplication.cpp         1877 0x10a544c76    
      46  QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *)                                                                  qguiapplication.cpp         1661 0x10a54403d    
      47  QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>)                                                                                 qwindowsysteminterface.cpp  648  0x10a522b82    
      48  QCocoaEventDispatcherPrivate::processPostedEvents()                                                                                                                   qcocoaeventdispatcher.mm    884  0x11423d3f1    
      49  QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void *)                                                                                                      qcocoaeventdispatcher.mm    920  0x11423dee8    
      50  __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__                                                                                                                                             0x7fff8bf1da01 
      51  __CFRunLoopDoSources0                                                                                                                                                                                  0x7fff8bf0fb8d 
      52  __CFRunLoopRun                                                                                                                                                                                         0x7fff8bf0f1bf 
      53  CFRunLoopRunSpecific                                                                                                                                                                                   0x7fff8bf0ebd8 
      54  RunCurrentEventLoopInMode                                                                                                                                                                              0x7fff910d756f 
      55  ReceiveNextEventCommon                                                                                                                                                                                 0x7fff910d71ee 
      56  _BlockUntilNextEventMatchingListInModeWithFilter                                                                                                                                                       0x7fff910d712b 
      57  _DPSNextEvent                                                                                                                                                                                          0x7fff8930a8ab 
      58  -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]                                                                                                                                       0x7fff89309e58 
      59  -[NSApplication _realDoModalLoop:peek:]                                                                                                                                                                0x7fff894d5887 
      60  -[NSApplication runModalSession:]                                                                                                                                                                      0x7fff896ffe64 
      61  QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)                                                                                           qcocoaeventdispatcher.mm    399  0x11423c0e6    
      62  QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)                                                                                                      qeventloop.cpp              128  0x10b5c4aba    
      63  QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)                                                                                                               qeventloop.cpp              204  0x10b5c4cd6    
      64  QDialog::exec()                                                                                                                                                       qdialog.cpp                 541  0x109a1ead0    
      65  WMDialog::runDialog()                                                                                                                                                 WMDialog.cpp                1384 0x100372687    
      66  IgorAppObject::runWMDialogVariant(WMDialogVariant::DialogTypes)                                                                                                       IgorAppObject.cpp           4134 0x10008e7b1    
      67  BuiltinActions::doBuiltinActionCommand(eCommandID, QAction *, QVariant *)                                                                                             BuiltinActions.cpp          5223 0x1000a4112    
      68  BuiltinActions::doCommandFromSender()                                                                                                                                 BuiltinActions.cpp          874  0x1000a1cb4    
      69  QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (BuiltinActions:: *)()>::call(void (BuiltinActions:: *)(), BuiltinActions *, void * *) qobjectdefs_impl.h          501  0x1000da7e3    
      70  void QtPrivate::FunctionPointer<void (BuiltinActions:: *)()>::call<QtPrivate::List<>, void>(void (BuiltinActions:: *)(), BuiltinActions *, void * *)                  qobjectdefs_impl.h          520  0x1000da750    
      71  QtPrivate::QSlotObject<void (BuiltinActions:: *)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void * *, bool *)                    qobject_impl.h              143  0x1000da678    
      72  QtPrivate::QSlotObjectBase::call(QObject *, void * *)                                                                                                                 qobject_impl.h              124  0x10b620f16    
      73  QMetaObject::activate(QObject *, int, int, void * *)                                                                                                                  qobject.cpp                 3715 0x10b61c867    
      74  QMetaObject::activate(QObject *, QMetaObject const *, int, void * *)                                                                                                  qobject.cpp                 3595 0x10b61be9d    
      75  QAction::triggered(bool)                                                                                                                                              moc_qaction.cpp             372  0x10972cc7b    
      76  QAction::activate(QAction::ActionEvent)                                                                                                                               qaction.cpp                 1163 0x10972cab5    
      77  QAction::trigger()                                                                                                                                                    qaction.h                   177  0x10972f007    
      78  QAction::qt_static_metacall(QObject *, QMetaObject::Call, int, void * *)                                                                                              moc_qaction.cpp             207  0x10972d37f    
      79  QMetaObject::activate(QObject *, int, int, void * *)                                                                                                                  qobject.cpp                 3730 0x10b61ca49    
      80  QMetaObject::activate(QObject *, QMetaObject const *, int, void * *)                                                                                                  qobject.cpp                 3595 0x10b61be9d    
      81  QPlatformMenuItem::activated()                                                                                                                                        moc_qplatformmenu.cpp       172  0x10aa30572    
      82  QPlatformMenuItem::qt_static_metacall(QObject *, QMetaObject::Call, int, void * *)                                                                                    moc_qplatformmenu.cpp       108  0x10aa30456    
      83  QMetaCallEvent::placeMetaCall(QObject *)                                                                                                                              qobject.cpp                 495  0x10b612220    
      84  QObject::event(QEvent *)                                                                                                                                              qobject.cpp                 1256 0x10b614079    
      85  QApplicationPrivate::notify_helper(QObject *, QEvent *)                                                                                                               qapplication.cpp            3804 0x10973c39e    
      86  QApplication::notify(QObject *, QEvent *)                                                                                                                             qapplication.cpp            3163 0x10973e236    
      87  IgorAppObject::notify(QObject *, QEvent *)                                                                                                                            IgorAppObject.cpp           803  0x100085dec    
      88  QCoreApplication::notifyInternal2(QObject *, QEvent *)                                                                                                                qcoreapplication.cpp        1015 0x10b5c9b48    
      89  QCoreApplication::sendEvent(QObject *, QEvent *)                                                                                                                      qcoreapplication.h          225  0x10b5cea5c    
      90  QCoreApplicationPrivate::sendPostedEvents(QObject *, int, QThreadData *)                                                                                              qcoreapplication.cpp        1650 0x10b5cb047    
      91  QCoreApplication::sendPostedEvents(QObject *, int)                                                                                                                    qcoreapplication.cpp        1508 0x10b5ca4af    
      92  QCocoaEventDispatcherPrivate::processPostedEvents()                                                                                                                   qcocoaeventdispatcher.mm    883  0x11423d3de    
      93  QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void *)                                                                                                      qcocoaeventdispatcher.mm    920  0x11423dee8    
      94  __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__                                                                                                                                             0x7fff8bf1da01 
      95  __CFRunLoopDoSources0                                                                                                                                                                                  0x7fff8bf0fb8d 
      96  __CFRunLoopRun                                                                                                                                                                                         0x7fff8bf0f1bf 
      97  CFRunLoopRunSpecific                                                                                                                                                                                   0x7fff8bf0ebd8 
      98  RunCurrentEventLoopInMode                                                                                                                                                                              0x7fff910d756f 
      99  ReceiveNextEventCommon                                                                                                                                                                                 0x7fff910d71ee 
      100 _BlockUntilNextEventMatchingListInModeWithFilter                                                                                                                                                       0x7fff910d712b 
      101 _DPSNextEvent                                                                                                                                                                                          0x7fff8930a8ab 
      102 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]                                                                                                                                       0x7fff89309e58 
      103 -[NSApplication run]                                                                                                                                                                                   0x7fff892ffaf3 
      104 QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)                                                                                           qcocoaeventdispatcher.mm    416  0x11423c216    
      105 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)                                                                                                      qeventloop.cpp              128  0x10b5c4aba    
      106 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)                                                                                                               qeventloop.cpp              204  0x10b5c4cd6    
      107 QCoreApplication::exec()                                                                                                                                              qcoreapplication.cpp        1285 0x10b5ca364    
      108 QGuiApplication::exec()                                                                                                                                               qguiapplication.cpp         1607 0x10a543d66    
      109 QApplication::exec()                                                                                                                                                  qapplication.cpp            2979 0x10973da59    
      110 main                                                                                                                                                                  IgorQtMain.cpp              910  0x1029915fd    
      111 start                                                                                                                                                                                                  0x7fff8613f5c9 
      

      I believe the underlying source of the problem is in the following code in QAccessibleEvent::uniqueId():

      QAccessible::Id QAccessibleEvent::uniqueId() const
      {
          if (!m_object)
              return m_uniqueId;
          QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(m_object);
          if (!iface)
              return 0;
          if (m_child != -1)
              iface = iface->child(m_child);
          return QAccessible::uniqueId(iface);
      }
      

      In my situation, iface is getting set to 0 at the following line (m_child is 6, for what that's worth):

         iface = iface->child(m_child);
      

      It seems to me that iface should be checked after this line as well, and if it's 0 then the function should return.

      Attachments

        Issue Links

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

          Activity

            People

              frederik Frederik Gladhorn
              aclight Adam Light
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes