Files
Waybar/include/modules
Alex 8664d9a963 fix(wireplumber): guard async load callbacks against use-after-free on teardown
The WirePlumber module registers three async callbacks (onDefaultNodesApiLoaded,
onMixerApiLoaded, onPluginActivated) that receive a raw self pointer with a NULL
GCancellable. WirePlumber cannot withdraw an in-flight callback, so if the module
is destroyed before a queued callback fires (e.g. a temporary output/bar is removed
while a component load is still pending, or during an audio route transition), the
callback dereferences the freed self, causing heap corruption / a crash.

Guard each of these callbacks with isModuleAlive(), which checks the existing static
modules registry. The destructor already removes this from the registry before any
teardown, so a missing entry means self is dangling and the callback bails out
without touching it.

A GCancellable cannot fix this cleanly here: every callback dereferences self on its
first line, and wp_core_load_component completes via a WpTransition (not a GTask), so
the cancellable is not recoverable from the GAsyncResult either. The liveness check
must not touch self at all.

Fixes #3974.
2026-07-04 13:04:04 +02:00
..
2026-02-04 09:24:14 +01:00
2026-03-30 14:25:41 -07:00
2026-07-04 01:42:35 +02:00
2023-10-15 17:52:12 -03:00
2026-07-03 23:51:45 +02:00
2026-07-03 23:52:02 +02:00
2023-10-17 19:29:06 +02:00
2024-02-19 23:10:10 +01:00
2026-05-25 08:18:12 +04:00
2025-06-22 10:01:36 +02:00
2023-03-02 16:57:32 +03:00
2026-02-04 09:24:14 +01:00
2023-10-17 19:29:06 +02:00
2023-03-02 16:57:32 +03:00
2026-02-04 09:24:14 +01:00
2026-02-04 09:24:14 +01:00
2023-03-02 16:57:32 +03:00