Bug 407216

Summary: Plasmashell crashes when screenshot taken in Spectacle of active window larger than 1 monitor
Product: [Plasma] plasmashell Reporter: Danfox Davies <danfox>
Component: ContainmentAssignee: Sebastian Kügler <sebas>
Status: RESOLVED WORKSFORME    
Severity: normal CC: kde, plasma-bugs-null
Priority: NOR    
Version First Reported In: 5.12.7   
Target Milestone: 1.0   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Danfox Davies 2019-05-04 14:08:35 UTC
SUMMARY
Plasmashell crashes when a screenshot is taken in Spectacle when Spectacle is set to take a screenshot of the active window and that window is larger than 1 monitor on a multi-monitor NVidia proprietary-driver Ubuntu 18.04 + KDE system.

https://bugs.kde.org/show_bug.cgi?id=406339 is similar but not the same (they report their bug in Neon Packages and not Ubuntu, also they have a different method of taking the screenshots).

STEPS TO REPRODUCE
1. Stretch a Mozilla Firefox window across two screens (one above the other), leaving it as the active window.
2. Press Print Screen to bring up Spectacle.
3. Set Spectacle to take a screenshot of the active window.
4. Left click on the active window with your mouse.

OBSERVED RESULT
Plasmashell crashes, such that window borders are gone and windows do not become active by being clicked on. Windows can also no longer be moved around, maximised, minimised or restored. Music continues to play if it is on at the time, but one cannot access any window which was in the background or minimised or on a different workspace. Using kquitapp5 plasmashell && kstart5 plasmashell produces a new instance of plasmashell except all the previous windows are listed on the taskbar but refuse to restore or maximise, they are therefore still inaccessible. A reboot is the only way to get them back.

EXPECTED RESULT
A screenshot would be taken of the active window and Plasmashell would continue operating as normal.

SOFTWARE/OS VERSIONS
Windows: N/A
macOS: N/A
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.12.7
KDE Frameworks Version: 5.44.0
Qt Version: 5.9.5

ADDITIONAL INFORMATION
Tried upgrading the Linux kernel from 4.20 to 5.0.12, same problem.
Comment 1 Danfox Davies 2019-05-04 14:18:04 UTC
Correction to observed result: background windows /can/ be accessed by first closing the windows in front of them, IF those windows have their own close-options in their menus. But that's obviously beside the point of the bug.
Comment 2 Danfox Davies 2019-05-04 14:20:39 UTC
Correction to Steps To Reproduce: step 3.5: click 'Take a new screenshot'.
Comment 3 Danfox Davies 2019-05-04 14:24:11 UTC
May affect the result: there was a taskbar across the middle of the window because of where it was positioned.
Comment 4 Danfox Davies 2019-05-04 20:50:10 UTC
$ journalctl -f | grep --line-buffered kde
May 04 20:08:52 The-Pot-of-Gold dbus-daemon[1619]: [session uid=1000 pid=1619] Activating service name='org.kde.Spectacle' requested by ':1.219' (uid=1000 pid=12144 comm="/usr/lib/x86_64-linux-gnu/qt4/bin/qdbus org.kde.Sp" label="kernel")
May 04 20:08:52 The-Pot-of-Gold dbus-daemon[1619]: [session uid=1000 pid=1619] Successfully activated service 'org.kde.Spectacle'
May 04 20:09:38 The-Pot-of-Gold org.kde.Spectacle[1619]: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 1528, resource id: 30343069, major code: 14 (GetGeometry), minor code: 0


This was the log while reproducing the crash with the Firefox window stretched across a monitor to the right. The bug is confirmed not to occur when Firefox is only on one monitor.

Info from the Nvidia X Server Settings app
Linux x86_64 Nividia proprietary driver 390.116
X.org 11.0 / 1.19.6 (11906000)
'Screens': 1
(but there are two full HD monitors)
NV-Control 1.29
Comment 5 David Edmundson 2019-05-04 20:50:31 UTC
>Plasmashell crashes, such that window borders are gone and windows do not become active by being clicked on

That'll be kwin crashing, not plasmashell

A crash needs a backtrace.
Comment 6 Danfox Davies 2019-05-04 21:52:52 UTC
System spec: Intel Core i7 8-core, 24GB RAM, NVidia GeForce GTX 1060, plenty of disk space

Regarding it being kwin crashing: my bad. I will see about how to get a kwin backtrace later.
Comment 7 Danfox Davies 2019-05-04 22:17:30 UTC
Attempting to backtrace with GDB by attaching it to the process ID of kwin_x11 caused the GUI to instantly hang/freeze altogether on its TTY. I was still able to switch to another TTY.
Comment 8 Bug Janitor Service 2019-05-19 04:33:09 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Bug Janitor Service 2019-06-03 04:33:09 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!