https://bugs.kde.org/show_bug.cgi?id=522547
Francis <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pacaro.francis.marlou.n@gma | |il.com --- Comment #11 from Francis <[email protected]> --- Created attachment 196692 --> https://bugs.kde.org/attachment.cgi?id=196692&action=edit KWin: ignore set_blur_region on inert background effect object (against v6.7.5) Confirming on CachyOS: KWin 6.7.5, KWindowSystem 6.30.0, Qt 6.11.2, AMD RX 6600, Wayland. My journal (which starts on 2026-08-30) shows plasmashell disconnected 10 times between 2026-08-31 and 2026-09-29 with the error below. 4 of those happened before my 2026-09-10 update to KWin 6.7.5 / KWindowSystem 6.30 and 6 after it, so this isn't new in that update: ext_background_effect_surface_v1#N: error 0: tried to set blur region on destroyed surface The Wayland connection experienced a fatal error: Protocol error I tested the compositor-side fix suggested in comment 10 and it works. The patch is attached. Deterministic reproducer. This is a small libwayland client that doesn't depend on the race. It creates a wl_surface, calls get_background_effect for it, destroys the surface, then calls set_blur_region(NULL) on the effect object: surface = wl_compositor_create_surface(compositor); effect = ext_background_effect_manager_v1_get_background_effect(manager, surface); wl_surface_destroy(surface); ext_background_effect_surface_v1_set_blur_region(effect, NULL); wl_display_roundtrip(display); /* stock KWin: EPROTO, error 0 */ - Stock 6.7.5 kills the client every time with the same error plasmashell gets. - With the attached patch, the client stays connected. I checked both on headless kwin_wayland --virtual instances and then in a live session. The patch is against v6.7.5, and src/wayland/backgroundeffect_v1.cpp is unchanged on master. It removes the wl_resource_post_error() call in ExtBackgroundEffectSurfaceV1::ext_background_effect_surface_v1_set_blur_region(), so set_blur_region on an object whose surface is gone is ignored instead of killing the client. The protocol text contradicts itself here. The interface description says the object "becomes inert" once its surface is destroyed, but set_blur_region says surface_destroyed "will be raised". The inert reading costs nothing, because a blur region for a surface that no longer exists carries no information. The only visible effect is that the popup that lost the race is shown without blur that one time. The client-side stale-object reuse in KWindowSystem is still a bug, but with this change it can no longer take down plasmashell or other Qt apps. I only started running the patched build on my system on 2026-09-29 (Blur enabled), so I don't have long-term results yet. I'll post an update here after a few days. Since Bugzilla isn't monitored for patches, I'll also submit this as a merge request on invent.kde.org. -- You are receiving this mail because: You are watching all bug changes.
