You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Crash (NULL deref) in screencast-portal.c start() when a delayed portal SelectSources response arrives after the session is gone #13809
32.2.1 (Arch extra 32.2.1-7). The unguarded call is still present in current master.
Expected behavior
If the ScreenCast portal responds to SelectSources after the capture's session has been
torn down (e.g. the response arrives after the 25s D-Bus timeout already failed the request),
OBS should ignore the stale response.
Actual behavior
SIGSEGV (SEGV_MAPERR) in the main thread, 4 identical crashes in one session:
start() in plugins/linux-pipewire/screencast-portal.c calls g_variant_new("(osa{sv})", capture->session_handle, "", &builder) with no NULL check on capture->session_handle. OBS's own log ends at [pipewire] Asking for monitor and window
— the log line at the top of start() — microseconds before the crash.
Trigger / reproduction sketch
Heavy capture renegotiation (multiple screen-capture sources created/destroyed, scene
switches) on Hyprland; xdg-desktop-portal-hyprland becomes wedged under load
(DMA-BUF alloc failures → SHM fallback → "Out of buffers", then unresponsive).
OBS logs several Error creating screencast session: Timeout was reached (25s D-Bus timeout).
When the portal recovers (~78s later in our capture), it emits the response to the stale
SelectSources request. The GDBus signal subscription is still connected, but the capture's session_handle is NULL → crash in g_variant_new.
Suggested fix
NULL-check capture->session_handle at the top of start() (and defensively in on_create_session_response_received_cb), logging and aborting the stale start instead of
crashing.
Evidence available
Four coredumps (systemd-coredump, byte-identical stacks at 12:10/12:36/12:40/12:55 local),
full OBS logs, and the portal-side journal showing the wedge and recovery timeline.
Happy to attach any of these.
Related but distinct: #5468, #11156, #9733 (other pipewire crashes; none match this
NULL-session-after-timeout path).
Activity
Fenrirthviti commentedon Aug 20, 2026
Please properly fill out the issue template.
This reads like it was written by AI in violation of our contribution policy.
LIghtJUNction commentedon Oct 23, 2026
screencast-portal.c:303: start()
Without checking the session pointer, it is passed to GLib.