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

Accessibility in QWebEngine crashes application

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 6.5.0 Beta1
    • 6.2.4, 6.3.1, 6.3.2, 6.4.0 Beta4
    • WebEngine
    • None
    • macOS Monterey 12.4 (21F79)
      MacBook Pro (16-inch, 2019)
    • macOS, Windows
    • a79afbeaa0 (qt/qtwebengine/dev) b18ed7089f (qt/qtwebengine/6.4) 1d123e0301 (qt/qtwebengine/6.3) 1d123e0301 (qt/tqtc-qtwebengine/6.3) b18ed7089f (qt/tqtc-qtwebengine/6.4)

    Description

      In our software we are experiencing a crash in the accessibility wrapper for the webengine. If a QWebEnginePage loads a website without being added to a QWebEngineView, triggering the accessibility will cause a nullptr dereference of the parent in the BrowserAccessibilityInterface's init.

       

      void BrowserAccessibilityInterface::init()
      {
          if (m_id)
              return;
      
          Q_ASSERT(parent());
          Q_ASSERT(parent()->object());
      
          m_object = new QObject(parent()->object());    <--- parent() is nullptr
          QString name = toQt(q->GetAuthorUniqueId());
          if (!name.isEmpty())
              m_object->setObjectName(name);
      
          m_id = QAccessible::registerAccessibleInterface(this);
      }
      

       

      The bug can be reproduced with the sample project added to the ticket. On MacOS the accessibility can be easily triggered e.g. with the accessibility zoom feature. What I usually do is zooming in the super screen with the scroll gesture and then open a window or menu, which will cause a crash of the application.

      Our crash logs also show that the bug happens on Windows.

      Attachments

        1. accessibility-sandbox.zip
          3 kB
          Victor Jungbluth
        2. Screenshot 2022-09-13 at 11.15.15.png
          471 kB
          Victor Jungbluth

        Issue Links

          For Gerrit Dashboard: QTBUG-106588
          # Subject Branch Project Status CR V

          Activity

            People

              allan.jensen Allan Sandfeld Jensen
              vjungbluth Victor Jungbluth
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes