Bug 464893

Summary: Crash in AtSpiAdaptor::pathForInterface() on quit or when switching pages
Product: [Applications] plasma-systemmonitor Reporter: Deivid Mendonca <deividp>
Component: generalAssignee: KSysGuard Developers <ksysguard-bugs>
Status: RESOLVED FIXED    
Severity: crash CC: ahiemstra, chrisverilz, csandrade87, deverassilva, guilherme, jdkatz23, leonardodasilva1915, leonny02, marianpoltak, most2k2, mrzyglodjasiu, nate, plasma-bugs, raykov_p, rooksy, sephiroth_pk, truwrecks
Priority: VHI Keywords: drkonqi
Version: 5.26.5   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=426047
Latest Commit: Version Fixed In: 6.0
Sentry Crash Report:
Attachments: Crash report

Description Deivid Mendonca 2023-01-27 10:27:04 UTC
Application: plasma-systemmonitor (5.26.5)

Qt Version: 5.15.8
Frameworks Version: 5.102.0
Operating System: Linux 5.15.0-58-generic x86_64
Windowing System: X11
Distribution: KDE neon 5.26
DrKonqi: 5.26.5 [KCrashBackend]

-- Information about the crash:
Opened the system monitor and navigated between the tabs normally, but after closing the system monitor an error was displayed

The crash can be reproduced sometimes.

-- Backtrace:
Application: Monitor do sistema (plasma-systemmonitor), signal: Segmentation fault

