Bug 495231 - System Settings crashed on attaching USB Mouse while on Mouse settings page
Summary: System Settings crashed on attaching USB Mouse while on Mouse settings page
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: generic-crash (show other bugs)
Version: 6.2.1
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: drkonqi
: 496663 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-10-23 09:15 UTC by subho07t+bugs.kde.org
Modified: 2024-11-28 12:40 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.2.5
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/75404/events/3458853a40f447219a626336a57130ca/


Attachments
New crash information added by DrKonqi (92.67 KB, text/plain)
2024-10-23 09:15 UTC, subho07t+bugs.kde.org
Details

Note You need to log in before you can comment on or make changes to this bug.
Description subho07t+bugs.kde.org 2024-10-23 09:15:07 UTC
Application: systemsettings (6.2.1)

ApplicationNotResponding [ANR]: false
Qt Version: 6.7.2
Frameworks Version: 6.7.0
Operating System: Linux 6.11.3-200.fc40.x86_64 x86_64
Windowing System: Wayland
Distribution: "Fedora Linux 40 (KDE Plasma)"
DrKonqi: 6.2.1 [CoredumpBackend]

-- Information about the crash:
When Mouse settings page is open, attaching a new device causes the application to freeze for about 3 seconds, and then crash. This happens regardless of whether the main Mouse settings page is open, or the Extra Mouse Buttons page. Disattaching and reattaching a known device causes same issue, consistently.

Tested with Logitech G402 & Logitech B100

The crash can be reproduced every time.

-- Backtrace (Reduced):
#5  KWinWaylandDevice::Prop<bool>::isSaveNeeded (this=0x120) at /usr/src/debug/plasma-desktop-6.2.1-1.fc40.x86_64/kcms/mouse/backends/kwin_wl/kwin_wl_device.h:254
#6  KWinWaylandDevice::isSaveNeeded (this=0x0) at /usr/src/debug/plasma-desktop-6.2.1-1.fc40.x86_64/kcms/mouse/backends/kwin_wl/kwin_wl_device.cpp:141
#7  0x00007fc8d02a4d5e in KWinWaylandBackend::onDeviceAdded (this=0x55c45104d710, sysName=...) at /usr/src/debug/plasma-desktop-6.2.1-1.fc40.x86_64/kcms/mouse/backends/kwin_wl/kwin_wl_backend.cpp:198
#8  0x00007fc8d02a52e9 in KWinWaylandBackend::qt_static_metacall (_c=<optimized out>, _id=<optimized out>, _o=0x55c45104d710, _a=<optimized out>) at /usr/src/debug/plasma-desktop-6.2.1-1.fc40.x86_64/redhat-linux-build/kcms/mouse/kcm_mouse_autogen/include/moc_kwin_wl_backend.cpp:97
#9  KWinWaylandBackend::qt_static_metacall (_o=0x55c45104d710, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /usr/src/debug/plasma-desktop-6.2.1-1.fc40.x86_64/redhat-linux-build/kcms/mouse/kcm_mouse_autogen/include/moc_kwin_wl_backend.cpp:91


Reported using DrKonqi
Comment 1 subho07t+bugs.kde.org 2024-10-23 09:15:11 UTC
Created attachment 175134 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 Nicolas Fella 2024-11-25 14:35:31 UTC
*** Bug 496663 has been marked as a duplicate of this bug. ***
Comment 3 Bug Janitor Service 2024-11-25 14:37:50 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2646
Comment 4 Nicolas Fella 2024-11-28 12:38:55 UTC
Git commit e88c10144bca7e57d3b0bb8ee37156fff73739ef by Nicolas Fella.
Committed on 28/11/2024 at 12:21.
Pushed by nicolasfella into branch 'master'.

[kcms/mouse] Don't emit needsSaveChanged when adding device

When adding a device it won't have unsaved changes, so the needsSave
status won't change.

This fixes a use-after-move because dev is moved earlier in
"m_devices.push_back(std::move(dev));"

SENTRY: SYSTEMSETTINGS-4H3

SENTRY: FALLTHROUGH-6NV

M  +0    -4    kcms/mouse/backends/kwin_wl/kwin_wl_backend.cpp

https://invent.kde.org/plasma/plasma-desktop/-/commit/e88c10144bca7e57d3b0bb8ee37156fff73739ef
Comment 5 Nicolas Fella 2024-11-28 12:39:55 UTC
Git commit 251b6215b7b44bf46d7c87d6a5f50c3a695ea1cb by Nicolas Fella.
Committed on 28/11/2024 at 12:39.
Pushed by nicolasfella into branch 'Plasma/6.2'.

[kcms/mouse] Don't emit needsSaveChanged when adding device

When adding a device it won't have unsaved changes, so the needsSave
status won't change.

This fixes a use-after-move because dev is moved earlier in
"m_devices.push_back(std::move(dev));"

SENTRY: SYSTEMSETTINGS-4H3

SENTRY: FALLTHROUGH-6NV
(cherry picked from commit e88c10144bca7e57d3b0bb8ee37156fff73739ef)

M  +0    -4    kcms/mouse/backends/kwin_wl/kwin_wl_backend.cpp

https://invent.kde.org/plasma/plasma-desktop/-/commit/251b6215b7b44bf46d7c87d6a5f50c3a695ea1cb