Bug 497927 - Plasma crashed when trying to close clipboard configuration window shortly after disabling clipboard system tray entry
Summary: Plasma crashed when trying to close clipboard configuration window shortly af...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Tray widget (show other bugs)
Version: 6.2.4
Platform: Arch Linux Linux
: NOR crash
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2024-12-27 00:44 UTC by jlsantos
Modified: 2025-01-15 20:47 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.3.0
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/111851/events/cbb91b2f5c2e4e2d8c9d3450bf1e387c/


Attachments
New crash information added by DrKonqi (154.44 KB, text/plain)
2024-12-27 00:44 UTC, jlsantos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jlsantos 2024-12-27 00:44:29 UTC
Application: plasmashell (6.2.4)

ApplicationNotResponding [ANR]: false
Qt Version: 6.8.1
Frameworks Version: 6.9.0
Operating System: Linux 6.12.6-arch1-1 x86_64
Windowing System: Wayland
Distribution: Arch Linux
DrKonqi: 6.2.4 [CoredumpBackend]

-- Information about the crash:
After adding a System Tray widget to a panel, I usually disable the clipboard entry.

This crash occurred when I had accidentally clicked on the "Configure Clipboard" menu item when I was searching for "Configure System Tray." Leaving the clipboard configuration window open, I disabled the clipboard through the system tray configuration window. Afterwards, trying to close the clipboard configuration window crashes plasma.

The crash can be reproduced every time.

-- Backtrace (Reduced):
#5  std::__atomic_base<int>::fetch_add (this=0x19, __i=1, __m=std::memory_order::acq_rel) at /usr/include/qt6/QtCore/qbasicatomic.h:47
#6  QAtomicOps<int>::ref<int> (_q_value=<error reading variable: Cannot access memory at address 0x19>) at /usr/include/qt6/QtCore/qatomic_cxx11.h:259
[...]
#10 QArrayDataPointer<ClipAction*>::QArrayDataPointer (this=<optimized out>, other=...) at /usr/include/qt6/QtCore/qarraydatapointer.h:40
#11 QList<ClipAction*>::QList (this=<optimized out>, this=<optimized out>) at /usr/include/qt6/QtCore/qlist.h:72
#12 URLGrabber::actionList (this=0x62376907f120) at /usr/src/debug/plasma-workspace/plasma-workspace-6.2.4/klipper/urlgrabber.h:46


Reported using DrKonqi
Comment 1 jlsantos 2024-12-27 00:44:32 UTC
Created attachment 176898 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 Nate Graham 2025-01-03 21:12:02 UTC
Can confirm. We should fix this, but until then, I think it's a case of "then don't do that" :) 

Probably disabling a widget in the system tray should automatically close its configuration window, if it was open.
Comment 3 Bug Janitor Service 2025-01-10 11:47:59 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5051
Comment 4 Marco Martin 2025-01-10 16:45:37 UTC
Git commit e8c1aa06abf81ed8d15aec37c0ab122b8d4915a3 by Marco Martin.
Committed on 10/01/2025 at 13:27.
Pushed by mart into branch 'master'.

applets/clipboard: close config window if actioncollection gets deleted

When the clipbopard applet gets removed, the actioncollection that was
used to create the config dialog gets deleted and the state of the
dialog is not valid anymore, as there is nothing to configure anymore

pressing ok will access the action collection and crash

Close the dialog immediately when the applet and the action collection
is deleted

M  +2    -1    klipper/configdialog.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/e8c1aa06abf81ed8d15aec37c0ab122b8d4915a3
Comment 5 Marco Martin 2025-01-13 09:34:23 UTC
Git commit 6f339e07658a9bd96699e5ee1d119723dd0bae41 by Marco Martin.
Committed on 13/01/2025 at 09:08.
Pushed by mart into branch 'Plasma/6.3'.

applets/clipboard: close config window if actioncollection gets deleted

When the clipbopard applet gets removed, the actioncollection that was
used to create the config dialog gets deleted and the state of the
dialog is not valid anymore, as there is nothing to configure anymore

pressing ok will access the action collection and crash

Close the dialog immediately when the applet and the action collection
is deleted


(cherry picked from commit e8c1aa06abf81ed8d15aec37c0ab122b8d4915a3)

e8c1aa06 applets/clipboard: close config window if actioncollection gets deleted

Co-authored-by: Marco Martin <notmart@gmail.com>

M  +2    -1    klipper/configdialog.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/6f339e07658a9bd96699e5ee1d119723dd0bae41