Repository navigation
Description
The obs-rust AppImage crashes on launch for anyone whose scene has a Screen Capture (PipeWire) source, the usual capture on Wayland. OBS segfaults about a second after start, as soon as the portal hands it the PipeWire connection. (If the portal request is denied or cancelled, OBS never gets that far and doesn't crash.) It has done this since the AppImage was first published (#221, #269), and CI passed every time.
@zackees @probonopd, you're tagged because you merged and wrote the AppImage work (#221, #269, #91).
Affected: every published AppImage. Checked by listing the AppImage contents: continuous (every build since #269; reproduced on f44de6ee6, still missing the files at bbcfb4320) and the dated beta obs-studio-rust-v0.1.0-beta.20261012. The 20261011 beta has no AppImage.
Operating System: Arch Linux, Hyprland (Wayland), PipeWire 1.6.8 with pipewire-pulse, xdg-desktop-portal-hyprland 1.4.1
Steps to reproduce:
- Have a scene with a Screen Capture (PipeWire) source.
- Start
OBS_Studio-33.0.0-beta6-723-gf44de6ee6-x86_64.AppImage. - OBS segfaults after
[pipewire] source selected, setting up screencast.
Log and backtrace:
pw.conf: error loading config '/tmp/.mount_obs-XXXXXX/usr/share/pipewire/client.conf': No such file or directory
pw.conf: can't load config client.conf: No such file or directory
Signal: 11 (SEGV) si_code: SEGV_MAPERR
#0 ?? () from usr/lib/libpipewire-0.3.so.0
#1 pw_context_connect_fd () from usr/lib/libpipewire-0.3.so.0
Cause
Two bugs line up:
- The AppImage ships half of PipeWire. It bundles
libpipewire-0.3.so.0andspa-0.2, but notusr/lib/pipewire-0.3/(the client modules, including the native protocol) orusr/share/pipewire/(client.conf).AppRunstill pointsPIPEWIRE_MODULE_DIRandPIPEWIRE_CONFIG_DIRat those missing directories.assemble-appdir.shcopies them with[ -d "$SYSLIB/pipewire-0.3" ] && cp ..., which silently skips a missing directory despiteset -euo pipefail.- The CI build host (Ubuntu 26.04) installs only
libpipewire-0.3-devwith--no-install-recommends. The client modules live inlibpipewire-0.3-modulesandclient.confinpipewire-bin, so they were never on the host to copy.
- OBS doesn't check
pw_context_new(). Inplugins/linux-pipewire/pipewire.c, the result is stored and the next call uses it. Withoutclient.conf,pw_context_new()returns NULL, andpw_context_connect_fd(NULL, …)segfaults. On a normal install the system config is always there, so this never fires, but it should fail the source rather than crash OBS.
Reproduced outside OBS: a five-line program calling pw_context_new() then pw_context_connect() connects normally with the system libpipewire. With only the AppImage's PIPEWIRE_MODULE_DIR/PIPEWIRE_CONFIG_DIR set, it gets context=(nil) and segfaults with the same config error.
Why CI passed
test-appimage.sh starts the AppImage in Debian, Ubuntu and Fedora containers with a fresh profile and no scenes, and checks that a window appears and renders. Nothing connects to PipeWire, PulseAudio or a portal, so the code that crashes never runs. The test proves the window opens, not that OBS can capture or record. continuous is published on that result.
Upstream OBS has nothing to copy here: its CI never launches OBS, and its Flatpak gets PipeWire from the runtime. This repo already has the pieces, though: the private PipeWire daemon harness (test_pipewire_cursor_hdr.sh, test_pulse_monitor_device.sh) and the fake ScreenCast portal in test_pipewire_screencast_resume.c.
Fix (two PRs, in progress)
linux-pipewire: don't crash when PipeWire setup fails (linux-pipewire: Fail cleanly when the PipeWire client cannot start #429). Check the results ofpw_context_new()and the connect calls, log the cause, and leave the source failed instead of segfaulting. RED→GREEN cmocka test with a missing config directory; it needs no PipeWire daemon, so it also runs in CI.- AppImage: bundle PipeWire completely and test what users run. All headless, with fakes instead of devices:
- Install
libpipewire-0.3-modulesandpipewire-binon the build host.assemble-appdir.shfails if any directoryAppRunexports is missing or incomplete, instead of skipping it. - Layer 1, everything loads: inside the
AppRunenvironment,dlopenevery bundled library, OBS plugin, PipeWire module, SPA plugin, GIO module, gconv module and Qt plugin. OBS's "Loaded modules" list must match the build, with a short allowlist for hardware-only modules (DeckLink, NVENC, QSV). - Layer 2, each subsystem is used once: a probe connects to a private PipeWire daemon and
pipewire-pulseand does one round trip with each. - Layer 3, a real profile records: a seeded profile with a PipeWire screen capture, a PulseAudio mic and a PipeWire camera; the fake ScreenCast portal on a private D-Bus; fake producers replaying a known moving pattern and a known tone. OBS records a few seconds, and ffmpeg checks that the picture moves and the tone is there. OBS must stay up and the screencast must reach
streaming. - These tests have to fail on today's
continuousbefore they pass on the fix, andcontinuousonly updates when all three pass. - Rule in
AGENTS.md: packaging PRs must pass the real-profile launch, and review checks that the tests cover what users run, not only that a window opens.
- Install
Written with Claude Code (Claude Opus 5.5).
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
test: Crash when PipeWire has no client configuration (RED)
linux-pipewire: Fail cleanly when the PipeWire client cannot start
rdoupe commentedon Oct 13, 2026
Follow-ups found while fixing this. They're listed here so nobody duplicates them. Each one gets its own issue and claim when its PR starts, in this order:
Release launch safety (each of these could still let a release crash on launch with CI green):
continuousand the dated betas. This one is next, right after the packaging PR.libstdc++,libdrmand so on, and CI only uses software GL. Planned: fail the build on libraries the driver stack must share (the usual AppImage excludelist), and load the distro's EGL/VA-API drivers against the bundle in the test containers.AppRunredirect needs a test that uses it. The guard proves each exported path exists. A table inbuild-aux/appimage/README.mdmaps each export and bundled subsystem to its test, and lists what's still untested (V4L2, JACK, GlobalShortcuts portal).AppRunenables Qt, GL and EGL debug logging (QT_DEBUG_PLUGINS=1 LIBGL_DEBUG=verbose EGL_LOG_LEVEL=debug), which floods users' logs.nullPCM probe first.PipeWire source behaviour (no crash, but users are left guessing):
initializingset, so camera sources stay black, with no explanation and no retry.obs_pipewire_connect_fd(). A dead peer during the first sync may hang the camera setup (needs a repro first), and the duplicated fd can leak if PipeWire fails before taking it.test: Crash when PipeWire has no client configuration (RED)
linux-pipewire: Fail cleanly when the PipeWire client cannot start
zackees commentedon Oct 13, 2026
Heads-up from #436 (maintainer request): Flatpak, the macOS/Windows OBS builds, Ubuntu Rust-libobs and Tier 2 macOS/Windows are moving out of PR and master-push runs into a gate that the daily release requires.
appimage.yamlstops running per master push (continuousrefreshes from the daily release). Those jobs still run, so caching work still pays off at release time. I'll keep myappimage.yamledit to the trigger and the publish condition.linux-pipewire: Fail cleanly when the PipeWire client cannot start (#429
ci: Test the AppImage with a saved PipeWire profile (RED)
build-aux: Bundle PipeWire's modules and client.conf in the AppImage …
AGENTS.md: Require a real-profile test for packaging changes
test: Check the host driver search paths AppRun hands OBS (obs-rust#892…