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

Segfault in QQuickItemLayer destructor when accessibility is enabled

    XMLWordPrintable

    Details

    • Platform/s:
      Linux/X11
    • Sprint:
      Bug Fixing Candidates

      Description

      Qt Quick applications sometimes crash when accessibility (e.g. orca screen reader) is enabled. The segmentation fault happens in QQuickItemLayer destructor:

      #0  0x0000000000000000 in  ()
      #1  0x00007fffe8c2c937 in QQuickItemLayer::~QQuickItemLayer() (this=
          0x555555bfde90, __in_chrg=<optimized out>) at items/qquickitem.cpp:8338
      #2  0x00007fffe8c2c979 in QQuickItemLayer::~QQuickItemLayer()
          (this=0x555555bfde90, __in_chrg=<optimized out>) at items/qquickitem.cpp:8340
      #3  0x00007fffe8da4983 in QAccessibleQuickItem::role() const (this=0x555555c56630)
          at accessible/qaccessiblequickitem.cpp:215
      #4  0x00007ffff32388ca in AtSpiAdaptor::pathForInterface(QAccessibleInterface*) const
          (this=this@entry=0x555555c92400, interface=0x555555c56630) at atspiadaptor.cpp:1538
      #5  0x00007ffff323aa84 in AtSpiAdaptor::notifyStateChange(QAccessibleInterface*, QString const&, int) (this=this@entry=0x555555c92400, interface=<optimized out>, state=..., value=1)
          at atspiadaptor.cpp:873
      #6  0x00007ffff323c120 in AtSpiAdaptor::notify(QAccessibleEvent*)
          (this=0x555555c92400, event=0x7fffffffd6b0) at atspiadaptor.cpp:898
      #7  0x00007fffe8c3e968 in QQuickItemPrivate::setEffectiveVisibleRecur(bool)
          (this=this@entry=0x5555556b6980, newEffectiveVisible=<optimized out>)
          at items/qquickitem.cpp:6054
      #8  0x00007fffe8c421d9 in QQuickItem::setParentItem(QQuickItem*)
          (this=this@entry=0x555555bfde90, parentItem=parentItem@entry=0x0)
          at items/qquickitem.cpp:2710
      #9  0x00007fffe8c426b6 in QQuickItem::~QQuickItem()
          (this=0x555555bfde90, __in_chrg=<optimized out>) at items/qquickitem.cpp:2311
      

      The full stack trace is attached. Note that frames #1/#2 and #9 are different destructors of the same object.

      The issue is described in the following bugs:

      Both of them have test cases. The testcase from the first link is probably the easiest to reproduce.

      I did not check Qt 6, but the code has not changed in dev branch so it probably affects Qt 6 too.

        Attachments

        1. stacktrace.txt
          6 kB
        2. testcase.qml
          0.8 kB

          Issue Links

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

            Activity

              People

              Assignee:
              smd Jan Arve
              Reporter:
              mandriver Dmitry Shachnev
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes