Bug 522886 - systemsettings crash std::out_of_range
Summary: systemsettings crash std::out_of_range
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-crash (other bugs)
Version First Reported In: 6.7.2
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: 1.0
Assignee: adamdodadev
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2026-07-10 11:40 UTC by adamdodadev
Modified: 2026-07-23 03:24 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.7.4
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description adamdodadev 2026-07-10 11:40:32 UTC
DESCRIPTION
systemsettings cannot be opened

STEPS TO REPRODUCE
1. start systemsettings in terminal

OBSERVED RESULT
systemsettings   terminate called after throwing an instance of 'std::out_of_range'  what():  basic_string::at: __n (which is 0) >= this->size() (which is 0) KCrash: Application 'systemsettings' crashing... crashRecursionCounter = 2 Aborted                    (core dumped) systemsettings

EXPECTED RESULT
No crash

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 44
KDE Plasma Version: 6.7.2
KDE Frameworks Version: 6.27.0
Qt Version: 6.11.1

ADDITIONAL INFORMATION
Fanatec Pedals seems to cause it with device path "/dev/input/event28". udevmatcher.cpp seems to expect an id in the path (e.g. 0005:18D1:9400.005).
This used to work a couple of month back, no hardware change -> a change somewhere else (outside of udevmatcher.cpp) revealed this issue yet systemsettings shouldn't crash.
Comment 1 Bug Janitor Service 2026-07-10 11:52:03 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/3874
Comment 2 adamdodadev 2026-07-10 13:22:54 UTC
Update: /dev/input/event28 is a virtual device actually not the real pedal device, I needed it for Assetto Corsa but I forgot why. Anyway doesn't really change anything.
Comment 3 Sebastian Sauer 2026-07-18 22:14:12 UTC
Do you happen to have a backtrace?

From looking at https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/3874/diffs I have a hard time to see why / where the std::out_of_range would happen and why the MR would fix it.
Comment 4 Sebastian Sauer 2026-07-18 22:34:25 UTC
Did dig deeper. Will reply at the MR.
Comment 5 Bug Janitor Service 2026-07-18 23:14:03 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/3893
Comment 6 Sebastian Sauer 2026-07-20 08:39:26 UTC
Git commit 932f29636ccd264005cb1af579c0c1a11976cbf7 by Sebastian Sauer.
Committed on 20/07/2026 at 04:29.
Pushed by meven into branch 'master'.

kcms/gamecontroller: Fix std::out_of_range exception

If either slash==std::string::npos or devicePath.empty() then
the code can throw a std::out_of_range exception. Fix that
and make sure the code not throws a std::out_of_range exception.

Based on a patch done by Adam Doda.

M  +1    -1    kcms/gamecontroller/udevmatcher.cpp

https://invent.kde.org/plasma/plasma-desktop/-/commit/932f29636ccd264005cb1af579c0c1a11976cbf7
Comment 7 Sebastian Sauer 2026-07-20 08:39:35 UTC
Git commit 71b3e4dafaaab146d1054225bfaccf8115bebe2e by Sebastian Sauer.
Committed on 20/07/2026 at 04:29.
Pushed by meven into branch 'master'.

kcms/gamecontroller: Fix UB to use of uninitialized memory

In the else case sys_path was never initialized resulting
in random memory being passed into udev_device_new_from_syspath
what results in undefined behavior.

Based on a patch done by Adam Doda.

M  +3    -0    kcms/gamecontroller/udevmatcher.cpp

https://invent.kde.org/plasma/plasma-desktop/-/commit/71b3e4dafaaab146d1054225bfaccf8115bebe2e
Comment 8 Méven 2026-07-21 12:40:10 UTC
Git commit ed508fbc7b39dba3369f57858b07fdb921e9e8b6 by Méven Car.
Committed on 20/07/2026 at 09:59.
Pushed by meven into branch 'Plasma/6.7'.

kcms/gamecontroller: Fix std::out_of_range exception

If either slash==std::string::npos or devicePath.empty() then
the code can throw a std::out_of_range exception. Fix that
and make sure the code not throws a std::out_of_range exception.

Based on a patch done by Adam Doda.


(cherry picked from commit 932f29636ccd264005cb1af579c0c1a11976cbf7)

Co-authored-by: Sebastian Sauer <dipesh@gmx.de>

M  +1    -1    kcms/gamecontroller/udevmatcher.cpp

https://invent.kde.org/plasma/plasma-desktop/-/commit/ed508fbc7b39dba3369f57858b07fdb921e9e8b6