Bug 435407 - Present Windows kills animations when last window is closed; only happens with "Regular Grid" and Flexible Grid"; "Natural" layout doesn't have this bug
Summary: Present Windows kills animations when last window is closed; only happens wit...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-present-windows (show other bugs)
Version: 5.21.3
Platform: Manjaro Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-06 03:20 UTC by flan_suse
Modified: 2021-08-19 15:39 UTC (History)
2 users (show)

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


Attachments
This shows normal behavior using "Natural" layout mode; no issues, works as expected (2.67 MB, video/mp4)
2021-04-06 03:55 UTC, flan_suse
Details
This shows the bug using a "Grid" layout mode (3.65 MB, video/mp4)
2021-04-06 03:58 UTC, flan_suse
Details

Note You need to log in before you can comment on or make changes to this bug.
Description flan_suse 2021-04-06 03:20:34 UTC
SUMMARY
When using the Present Windows effect, closing the last window crashes the compositor and disables all animations, rather than gracefully returning to the desktop view (which is expected when there are no more windows to close.) Strangely, invoking the Present Windows effect *again* will return animations! Weird.




STEPS TO REPRODUCE:
1. Under the Present Windows effect, change it to use "Regular Grid" or "Flexible Grid" for the "Layout mode" option

2. Open a few windows.

3. Invoke the Present Windows effect, and close each window, one by one, until none are left

4. After all windows are closed, the effect "ends" and you return to your desktop, but...

5. Animations are disabled!

6. Open a few windows

7. Invoke the Present Windows effect

8. End the effect (without closing any windows)

9. Tada! Animations are enabled again!




EXPECTED RESULT:
The effect should end when all windows are closed, and return you to the desktop. It should not disable animations / crash the compositor.




STEPS THAT AVOID THIS BUG:
1. Under the Present Windows effect, change it to use "Natural" for the "Layout mode" option

2. Open a few windows

3. Invoke the Present Windows effect, and close each window, one by one, until none are left

4. After all windows are closed, the effect "ends" and you return to your desktop, and...

5. Everything is normal! Compositor didn't crash! Animations are not disabled! ALL IS GOOD IN THE WORLD!




ADDITIONAL NOTES:
This bug *never* occurs if "Natural" is selected for the "Layout mode" (under the Present Window settings).

I tested this with the open source nouveau driver and the proprietary nvidia driver. Same result with either one.



SOFTWARE/OS VERSIONS:
Operating System: Manjaro Linux
KDE Plasma Version: 5.21.3
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2
Kernel Version: 5.10.23-1-MANJARO
OS Type: 64-bit
Graphics Platform: X11
Processors: 6 × Intel® Core™ i5-8400 CPU @ 2.80GHz
Memory: 11.6 GiB of RAM
Graphics Processor: GeForce GTX 1650/PCIe/SSE2
Comment 1 flan_suse 2021-04-06 03:55:59 UTC
Created attachment 137369 [details]
This shows normal behavior using "Natural" layout mode; no issues, works as expected

This attached video shows normal behavior using "Natural" layout mode; no issues, works as expected. Animations remain when effect ends after closing the last window; compositor never crashes.
Comment 2 flan_suse 2021-04-06 03:58:53 UTC
Created attachment 137370 [details]
This shows the bug using a "Grid" layout mode

This attached video shows the bug, using either "Regular Grid" or "Flexible Grid" layout mode. Animations are disabled and compositor crashes when effect ends after closing the last window.

You must invoke Present Windows again in order to restore animations, otherwise animations remain disabled indefinitely.
Comment 4 flan_suse 2021-04-06 16:16:11 UTC
Nate, it doesn't generate a coredump. Is this because it's not "technically" a crash / abort?

If you look at the second attached video, you'll see I am able to still use the desktop like normal, except that all animations have been disabled. Invoking "Present Windows" again is a hacky way to re-enable animations if they were previously disabled by closing the last window during the effect.

The reason I attached the two videos is because it's difficult to describe this bug without it be misinterpreted as something else.

This has been an issue for a good while, I just never got around to making a bug report. I tested this on different Rendering Backends and different video drivers. All produce the same bug.

Another interesting point is that this may not technically "crash" the compositor, but rather only disable animations. Another hacky way to bring back animations is to change any random settings under Display > Compositor, then clicking "Apply".

Neither Plasma nor coredump allude to any sort of real "crash". (The second video shows the bug in action.)
Comment 5 Bug Janitor Service 2021-04-21 04:33:18 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 6 flan_suse 2021-04-22 20:25:50 UTC
I can't provide a core dump because when this bug occurs, it doesn't consider it as a "crash".

This is why I provided the two different screen capture videos to show the behaviour.

Based on my steps and the videos, it should be relatively straight forward to reproduce this bug.
Comment 7 Zamundaaa 2021-06-16 15:46:02 UTC
The compositor does indeed not crash - transparency is preserved in your video and I can reproduce it on Wayland.

It seems like the effect doesn't exit properly and other effects like blur, slide, desktop overview etc are blocked until present windows gets triggered again.
Comment 8 flan_suse 2021-06-16 19:18:01 UTC
(In reply to Zamundaaa from comment #7)
> The compositor does indeed not crash - transparency is preserved in your
> video and I can reproduce it on Wayland.
> 
> It seems like the effect doesn't exit properly and other effects like blur,
> slide, desktop overview etc are blocked until present windows gets triggered
> again.

Exactly! This is why I can't submit a core dump or crash log, since it's not considered a "crash" in the traditional sense.

It is the reason why I provided videos and instructions on how to reproduce this bug.

If there is any other way I can help, let me know.
Comment 9 Nate Graham 2021-08-19 15:39:22 UTC
Should be fixed in the QML rewrite for Plasma 5.23!