FIX: Prevent crash when window icon texture is null (#13461)#13466
FIX: Prevent crash when window icon texture is null (#13461)#13466carsteneu wants to merge 1 commit intolinuxmint:masterfrom
Conversation
When muffin emits a notify::icon signal during idle_update_icon(), the window-list applets call create_icon_texture_for_window() which can return null in race conditions (e.g., when a WebApp window is being destroyed or its icon is unavailable). Previously, this null value was passed directly to set_child(), causing a SIGSEGV in _clutter_actor_queue_only_relayout(self=0x0). This fix adds a null check after create_icon_texture_for_window() and falls back to a default icon, preventing the crash. Affected applets: - window-list@cinnamon.org - grouped-window-list@cinnamon.org
|
Fixed as part of d4166a1 edit: please double-check for me - this was mainly to fix wayland sessions, but may not completely have fixed the issue in x11. |
|
Thank you very much for your Feedback - I tested your fix in X11 (Linux Mint 22.3 VM) with aggressive stress tests: Tests: 30x rapid Firefox launch/kill with spiegel.de (heavy content page) My PR added a defensive null-check after Happy to close PR #13466 since your fix covers both Wayland and X11. Let me know if you prefer we should keep the additional null-check as defense-in-depth. |
Fixes #13461
Cinnamon crashes when using WebApps (e.g. WhatsApp installed from Brave Browser) after the app has been running for a while.
When muffin emits a notify::icon signal during idle_update_icon(), the window-list applets call create_icon_texture_for_window() which can return null in race conditions (e.g., when a WebApp window is being destroyed or its icon is unavailable).
Previously, this null value was passed directly to set_child(), causing a SIGSEGV in _clutter_actor_queue_only_relayout(self=0x0).
This fix adds a null check after create_icon_texture_for_window() and falls back to a default icon, preventing the crash.
Tried it with that fix - no crash detected.
Affected applets:
window-list@cinnamon.org
grouped-window-list@cinnamon.org