Bug 482198 - System Monitor crashes when discarding changes on edit page
Summary: System Monitor crashes when discarding changes on edit page
Status: RESOLVED FIXED
Alias: None
Product: plasma-systemmonitor
Classification: Applications
Component: general (show other bugs)
Version: 6.0.3
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords: qt6
: 482726 482849 483085 483922 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-03-01 22:08 UTC by Abigail Regina
Modified: 2024-03-31 20:13 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0.4


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Abigail Regina 2024-03-01 22:08:57 UTC
SUMMARY
When trying to edit the overview page in System Monitor and then click discard changes, the application crashes immediately after.

STEPS TO REPRODUCE
1. Open System Monitor
2. Click on "Edit Page"
3. Click on "Discard Changes"

OBSERVED RESULT
System Monitor displays a gear loading icon and then immediately crashes.

EXPECTED RESULT
To go back to Overview; discarding changes without a crash.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux 6.7.6-arch1-2
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Comment 1 Dashon 2024-03-04 12:32:58 UTC
Same here using endeavourOS / arch. 
Here is a backtrace:
Thread 1 "plasma-systemmo" received signal SIGSEGV, Segmentation fault.
std::atomic<QObjectPrivate::ConnectionData*>::load(std::memory_order) const [clone .constprop.0] (this=0x10000005f, __m=std::memory_order_relaxed) at /usr/include/c++/13.2.1/atomic:577
577	      { return _M_b.load(__m); }
#0  std::atomic<QObjectPrivate::ConnectionData*>::load(std::memory_order) const [clone .constprop.0] (this=0x10000005f, __m=std::memory_order_relaxed) at /usr/include/c++/13.2.1/atomic:577
#1  0x00007ffff617b0d7 in QAtomicOps<QObjectPrivate::ConnectionData*>::loadRelaxed<QObjectPrivate::ConnectionData*> (_q_value=<error reading variable: Cannot access memory at address 0x10000005f>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/thread/qatomic_cxx11.h:199
#2  QBasicAtomicPointer<QObjectPrivate::ConnectionData>::loadRelaxed (this=0x10000005f) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/thread/qbasicatomic.h:172
#3  QObjectPrivate::ensureConnectionData (this=0xffffffff) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobject.cpp:285
#4  QObjectPrivate::addConnection (this=0xffffffff, signal=3, c=0x5555586b9990) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobject.cpp:305
#5  0x00007ffff6184291 in QObjectPrivate::connectImpl (sender=sender@entry=0x5555562d4c00, signal_index=<optimized out>, receiver=receiver@entry=0x5555581c7070, slot=slot@entry=0x7fffffffd420, slotObjRaw=slotObjRaw@entry=0x5555575f2a30, type=<optimized out>, types=<optimized out>, senderMetaObject=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/tools/qscopedpointer.h:110
#6  0x00007ffff618460b in QObject::connectImpl (sender=sender@entry=0x5555562d4c00, signal=signal@entry=0x7fffffffd440, receiver=receiver@entry=0x5555581c7070, slot=slot@entry=0x7fffffffd420, slotObjRaw=0x5555575f2a30, type=Qt::AutoConnection, types=0x0, senderMetaObject=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobject.cpp:5111
#7  0x00007fffe8048764 in QObject::connect<void (KSysGuard::SensorFaceController::*)(), void (PageDataObject::*)()> (type=Qt::AutoConnection, slot=@0x7fffffffd420: (void (PageDataObject::*)(PageDataObject * const)) 0x7fffe8042080 <PageDataObject::markDirty()>, context=0x5555581c7070, signal=(void (KSysGuard::SensorFaceController::*)(KSysGuard::SensorFaceController * const)) 0x7fffe80221d0 <KSysGuard::SensorFaceController::faceIdChanged()>, sender=0x5555562d4c00) at /usr/include/qt6/QtCore/qobject.h:240
#8  FaceLoader::setDataObject (this=<optimized out>, newDataObject=<optimized out>) at /usr/src/debug/plasma-systemmonitor/plasma-systemmonitor-6.0.0/src/page/FaceLoader.cpp:71
#9  0x00007ffff7231298 in QQmlPropertyData::writeProperty (this=<optimized out>, target=<optimized out>, value=<optimized out>, flags=...) at /usr/src/debug/qt6-declarative/qtdeclarative-everywhere-src-6.6.2/src/qml/qml/qqmlpropertydata_p.h:298
#10 0x00007ffff723ce88 in QObjectPointerBinding::compareAndSet<QObjectPointerBinding::write(QV4::Value const&, bool, QFlags<QQmlPropertyData::WriteFlag>)::{lambda()#1}>(QQmlMetaObject const&, QObject*, QQmlPropertyData const*, QFlags<QQmlPropertyData::WriteFlag>, QObjectPointerBinding::write(QV4::Value const&, bool, QFlags<QQmlPropertyData::WriteFlag>)::{lambda()#1} const&) const (slowWrite=<optimized out>, flags=..., pd=0x7fffd477ca00, resultObject=<optimized out>, resultMo=<synthetic pointer>..., this=0x5555583cc6d0) at /usr/src/debug/qt6-declarative/qtdeclarative-everywhere-src-6.6.2/src/qml/qml/qqmlbinding.cpp:821
#11 QObjectPointerBinding::write (this=0x5555583cc6d0, result=..., isUndefined=<optimized out>, flags=...) at /usr/src/debug/qt6-declarative/qtdeclarative-everywhere-src-6.6.2/src/qml/qml/qqmlbinding.cpp:803
#12 0x00007ffff72452ea in QQmlBinding::doUpdate (this=0x5555583cc6d0, watcher=..., flags=..., scope=...) at /usr/src/debug/qt6-declarative/qtdeclarative-everywhere-src-6.6.2/src/qml/qml/qqmlbinding.cpp:700
#13 0x00007ffff7243d04 in QQmlBinding::update (this=0x5555583cc6d0, flags=...) at /usr/src/debug/qt6-declarative/qtdeclarative-everywhere-src-6.6.2/src/qml/qml/qqmlbinding.cpp:164
#14 0x00007ffff72d7093 in QQmlObjectCreator::finalize (this=0x5555595e1a50, interrupt=...) at /usr/src/debug/qt6-declarative/qtdeclarative-everywhere-src-6.6.2/src/qml/qml/qqmlobjectcreator.cpp:1462
#15 0x00007ffff72ae867 in QQmlIncubatorPrivate::incubate (this=<optimized out>, i=...) at /usr/include/qt6/QtCore/qscopedpointer.h:90
#16 0x00007ffff72afb70 in QQmlIncubationController::incubateFor (msecs=<optimized out>, this=0x7fffd4106760) at /usr/src/debug/qt6-declarative/qtdeclarative-everywhere-src-6.6.2/src/qml/qml/ftw/qintrusivelist_p.h:180
#17 QQmlIncubationController::incubateFor (this=this@entry=0x7fffd4106760, msecs=<optimized out>) at /usr/src/debug/qt6-declarative/qtdeclarative-everywhere-src-6.6.2/src/qml/qml/qqmlincubator.cpp:419
#18 0x00007ffff0428abf in QQuickWindowIncubationController::incubate (this=0x7fffd4106750) at /usr/src/debug/qt6-declarative/qtdeclarative-everywhere-src-6.6.2/src/quick/items/qquickwindow.cpp:112
#19 QQuickWindowIncubationController::timerEvent (this=0x7fffd4106750) at /usr/src/debug/qt6-declarative/qtdeclarative-everywhere-src-6.6.2/src/quick/items/qquickwindow.cpp:95
#20 0x00007ffff617c236 in QObject::event (this=0x7fffd4106750, e=0x7fffffffdb70) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobject.cpp:1414
#21 0x00007ffff76f438b in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x7fffd4106750, e=0x7fffffffdb70) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/widgets/kernel/qapplication.cpp:3296
#22 0x00007ffff6139818 in QCoreApplication::notifyInternal2 (receiver=0x7fffd4106750, event=0x7fffffffdb70) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:1121
#23 0x00007ffff629efa6 in QCoreApplication::sendEvent (event=0x7fffffffdb70, receiver=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:1539
#24 QTimerInfoList::activateTimers (this=0x555555669df0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qtimerinfo_unix.cpp:507
#25 0x00007ffff63756dc in timerSourceDispatch (source=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventdispatcher_glib.cpp:149
#26 0x00007ffff5521f69 in g_main_dispatch (context=0x7fffec000ef0) at ../glib/glib/gmain.c:3476
#27 0x00007ffff55803a7 in g_main_context_dispatch_unlocked (context=0x7fffec000ef0) at ../glib/glib/gmain.c:4284
#28 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x7fffec000ef0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4349
#29 0x00007ffff5520162 in g_main_context_iteration (context=0x7fffec000ef0, may_block=1) at ../glib/glib/gmain.c:4414
#30 0x00007ffff63739c4 in QEventDispatcherGlib::processEvents (this=0x5555555d2bd0, flags=...) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventdispatcher_glib.cpp:393
#31 0x00007ffff6143d6e in QEventLoop::processEvents (flags=..., this=0x7fffffffde40) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventloop.cpp:100
#32 QEventLoop::exec (this=0x7fffffffde40, flags=...) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventloop.cpp:182
#33 0x00007ffff613c2b8 in QCoreApplication::exec () at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/global/qflags.h:74
#34 0x00007ffff76f0f0a in QApplication::exec () at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/widgets/kernel/qapplication.cpp:2574
#35 0x000055555555d2a0 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/plasma-systemmonitor/plasma-systemmonitor-6.0.0/src/main.cpp:116

