Selecting rectangular region in Spectacle sometimes causes kwin-wayland to crash

Hello. Whenever I use spectacle to copy a rectangular region of the screen, I experience the following issues:

  • sometimes spectacle will not copy the image to the clipboard.
  • sometimes spectacle will crash kwin-wayland. I’ve noticed the following lines in journalctl right after spectacle takes a screenshot:

kernel: traps: kwin_wayland[97548] general protection fault ip:7f277b3d015b sp:7ffc6267fa60 error:0 in libQt6Core.so.6.10.1[1d015b,7f277b291000+3e7000]

kernel: kwin_wayland[7269]: segfault at 1 ip 00007f5e894f05c8 sp 00007ffd577f0c90 error 6 in libQt6Qml.so.6.10.1[2f05c8,7f5e8928c000+3f4000] likely on CPU 21 (core 37, socket 0)

Sometimes I can even retrieve the screenshot after kwin starts back up.

Specs:

  • Processor: CPU 12th Gen Intel(R) Core™ i9-12900KF
  • Graphics: GPU AMD Radeon RX 9070 XT
  • Memory: 32 GB
  • Operating system: Garuda Linux
  • Kernel: Linux 6.18.7-zen1-1-zen
  • Graphics platform: Wayland
  • OpenGL 4.6 (Compatibility Profile) Mesa 26.1.0-devel (git)
  • Vulkan 1.4.340 - radv [Mesa 26.1.0-devel (git-e9e4bd8e62)]
  • Display(s) 2560x1440 in 31", 155 Hz [External]
  • Display(s) 1080x1920 in 27", 144 Hz [External]
  • Display(s) 3440x1440 in 34", 144 Hz [External] *
  • using mesa-git from the AUR. Changing to mesa-git from mesa did not resolve the issue.
  • using linux-firmware-git from the AUR. Changing to linux-firmware-git from linux-firmware did not resolve the issue.
  • KDE Plasma version: 6.5.5-1
  • KDE Frameworks version: 6.22.0-1
  • qt6-base version: 6.10.2-1
  • qt5-base version: 5.15.18+kde+r109-2

Spectacle options:

  • when launching spectacle: take rectangular screenshot.
  • after taking screenshot: copy image to clipboard.
  • show magnifier: while holding shift.
  • remember selected area: never.
  • screenshot delay: no delay.
  • include window shadow: yes.
  • include window titlebar and borders: yes.

It is recommended to report the issue on bugs.kde.org (this is definitely a bug, though not necessarily caused by KDE). Regardless, submitting a bug report will help ensure that the relevant developers are aware of the problem.