[KCrash Handler]
#4  0x00007fae1e26587b in QQmlData::destroyed (this=0x55e9c897b5c0, object=0x55e9c897b5a0) at qml/qqmlengine.cpp:1905
#5  0x00007fae1cc4ee2b in QObject::~QObject (this=<optimized out>, __in_chrg=<optimized out>) at kernel/qobject.cpp:1019
#6  0x00007fae1336937d in QQuickItemLayer::~QQuickItemLayer (this=0x55e9c897b5a0, __in_chrg=<optimized out>) at items/qquickitem.cpp:8459
#7  0x00007fae134f4f57 in QAccessibleQuickItem::role (this=0x55e9c8a5a3f0) at ../../include/QtQuick/../../src/quick/items/qquickitem.h:468
#8  0x00007fae18d0674a in AtSpiAdaptor::pathForInterface (this=this@entry=0x55e9c7546180, interface=0x55e9c8a5a3f0) at ./src/platformsupport/linuxaccessibility/atspiadaptor.cpp:1586
#9  0x00007fae18d094c8 in AtSpiAdaptor::notifyStateChange (this=this@entry=0x55e9c7546180, interface=<optimized out>, state=..., value=1) at ./src/platformsupport/linuxaccessibility/atspiadaptor.cpp:878
#10 0x00007fae18d0acf2 in AtSpiAdaptor::notify (this=0x55e9c7546180, event=<optimized out>) at ./src/platformsupport/linuxaccessibility/atspiadaptor.cpp:903
#11 0x00007fae1337794b in QQuickItemPrivate::setEffectiveVisibleRecur (this=this@entry=0x55e9c8af3480, newEffectiveVisible=<optimized out>) at items/qquickitem.cpp:6121
#12 0x00007fae1337f216 in QQuickItem::setParentItem (this=this@entry=0x55e9c897b5a0, parentItem=parentItem@entry=0x0) at items/qquickitem.cpp:2737
#13 0x00007fae1337f761 in QQuickItem::~QQuickItem (this=this@entry=0x55e9c897b5a0, __in_chrg=<optimized out>) at items/qquickitem.cpp:2335
#14 0x00007fae129d04a7 in QQuickControl::~QQuickControl (this=this@entry=0x55e9c897b5a0, __in_chrg=<optimized out>) at ./src/quicktemplates2/qquickcontrol.cpp:1001
#15 0x00007fae129b12c3 in QQuickAbstractButton::~QQuickAbstractButton (this=this@entry=0x55e9c897b5a0, __in_chrg=<optimized out>) at ./src/quicktemplates2/qquickabstractbutton.cpp:479
#16 0x00007fadf5eb8f02 in QQuickButton::~QQuickButton (this=0x55e9c897b5a0, __in_chrg=<optimized out>) at ../../../include/QtQuickTemplates2/5.15.8/QtQuickTemplates2/private/../../../../../src/quicktemplates2/qquickbutton_p.h:57
#17 QQuickToolButton::~QQuickToolButton (this=0x55e9c897b5a0, __in_chrg=<optimized out>) at ../../../include/QtQuickTemplates2/5.15.8/QtQuickTemplates2/private/../../../../../src/quicktemplates2/qquicktoolbutton_p.h:55
#18 QQmlPrivate::QQmlElement<QQuickToolButton>::~QQmlElement (this=0x55e9c897b5a0, __in_chrg=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtQml/qqmlprivate.h:144
#19 QQmlPrivate::QQmlElement<QQuickToolButton>::~QQmlElement (this=0x55e9c897b5a0, __in_chrg=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtQml/qqmlprivate.h:144
#20 0x00007fadf62baa60 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/libKirigamiPlugin.so
#21 0x00007fadf62bab1a in ?? () from /usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/libKirigamiPlugin.so
#22 0x00007fadf62baee0 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/libKirigamiPlugin.so
#23 0x00007fae1cc510d4 in QtPrivate::QSlotObjectBase::call (a=0x7ffde9d9a5c0, r=0x55e9c8479610, this=0x55e9c857ec50) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#24 doActivate<false> (sender=0x55e9c8621b60, signal_index=0, argv=0x7ffde9d9a5c0) at kernel/qobject.cpp:3923
#25 0x00007fae1cc4a177 in QMetaObject::activate (sender=sender@entry=0x55e9c8621b60, m=m@entry=0x7fae1ceb1140 <QObject::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffde9d9a5c0) at kernel/qobject.cpp:3983
#26 0x00007fae1cc4a233 in QObject::destroyed (this=this@entry=0x55e9c8621b60, _t1=<optimized out>, _t1@entry=0x55e9c8621b60) at .moc/moc_qobject.cpp:219
#27 0x00007fae1cc4f3e7 in QObject::~QObject (this=this@entry=0x55e9c8621b60, __in_chrg=<optimized out>) at kernel/qobject.cpp:1010
#28 0x00007fae129b41de in QQuickAction::~QQuickAction (this=this@entry=0x55e9c8621b60, __in_chrg=<optimized out>) at ./src/quicktemplates2/qquickaction.cpp:360
#29 0x00007fadf5eb7d4f in QQmlPrivate::QQmlElement<QQuickAction>::~QQmlElement (this=0x55e9c8621b60, __in_chrg=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtQml/qqmlprivate.h:144
#30 QQmlPrivate::QQmlElement<QQuickAction>::~QQmlElement (this=0x55e9c8621b60, __in_chrg=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtQml/qqmlprivate.h:144
#31 0x00007fae1cc4411e in QObjectPrivate::deleteChildren (this=0x55e9c8574ce0) at kernel/qobject.cpp:2137
#32 0x00007fae1cc4f1a6 in QObject::~QObject (this=<optimized out>, __in_chrg=<optimized out>) at kernel/qobject.cpp:1115
#33 0x00007fadf4c62e09 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/ksysguard/faces/libFacesPlugin.so
#34 0x00007fae1cc4411e in QObjectPrivate::deleteChildren (this=0x55e9c8572110) at kernel/qobject.cpp:2137
#35 0x00007fae1cc4f1a6 in QObject::~QObject (this=<optimized out>, __in_chrg=<optimized out>) at kernel/qobject.cpp:1115
#36 0x00007fadf5f67e6d in KSysGuard::SensorFaceController::~SensorFaceController() () from /lib/x86_64-linux-gnu/libKSysGuardSensorFaces.so.1
#37 0x00007fae1cc4411e in QObjectPrivate::deleteChildren (this=0x55e9c6acce50) at kernel/qobject.cpp:2137
#38 0x00007fae1cc4f1a6 in QObject::~QObject (this=this@entry=0x7ffde9d9aa20, __in_chrg=<optimized out>) at kernel/qobject.cpp:1115
#39 0x00007fae1e0fbb5e in QJSEngine::~QJSEngine (this=this@entry=0x7ffde9d9aa20, __in_chrg=<optimized out>) at jsapi/qjsengine.cpp:371
#40 0x00007fae1e267320 in QQmlEngine::~QQmlEngine (this=this@entry=0x7ffde9d9aa20, __in_chrg=<optimized out>) at qml/qqmlengine.cpp:1030
#41 0x00007fae1e2db53c in QQmlApplicationEngine::~QQmlApplicationEngine (this=this@entry=0x7ffde9d9aa20, __in_chrg=<optimized out>) at qml/qqmlapplicationengine.cpp:272
#42 0x000055e9c526dc50 in main (argc=<optimized out>, argv=<optimized out>) at ./src/main.cpp:165
[Inferior 1 (process 6999) detached]

The reporter indicates this bug may be a duplicate of or related to bug 438759, bug 460334.

