Created attachment 134918 [details] Klipper history file SUMMARY Full desktop will frozen ~30 sec if you use attached clipboard history (~/.local/share/klipper/history2.lst). STEPS TO REPRODUCE 1. Switch off Klipper 2. Overwrite your own history file with the attached file (I suggest a backup first your own history). 3. Switch on Klipper 4. Set a hotkey in Klipper settings: "Open Klipper at Mouse Position" 5. Press hotkey OBSERVED RESULT The desktop will be frozen ~ 30 sec (only mouse cursor can be move) Does Klipper tries to calculate history window size on large, multiple lines of text?? EXPECTED RESULT Works without freezing as click on Klipper systray icon Possible solutions: - Not calculate full-text size. Calculate only with the first x chars. - Fixed-size of the showed text. E.g. 20 char length (configurable?) - Fixed-size of the history window. E.g. 150px. (configurable?) - I prefer this solution SOFTWARE/OS VERSIONS Linux/KDE Plasma: KDE Neon user KDE Plasma Version: 5.20.5 KDE Frameworks Version: 5.78.0 Qt Version: 5.15.2
*** This bug has been marked as a duplicate of bug 360262 ***
Your history file contains a very long text of 8 307 895 characters, which Plasma tries to render in a text field. plasmashell call graph is as follows: 80.56% 0.00% plasmashell libQt5Gui.so.5.15.2 [.] QTextDocumentLayout::documentChanged | ---QTextDocumentLayout::documentChanged 0x7f5e6a605ae7 QTextDocumentLayout::doLayout 0x7f5e6a605430 0x7f5e6a604e72 | --80.56%--0x7f5e6a5febae 0x7f5e6a605430 0x7f5e6a604ca8 0x7f5e6a60124e 0x7f5e6a600689 0x7f5e6a5fe92c | --80.34%--0x7f5e6a5fd87c QTextLine::layout_helper | |--67.11%--QTextEngine::shapeText | | | |--63.35%--QTextEngine::shapeTextWithHarfbuzzNG | | | | | |--60.15%--hb_shape_full | | | | | | | --60.07%--hb_shape_plan_execute
(In reply to Nate Graham from comment #1) > > *** This bug has been marked as a duplicate of bug 360262 *** Doesn't seem like a duplicate for me.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1015
Git commit f9669af2cfa6afdf6567ded5159c45ea8ab6c947 by David Edmundson, on behalf of ValdikSS ValdikSS. Committed on 27/08/2021 at 20:44. Pushed by ngraham into branch 'master'. Trim very long text strings in Klipper history view Klipper may freeze the whole plasmashell for tens of seconds trying to render very long text string from history in the popup. Trim very large strings to 200 characters (tooltip default) to prevent this. M +6 -0 klipper/historystringitem.cpp M +0 -5 klipper/historystringitem.h M +1 -1 klipper/klipper.cpp https://invent.kde.org/plasma/plasma-workspace/commit/f9669af2cfa6afdf6567ded5159c45ea8ab6c947
Has this fix caused this bug https://bugs.kde.org/show_bug.cgi?id=444365
Thanks for reporting; looks like a fix is in progress.
The MR above resulted in a lot of bugs. Instead, we should avoid adding too long text to the clipboard history.
No, that's even worse. We can't destroy user data. Let's not re-open the bug report unless it's found to be not actually fixed. This bug is fixed, ergo it stays closed. If it caused other bugs, we need to trash those with new bug reports.
> No, that's even worse. We can't destroy user data. Try to edit item with very long text (e.g. from the attachment 134918 [details]).
Yes, I've seen. We can fix that by using fullText there rather than just text, no?
You may be using a lot of RAM, but in my case (8 GB) the system just hung.
It should be a known QTBUG.