Bug 486839

Summary: Desktop Cube effect stops working after using the overview/grid effect or after triggering it 5 times
Product: [Plasma] kdeplasma-addons Reporter: Prajna Sariputra <putr4.s>
Component: CubeAssignee: David Edmundson <kde>
Status: RESOLVED FIXED    
Severity: normal CC: nate, vlad.zahorodnii
Priority: NOR Keywords: regression
Version: git-master   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=488654
Latest Commit: Version Fixed In: 6.1.0
Sentry Crash Report:

Description Prajna Sariputra 2024-05-10 09:16:40 UTC
SUMMARY
With Plasma 6 compiled from git master using kdesrc-build, I noticed that the Desktop Cube effect stops working after either opening it about 5 times (in other words pressing its keyboard shortcut 10 times or so) or activating the overview/grid effect and then closing it.

When the effect is no longer working, I see this message appear in the system logs after every second press of the keyboard shortcut (so when the effect would be closed if it was working): "QuickSceneEffect.source is empty. Did you forget to call setSource()?"

STEPS TO REPRODUCE
1. Open the overview/grid effect and close it
2. Try to open the desktop cube effect

OBSERVED RESULT
The desktop cube does not appear on screen

EXPECTED RESULT
The desktop cube appears on the screen

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.0.80
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.0
Kernel Version: 6.8.8-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 6800H with Radeon Graphics
Memory: 30.6 GiB of RAM
Graphics Processor: AMD Radeon Graphics

ADDITIONAL INFORMATION
When the effect is working, I see three of these messages appear in the logs every time it is triggered, but it's also true for other effects like the overview/grid so not sure if it's relevant:

kwin_wayland_wrapper[10466]: amdgpu: amdgpu_cs_ctx_create2 failed. (-13)
kwin_wayland[10466]: OpenGL vendor string:                   AMD
kwin_wayland[10466]: OpenGL renderer string:                 AMD Radeon Graphics (radeonsi, rembrandt, LLVM 17.0.6, DRM 3.57, 6.8.8-arch1-1)
kwin_wayland[10466]: OpenGL version string:                  4.6 (Core Profile) Mesa 24.0.6-arch1.2
kwin_wayland[10466]: OpenGL shading language version string: 4.60
kwin_wayland[10466]: Driver:                                 Unknown
kwin_wayland[10466]: GPU class:                              Unknown
kwin_wayland[10466]: OpenGL version:                         4.6
kwin_wayland[10466]: GLSL version:                           4.60
kwin_wayland[10466]: Mesa version:                           24.0.6
kwin_wayland[10466]: Requires strict binding:                no

Currently kwin is at commit ef41fa8e8fd869ddfc511264a5bfbf4384fad12a while kdeplasma-addons is at commit fc0c6a35d98d211299a55cae6f305ecce27aa575.
Comment 1 Nate Graham 2024-05-22 18:55:36 UTC
I can reproduce this. Same thing I observed in https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/562#note_920272, which is fixed by https://invent.kde.org/plasma/kwin/-/merge_requests/5702.
Comment 2 Vlad Zahorodnii 2024-05-23 09:09:38 UTC
Git commit 84633badc74ca2502bfd33bc4566667eb4bb57ca by Vlad Zahorodnii, on behalf of David Edmundson.
Committed on 23/05/2024 at 09:00.
Pushed by vladz into branch 'master'.

effects: Support dynamic delegate changes whilst running

The cube effect has a placeholder which can update the delegate at
runtime. There's an "add desktop" button which then might give us 3
virtual desktops. As a general rule any setter exposed via a declarative
API should always perform the setting.

Reloading has to be delayed because otherwise we unload the caller.

M  +21   -7    src/effect/quickeffect.cpp
M  +1    -0    src/effect/quickeffect.h

https://invent.kde.org/plasma/kwin/-/commit/84633badc74ca2502bfd33bc4566667eb4bb57ca
Comment 3 Nate Graham 2024-06-19 18:54:28 UTC
For the record, it broke again, which is now being tracked in Bug 488654.