System Info:
Operating System: EndeavourOS 
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.7.6-zen1-2-zen (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 62.7 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3080/PCIe/SSE2
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7C95
System Version: 1.0
Comment 2 Nate Graham 2024-03-05 22:21:52 UTC
Can reproduce.
Comment 3 Nate Graham 2024-03-07 21:47:21 UTC
*** Bug 482726 has been marked as a duplicate of this bug. ***
Comment 4 duha.bugs 2024-03-09 11:09:15 UTC
*** Bug 482849 has been marked as a duplicate of this bug. ***
Comment 5 duha.bugs 2024-03-10 09:13:03 UTC
*** Bug 483085 has been marked as a duplicate of this bug. ***
Comment 6 Bug Janitor Service 2024-03-15 15:29:17 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-systemmonitor/-/merge_requests/269
Comment 7 Arjen Hiemstra 2024-03-18 11:59:00 UTC
Git commit 64c366458ce2064c0758562f634b75c7f72fc5ea by Arjen Hiemstra.
Committed on 18/03/2024 at 11:55.
Pushed by ahiemstra into branch 'master'.

page: Store FaceController cache in QPointer

To make sure that we track deletion of FaceControllers if they get
destroyed.

M  +8    -2    src/page/FaceLoader.cpp
M  +3    -3    src/page/FaceLoader.h

https://invent.kde.org/plasma/plasma-systemmonitor/-/commit/64c366458ce2064c0758562f634b75c7f72fc5ea
Comment 8 Arjen Hiemstra 2024-03-19 09:36:54 UTC
*** Bug 483922 has been marked as a duplicate of this bug. ***
Comment 9 Dashon 2024-03-30 18:22:17 UTC
I was retesting various bugs that were fixed in 6.0.3 which just landed in Arch and this problem is still happening. The reproduction steps by the OP are still reproducible. Qt 6.6.3 is in the testing repositories and will probably land soon, so maybe that is a requirement for this actually being fixed. Anyways to reiterate the reproduction steps for this are as follows:
1. Open system monitor
2. Click on "Edit Page"
3. Click on "Discard Changes"
Comment 10 Dashon 2024-03-30 18:40:34 UTC
Qt 6.6.3 Doesn't solve the problem either
Comment 11 Dashon 2024-03-30 19:12:30 UTC
I went and built plasma system monitor from git master and the issue has indeed been fixed. Either something is wrong with the arch package for plasma-system-monitor version 6.0.3 or something wasn't cherry picked to the 6.0.3 bug fix release.
Comment 12 bugsie 2024-03-31 20:09:10 UTC
(In reply to Dashon from comment #11)
> I went and built plasma system monitor from git master and the issue has
> indeed been fixed. Either something is wrong with the arch package for
> plasma-system-monitor version 6.0.3 or something wasn't cherry picked to the
> 6.0.3 bug fix release.

Still crashing in:
Operating System: KDE neon 6.0
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.5.0-26-generic (64-bit)
Graphics Platform: Wayland

(gdb) bt

  #0  0x00007c50a17d562b in QObjectPrivate::connectImpl(QObject const*, int, QObject const*, void**, QtPrivate::QSlotObjectBase*, int, int const*, QMetaObject const*) ()
   from /lib/x86_64-linux-gnu/libQt6Core.so.6
#1  0x00007c50a17d962b in QObject::connectImpl(QObject const*, void**, QObject const*, void**, QtPrivate::QSlotObjectBase*, Qt::ConnectionType, int const*, QMetaObject const*) () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#2  0x00007c50702ec83c in ?? () from /lib/x86_64-linux-gnu/libPlasmaSystemMonitorPage.so
#3  0x00007c50a282ae98 in ?? () from /lib/x86_64-linux-gnu/libQt6Qml.so.6
#4  0x00007c50a28c1ec8 in ?? () from /lib/x86_64-linux-gnu/libQt6Qml.so.6
#5  0x00007c50a28c9972 in QQmlBinding::doUpdate(QQmlJavaScriptExpression::DeleteWatcher const&, QFlags<QQmlPropertyData::WriteFlag>, QV4::Scope&) ()
   from /lib/x86_64-linux-gnu/libQt6Qml.so.6
#6  0x00007c50a28c7101 in QQmlBinding::update(QFlags<QQmlPropertyData::WriteFlag>) () from /lib/x86_64-linux-gnu/libQt6Qml.so.6
#7  0x00007c50a2847ce3 in QQmlObjectCreator::finalize(QQmlInstantiationInterrupt&) () from /lib/x86_64-linux-gnu/libQt6Qml.so.6
#8  0x00007c50a28f8c67 in QQmlIncubatorPrivate::incubate(QQmlInstantiationInterrupt&) () from /lib/x86_64-linux-gnu/libQt6Qml.so.6
#9  0x00007c50a28f9e7f in QQmlIncubationController::incubateFor(int) () from /lib/x86_64-linux-gnu/libQt6Qml.so.6
#10 0x00007c50a183c6ab in ?? () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#11 0x00007c5097b01f21 in ?? () from /lib/x86_64-linux-gnu/libQt6Quick.so.6
#12 0x00007c5097d09e84 in QQuickWindow::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt6Quick.so.6
#13 0x00007c50a31f181b in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#14 0x00007c50a1875e08 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#15 0x00007c50a1f2bf2c in QPlatformWindow::deliverUpdateRequest() () from /lib/x86_64-linux-gnu/libQt6Gui.so.6
#16 0x00007c50a17cc9b2 in QObject::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#17 0x00007c50a31f181b in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#18 0x00007c50a1875e08 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#19 0x00007c50a1876000 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#20 0x00007c50a16584f7 in ?? () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#21 0x00007c50a089ad3b in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007c50a08f0258 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007c50a08983e3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007c50a1655c30 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#25 0x00007c50a187fceb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#26 0x00007c50a187a36c in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt6Core.so.6
#27 0x00005a9818e96b4a in ?? ()
#28 0x00007c50a0c29d90 in __libc_start_call_main (main=main@entry=0x5a9818e959d0, argc=argc@entry=1, argv=argv@entry=0x7ffc34c24e08)
    at ../sysdeps/nptl/libc_start_call_main.h:58
#29 0x00007c50a0c29e40 in __libc_start_main_impl (main=0x5a9818e959d0, argc=1, argv=0x7ffc34c24e08, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7ffc34c24df8) at ../csu/libc-start.c:392
#30 0x00005a9818e976c5 in ?? ()

Maybe related, it also crashes if one goes to "Applications" instead of "Overview" and clicks "Show Details Sidebar".
Comment 13 Bug Janitor Service 2024-03-31 20:12:07 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-systemmonitor/-/merge_requests/275
Comment 14 Nate Graham 2024-03-31 20:12:36 UTC
Yup, looks like the cherry-pick got forgotten. :/ I'll do that real fast.
Comment 15 Nate Graham 2024-03-31 20:13:20 UTC
Git commit 21db049b4d43c81d212e2b1c973d0595c3d2602c by Nate Graham, on behalf of Arjen Hiemstra.
Committed on 31/03/2024 at 20:11.
Pushed by ngraham into branch 'Plasma/6.0'.

page: Store FaceController cache in QPointer

To make sure that we track deletion of FaceControllers if they get
destroyed.


(cherry picked from commit 64c366458ce2064c0758562f634b75c7f72fc5ea)

M  +8    -2    src/page/FaceLoader.cpp
M  +3    -3    src/page/FaceLoader.h

https://invent.kde.org/plasma/plasma-systemmonitor/-/commit/21db049b4d43c81d212e2b1c973d0595c3d2602c