Bug 482392 - Spectacle: Selective Crash of Certain Apps on Active Window Screenshot Attempt
Summary: Spectacle: Selective Crash of Certain Apps on Active Window Screenshot Attempt
Status: RESOLVED WORKSFORME
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR crash
Target Milestone: ---
Assignee: Noah Davis
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-03-04 15:47 UTC by Angel Skyheart
Modified: 2024-03-06 17:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Angel Skyheart 2024-03-04 15:47:11 UTC
SUMMARY
***
Everytime I press the printscreen button on my keyboard, the spectacle app opens with the screenshot showing asking what I want to do. Not ideal since I'd rather just have the full screenshot go straight to the clipboard, or press alt + printscreen to do an active window screenshot to the clipboard, but I digress. The problem is that after the app is open, and I press the button take the screenshot of the active window only, the app suddenly crashes, the desktop resets, and I find it's crashed every single other app that was open EXCEPT the ones that came pre-installed with the OS ie. Dolphin and Konsole. 
***


STEPS TO REPRODUCE
1. Press prtsc on the keyboard, opening the Spectacle screenshot app.
2. Press Active Window on the Spectacle app window. 

OBSERVED RESULT
Desktop reset, Spectacle app crash, and a crash of every app other than Dolphin, Konsole, and other apps that came pre-installed on KDE Neon.

EXPECTED RESULT
Spectacle flashes, and the preview window of the full screenshot of the desktop is replaced by a preview window of a screenshot of the last active window.

SOFTWARE/OS VERSIONS
OS: KDE Neon 6.0
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernal Version: 6.5.0-21-generic (64 bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Processors: 6 x Intel Core i5-8600K CUP @ 3.60 GHz
Memory: 62.7 GiB of RAM
Graphics Processor: NV134
GPU: NVidia GTX 1080
Comment 1 Nate Graham 2024-03-05 20:17:31 UTC
It sounds like KWin is crashing and taking down everything not using Qt with it. That's expected, but of course crashing is not expected! Can you get a backtrace of the kwin_wayland crash using the `coredumpctl` command-line program, as detailed in https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl?

Thanks!
Comment 2 Noah Davis 2024-03-05 20:46:10 UTC
> Not ideal since I'd rather just have the full screenshot go straight to the clipboard

There's already a setting for that. "After taking a screenshot: Copy image to clipboard"
Comment 3 Angel Skyheart 2024-03-06 14:06:26 UTC
(In reply to Nate Graham from comment #1)
> It sounds like KWin is crashing and taking down everything not using Qt with
> it. That's expected, but of course crashing is not expected! Can you get a
> backtrace of the kwin_wayland crash using the `coredumpctl` command-line
> program, as detailed in
> https://community.kde.org/Guidelines_and_HOWTOs/Debugging/
> How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl?
> 
> Thanks!

I actually had to install systemd-coredump before I could use this... Afterwards I followed the guide on retrieving a backtrace and ran `coredumpctl --reverse`, only to be stymied by the return `No coredumps found`. Not sure what to do next as I've actually not been able to get Spectacle to crash again lately after I ended up deleting it to try to replace it with gnome screenshot, which didn't even work, so I removed that and put Spectacle back so I would at least have /some/ functionality, plus I dove into its keyboard shortcuts and was surprised that afterwards using prtscn and alt+prtscn no longer actually opens the Spectacle app and sends the screenshots directly to the clipboard (which was all I wanted in the first place), and... 

Anyway, point is, I don't know if it was the delete/reinstall or the changing of the keyboard shortcuts, but I've not actually been able to get spectacle to crash again since. Now I'm half wondering if I should delete and reinstall the Discover Software Center to get it to cut its crap too...
Comment 4 Nate Graham 2024-03-06 17:45:34 UTC
If you didn't already have `coredumpctl` installed, then crashed before than wouldn't be listed in it then, darn.

If you can't make it crash again, then I'm afraid the bug isn't actionable, so let's close it. The next time you do experience the issue, please make sure to attach a symbolicated backtrace. Thanks a lot!