Bug 459710

Summary: Plasma crashes in SensorFaceController::sensorsConfigUi() when trying to configure System Monitor widget
Product: [Plasma] plasmashell Reporter: Oded Arbel <oded>
Component: System Monitor widgetsAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: ahiemstra, kde, nate, notmart
Priority: NOR Keywords: drkonqi
Version First Reported In: master   
Target Milestone: 1.0   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.0
Sentry Crash Report:
Attachments: New crash information added by DrKonqi

Description Oded Arbel 2022-09-26 21:26:03 UTC
Application: plasmashell (5.26.80)

Qt Version: 5.15.6
Frameworks Version: 5.99.0
Operating System: Linux 5.19.0-15-generic x86_64
Windowing System: Wayland
Distribution: KDE neon Unstable Edition
DrKonqi: 5.26.80 [CoredumpBackend]

-- Information about the crash:
After switching from X11 to Wayland, the ksysguard widget shows empty. When trying to configure it, the widget configuration dialog shows - open at the "Appearance" tab. When clicking on the "Sensor Details" tab, Plasma crashes with the attached stack trace.

Plasma also crashes when closing the ksysguard widget configuration dialog (without clicking on "Sensor Details"), though I'm not sure its the same crash.

The crash can be reproduced every time.

-- Backtrace (Reduced):
#6  0x00007fe941736118 in KConfigGroup::config() const () from /lib/x86_64-linux-gnu/libKF5ConfigCore.so.5
#7  0x00007fe94173d0d6 in KConfigGroup::readEntry(char const*, QVariant const&) const () from /lib/x86_64-linux-gnu/libKF5ConfigCore.so.5
#8  0x00007fe9380eac3f in KConfigGroup::readEntry<bool> (this=0x564676225598, key=key@entry=0x7fe9380eda26 "SupportsSensors", defaultValue=defaultValue@entry=@0x7fffc4c1d1c0: true) at /usr/include/KF5/KConfigCore/kconfiggroup.h:824
#9  0x00007fe9380e27b2 in KSysGuard::SensorFaceController::sensorsConfigUi (this=0x564676298880) at ./faces/SensorFaceController.cpp:788
#10 KSysGuard::SensorFaceController::sensorsConfigUi (this=0x564676298880) at ./faces/SensorFaceController.cpp:782


Reported using DrKonqi
Comment 1 Oded Arbel 2022-09-26 21:26:04 UTC
Created attachment 152446 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 David Edmundson 2023-10-25 12:11:04 UTC
Git commit 244c1bde24103e9b7a2bb7139874626fe955a52b by David Edmundson, on behalf of Arjen Hiemstra.
Committed on 25/10/2023 at 14:11.
Pushed by davidedmundson into branch 'master'.

Guard against faceProperties being invalid

In certain cases it seems faceProperties can be invalid. KConfig will
crash if we try to read from an invalid group, so we should make sure to
never attempt that.

M  +26   -1    faces/SensorFaceController.cpp

https://invent.kde.org/plasma/libksysguard/-/commit/244c1bde24103e9b7a2bb7139874626fe955a52b