Reported using DrKonqi
Comment 1 Nate Graham 2023-01-27 19:49:12 UTC
Are you using any accessibility tools?
Comment 2 Deivid Mendonca 2023-01-30 18:49:39 UTC
(In reply to Nate Graham from comment #1)
> Are you using any accessibility tools?

audible bell
I didn't manually enable anything, in theory, it's as it is by default in the installation, but checking I found the audible bell option enabled. However, I disabled it to test and the error remained.
Comment 3 Nate Graham 2023-02-12 17:08:33 UTC
*** Bug 465507 has been marked as a duplicate of this bug. ***
Comment 4 Nicolas Fella 2023-04-14 11:52:04 UTC
*** Bug 468473 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2023-04-21 20:55:36 UTC
Looks like essentially same issue as Bug 426047, but in a different app.

Perhaps a Qt bug...
Comment 6 Nate Graham 2023-09-28 19:57:38 UTC
*** Bug 473688 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2023-09-28 19:57:43 UTC
*** Bug 474985 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2023-09-29 18:38:10 UTC
*** Bug 475023 has been marked as a duplicate of this bug. ***
Comment 9 Riccardo Robecchi 2023-10-17 16:30:15 UTC
Created attachment 162375 [details]
Crash report

Same here. The crash is always reproducible when changing tabs. Weirdly, it only happens on my tablet and it works fine on all my other devices.

Linux: KDE Neon
KDE Plasma version: 5.27.8
KDE Frameworks version: 5.110.0
Qt version: 5.15.11
Comment 10 Arjen Hiemstra 2023-10-18 13:13:05 UTC
I found an upstream bugreport about this: https://bugreports.qt.io/browse/QTBUG-84858 . The marked bugreport is closed but the fix mentioned there is incomplete and things can still crash. That said, I do now know how to workaround it.
Comment 11 Bug Janitor Service 2023-10-18 13:21:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-systemmonitor/-/merge_requests/235
Comment 12 Arjen Hiemstra 2023-10-26 14:34:19 UTC
Git commit 5f1e762a8b93e36bae7b5d1e856b04682d4aa66c by Arjen Hiemstra.
Committed on 26/10/2023 at 16:32.
Pushed by ahiemstra into branch 'master'.

Workaround QTBUG-84858

In certain cases destroying a table cell will end up calling a virtual
method incorrectly. This was partially fixed upstream but only when the
Accessible attached object exists. To workaround the upstream bug,
ensure we create an instance of the attached object. As a bonus, this
also means we now set the right accessible role for table cells.

M  +3    -0    src/table/BaseCellDelegate.qml

https://invent.kde.org/plasma/plasma-systemmonitor/-/commit/5f1e762a8b93e36bae7b5d1e856b04682d4aa66c
Comment 13 Arjen Hiemstra 2023-11-03 09:27:31 UTC
*** Bug 476488 has been marked as a duplicate of this bug. ***
Comment 14 Arjen Hiemstra 2023-11-20 13:32:37 UTC
*** Bug 477182 has been marked as a duplicate of this bug. ***
Comment 15 Arjen Hiemstra 2023-12-21 11:08:23 UTC
*** Bug 475712 has been marked as a duplicate of this bug. ***
Comment 16 Arjen Hiemstra 2024-02-01 13:24:06 UTC
*** Bug 480347 has been marked as a duplicate of this bug. ***
Comment 17 Arjen Hiemstra 2024-02-01 13:24:24 UTC
*** Bug 480222 has been marked as a duplicate of this bug. ***
Comment 18 Arjen Hiemstra 2024-02-05 11:52:20 UTC
*** Bug 480774 has been marked as a duplicate of this bug. ***
Comment 19 Arjen Hiemstra 2024-02-05 11:52:43 UTC
*** Bug 480865 has been marked as a duplicate of this bug. ***
Comment 20 Arjen Hiemstra 2024-02-05 14:47:27 UTC
*** Bug 480903 has been marked as a duplicate of this bug. ***
Comment 21 Arjen Hiemstra 2024-02-07 12:46:34 UTC
*** Bug 480980 has been marked as a duplicate of this bug. ***
Comment 22 Arjen Hiemstra 2024-02-12 11:06:53 UTC
Git commit 7d0cd220ff76bf001189fc32c466ff4f51869cd6 by Arjen Hiemstra.
Committed on 12/02/2024 at 11:05.
Pushed by ahiemstra into branch 'Plasma/5.27'.

Workaround QTBUG-84858

In certain cases destroying a table cell will end up calling a virtual
method incorrectly. This was partially fixed upstream but only when the
Accessible attached object exists. To workaround the upstream bug,
ensure we create an instance of the attached object. As a bonus, this
also means we now set the right accessible role for table cells.
(cherry picked from commit 5f1e762a8b93e36bae7b5d1e856b04682d4aa66c)

M  +3    -0    src/table/BaseCellDelegate.qml

https://invent.kde.org/plasma/plasma-systemmonitor/-/commit/7d0cd220ff76bf001189fc32c466ff4f51869cd6
Comment 23 Arjen Hiemstra 2024-02-15 10:04:16 UTC
*** Bug 481348 has been marked as a duplicate of this bug. ***