SUMMARY I have set Spectacle to copy my screenshots to clipboard and quit, when I hit my screenshot shortcuts. Normally this works fine, but I noticed that when taking screenshot with larger resolutions, nothing is copied to my clipboard. Originally this only happened when the screenshot was around the same resolution as my monitor (3072x1980), and I thought it could simply be because klipper doesn't support bigger images; however, after the 6.3.0 update, even screenshots as large as 2000x500 can fail, and I get errors in my journal when checking the clipboard: ``` 05:48:22.136 UTC user@1000.service qrc:/qt/qml/org/kde/plasma/private/clipboard/ImageItemDelegate.qml:26:9: QML Image: Error decoding: file:///home/user/.local/share/klipper/data/074b45f03339619145c7e02a5af6e23211f5efdb/da39a3ee5e6b4b0d3255bfef95601890afd80709: Unsupported image format 05:48:22.137 UTC user@1000.service TGAHandler::canRead() error while reading the header ``` If I keep Spectacle in the background then it copies fine. Also, notably, unchecking "Quit after manual Save or Copy" still doesn't prevent it auto quitting after taking the screenshot - I have to keep its config window open in the background as a workaround. Saving always works. It's copying that doesn't work. Based on the errors I believe it happens because Spectacle is just slow (as in [#442876](https://bugs.kde.org/show_bug.cgi?id=442876)) to save the screenshot, so it just quits before it can finish - saving a full screen makes everything freeze for 5 seconds, and I have an Intel Ultra7-155H CPU! A fullscreen image saved into Klipper Clipboard is only ~500KB in size. This is making Spectacle borderline unusable for me now so I hope it gets some attention. STEPS TO REPRODUCE 1. Set Spectacle "After taking a screenshot" to "Copy image to clipboard". 2. Check "Quit after manual Save or Copy" (although as mentioned above this makes no difference). 3. Take a large rectangle screenshot, preferably around 3000x2000; make sure that spectacle auto-quits after copying. Alternatively if your screen resolution is big enough, just hit a screenshot shortcut key and observe the results. 4. Try pasting the screenshot, or at least check the clipboard contents. OBSERVED RESULT Either nothing is copied to the clipboard, or there is a broken image. EXPECTED RESULT Spectacle should normally be able to copy whatever I took into the clipboard. SOFTWARE/OS VERSIONS Linux kernel: 6.12.13-1-lts KDE Plasma Version: 6.3.0 KDE Frameworks Version: 6.10.0 Qt Version: 6.8.2 Graphics Platform: X11 ADDITIONAL INFORMATION I know there is a Qt bug (https://bugreports.qt.io/browse/QTBUG-133206 - "QThreadStorage: Thread %p exited after QThreadStorage %d destroyed"), and it does show up when I launch Spectacle from a terminal and quit it immediately, but nothing shows up when the screenshot fails to copy, so it is likely not related. Plus this issue existed on older KDE versions on my side too.
Some extra observations: this seems to be related to my notification settings. I have turned off my Spectacle "New Screenshot Saved" popup notification because it somehow makes me unable to paste images before the popup is finished. Originally I wanted to test if the notification still displays, even when Spectacle fails to copy my screenshot, so I turned that back on. Now it copies everything correctly albeit quite slowly ...
Since you say that pasting works after the notification disappears, this seems similar to bug 485096. However, I see that you are using a version that should have the fix (fixed in 24.08.1). Unfortunately, I cannot reproduce the bug, even when taking a 16128x3240 screenshot (tested on Wayland though, will test X11 later). I do notice that it can be slow, but I don't think much can be done about that from Spectacle's side. Regarding the "Unsupported image format" message, do you have qt6-imageformats or qt6-qtimageformats installed?
I should note that I have tested with WebP and PNG so far.
When you copy, before the notification disappears, what is the output of `xclip -selection clipboard -o -t TARGETS` for you?
This could be related to https://bugs.kde.org/show_bug.cgi?id=497735
(In reply to Noah Davis from comment #2) > Since you say that pasting works after the notification disappears, this > seems similar to bug 485096. However, I see that you are using a version > that should have the fix (fixed in 24.08.1). Unfortunately, I cannot > reproduce the bug, even when taking a 16128x3240 screenshot (tested on > Wayland though, will test X11 later). I do notice that it can be slow, but I > don't think much can be done about that from Spectacle's side. > > Regarding the "Unsupported image format" message, do you have > qt6-imageformats or qt6-qtimageformats installed? I was using the PNG format (although I have switched to WebP recently) and I have qt6-imageformats installed. > Regarding the "Unsupported image format" message I think it was basically from what I had described earlier: Spectacle just quits before it can finish saving the image. I should also clarify that: 1) This bug is different from what I had expected earlier - originally when I filed this bug report I had thought that it was a generic screenshot copying problem, but it now looks only related to specific notification settings. I will update the title to match this. 2) This is what my Plasma notification settings for Spectacle looked like: [ https://i.imgur.com/Wd4q5XC.png ]. If I specifically disable the "New Screenshot" popup then it just quits prematurely, but if I disable all Spectacle notifications (uncheck the topmost "Show popups") then everything saves correctly (so that is what I'm currently using). I myself couldn't reproduce the "paste before notification popup is gone" problem now, so I would guess it has been solved.
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME. For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging. Thank you for helping us make KDE software even better for everyone!