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

Accessibility becomes disabled in QQuickTextEdit.(Crashed with Qt 6.6.3)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 6.6.3, 6.7.1
    • None
    • Windows 11 Pro, Qt 6.7.1 MSVC 2019 64bit
    • Windows

    Description

      There is an issue where qmlAttachedPropertiesObject<QQuickAccessibleAttached>

      may consistently return nullptr.

       

      When debugging textedit_bug.zipin Qt 6.7.1, within the

      QQuickTextEditPrivate::accessibilityActiveChanged 
      

      function, the accessibleAttached variable is found to be nullptr.

       

      The function

      template<typename T> QObject *qmlAttachedPropertiesObject(const QObject *obj, bool create = true)
      

      is initially called from QtWebEngine, causing the const static variable func to be nullptr because the QML engine is not initialized.

       

      backtrace is:

      1   qmlAttachedPropertiesObject<QQuickAccessibleAttached>                qqml.h                                       670  0x7ffbca64fa4a 
      2   QQuickAccessibleAttached::attachedProperties                         qquickaccessibleattached_p.h                 118  0x7ffbca650fc6 
      3   QQuickAccessibleAttached::findAccessible                             qquickaccessibleattached_p.h                 142  0x7ffbca651c70 
      4   QQuickItem::geometryChange                                           qquickitem.cpp                               3896 0x7ffbca6cd2c8 
      5   QtWebEngineCore::RenderWidgetHostViewQtDelegateItem::geometryChange  render_widget_host_view_qt_delegate_item.cpp 313  0x7ffb5d298e28 
      6   QQuickItem::setSize                                                  qquickitem.cpp                               7685 0x7ffbca6c5e59 
      7   QtWebEngineCore::RenderWidgetHostViewQtDelegateItem::resize          render_widget_host_view_qt_delegate_item.cpp 135  0x7ffb5d29ae08 
      8   QtWebEngineCore::RenderWidgetHostViewQt::SetSize                     render_widget_host_view_qt.cpp               274  0x7ffb5d274bf1 
      9   content::WebContentsImpl::CreateRenderWidgetHostViewForRenderManager web_contents_impl.cc                         8635 0x7ffb6974ec50 
      10  content::WebContentsImpl::CreateRenderViewForRenderManager           web_contents_impl.cc                         8657 0x7ffb6974e5b4 
      11  QtWebEngineCore::WebContentsAdapter::initialize                      web_contents_adapter.cpp                     512  0x7ffb5d338bf2 
      12  QtWebEngineCore::WebContentsAdapter::load                            web_contents_adapter.cpp                     643  0x7ffb5d33a625 
      13  QtWebEngineCore::WebContentsAdapter::load                            web_contents_adapter.cpp                     633  0x7ffb5d33a529 
      14  QWebEnginePage::load                                                 qwebenginepage.cpp                           1880 0x7ffb5cfdef93 
      15  QWebEnginePage::setUrl                                               qwebenginepage.cpp                           1935 0x7ffb5cfdf3f8 
      16  QWebEngineView::setUrl                                               qwebengineview.cpp                           1104 0x7ffc11338bce 
      17  main                                                                 main.cpp                                     13   0x7ff7ff162bdf 
      18  qtEntryPoint                                                         qtentrypoint_win.cpp                         50   0x7ff7ff167477 
      19  WinMain                                                              qtentrypoint_win.cpp                         60   0x7ff7ff16727e 
      20  invoke_main                                                          exe_common.inl                               107  0x7ff7ff165382 
      ...
      

      I think this behavior is likely related to the change in QWebEngineView::load to synchronous processing.

       

      In Qt 6.5.5, qmlAttachedPropertiesObject<QQuickAccessibleAttached> returns a valid pointer.

       

      In Qt 6.6.3 and Qt 6.7.0, this leads to a crash due to null pointer dereference. The following commits are related:

       

      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
            ayamamoto Atsushi Yamamoto
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes