Bug 493038

Summary: Plasma crashes in KlipperPopup::KlipperPopup() and then crashes repeatedly when it tries to restart itself
Product: [Plasma] plasmashell Reporter: Patrick Silva <bugseforuns>
Component: Clipboard widget & pop-upAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: nate, qydwhotmail
Priority: NOR Keywords: regression
Version First Reported In: 6.1.90   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.2.0
Sentry Crash Report: PLASMA-WORKSPACE-102N
Attachments: long backtrace
non-default clipboard settings

Description Patrick Silva 2024-09-12 21:09:30 UTC
Created attachment 173600 [details]
long backtrace

SUMMARY
I'm testing Plasma 6.2 beta on Arch Linux; sometimes it crashes apparently without any reason and then it crashes repeatedly (many instances of drkonqi show up) when it tries to restart itself.

Operating System: Arch Linux 
KDE Plasma Version: 6.1.90
KDE Frameworks Version: 6.5.0
Qt Version: 6.8.0
Graphics Platform: Wayland
Comment 1 Patrick Silva 2024-09-13 14:00:56 UTC
Operating System: Arch Linux 
KDE Plasma Version: 6.1.90
KDE Frameworks Version: 6.5.0
Qt Version: 6.8.0
Graphics Platform: Wayland
Comment 2 Nate Graham 2024-09-18 19:35:06 UTC
Fushan, would you be able to have a look here? Thanks a lot!
Comment 3 Fushan Wen 2024-09-19 00:12:03 UTC
Does `rm -r ~/.cache/plasmashell` help?
Comment 4 Patrick Silva 2024-09-19 10:22:17 UTC
(In reply to Fushan Wen from comment #3)
> Does `rm -r ~/.cache/plasmashell` help?

No. Currently I can`t to start Plasma 6.2 beta with my main user account because Plasma crashes repeatedly, and I only get a black screen with mouse pointer and some instances of drdonqi. However, I can log in with another user account without any noticeable problem.
Comment 5 Patrick Silva 2024-09-19 10:52:15 UTC
I have just noticed that I can start Plasma with my main user account if the clipboard is empty.
But Plasma crashes repeatedly after login again if the clipboard is not empty.

I can reproduce the crashes after login with these steps:
1. copy any text or file to clipboard
2. log out
3. log in

Result: Plasma crashes repeatedly and I'm only get a black screen with mouse pointer, and some instances of drkonqi.

I can't reproduce these crashes after login with another user account.
Comment 6 Fushan Wen 2024-09-19 12:34:54 UTC
How many clips do you have in the history?
Comment 7 Bug Janitor Service 2024-09-19 12:39:18 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4726
Comment 8 Patrick Silva 2024-09-19 12:40:41 UTC
The crashes after login occur regardless the amount of items in the history.
Plasma crashes repeatedly after login even if there is just 1 item in the history of the clipboard applet.
Comment 9 Fushan Wen 2024-09-19 13:02:56 UTC
Git commit 1cb41f11aba83eb8cf636ec96a516ffbadaf9dc5 by Fushan Wen.
Committed on 19/09/2024 at 12:38.
Pushed by fusionfuture into branch 'master'.

klipper: remove as operator to work around problematic generated QML code

https://bugreports.qt.io/browse/QTBUG-119885
FIXED-IN: 6.2.0

M  +2    -2    klipper/declarative/qml/ClipboardItemDelegate.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/1cb41f11aba83eb8cf636ec96a516ffbadaf9dc5
Comment 10 Fushan Wen 2024-09-19 13:26:42 UTC
Git commit 6bf8c620d4ff0e2feccb4947ce845389d250b452 by Fushan Wen.
Committed on 19/09/2024 at 13:03.
Pushed by fusionfuture into branch 'Plasma/6.2'.

klipper: remove as operator to work around problematic generated QML code

https://bugreports.qt.io/browse/QTBUG-119885
FIXED-IN: 6.2.0


(cherry picked from commit 1cb41f11aba83eb8cf636ec96a516ffbadaf9dc5)

Co-authored-by: Fushan Wen <qydwhotmail@gmail.com>

M  +2    -2    klipper/declarative/qml/ClipboardItemDelegate.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/6bf8c620d4ff0e2feccb4947ce845389d250b452
Comment 11 Patrick Silva 2024-09-20 09:16:03 UTC
Created attachment 173906 [details]
non-default clipboard settings

This bug affects Plasma 6.2 beta if the clipboard is not empty and the non-default clipboard settings seen in the screenshot attached to this comment are used. Plasma 6.2 beta does not crash with default clipboard settings even if the clipboard is not empty.

I have built 6.2 branch on my system and can confirm that Fushan's patch fixes the crash with non-default clipboard settings and non-empty clipboard. :)