Skip to content

[Wayland] Crash On Pipewire Screen Capture: obs-studio 31.0.0-1, pipewire 1.2.7

Hello Arch Linux GitLab Package Maintainers and Community, thank you for your consideration and time! I have done my utmost to be comprehensive, my apologies for any mistakes.

Description:

When trying to use OBS for screen capture with Wayland, the 'Screen Capture (PipeWire)' mode will cause the app to crash ("SIGTRAP") under Wayland or XWayland when a screen/app capture source is selected. This is caused by OBS Studio's libobs calling query_dmabuf_modifiers or query_dmabuf_formats (EGL-Registry) which returns 0 modifiers, and then trying to allocate 0 bytes with bzalloc or bmalloc. Which then triggers the call to bcrash added by OBS Studio to libobs in: GitHub obsproject/obs-studio "libobs/util: Crash on bmalloc(0) #11181". This behavior was primarily observed when using an AMD Radeon RX 400-series or 500-series GPU.

Additional info:

See: Arch Linux Forums Index » Applications & Desktop Environments » "[Wayland] Crash On Screen Capture: obs-studio 31.0.0-1, pipewire 1.2.7"

Steps to reproduce:

  • Arch Linux (Installed according to Arch Wiki),
  • Linux kernel (linux 6.12.4.arch1-1),
  • Desktop Manager (gdm 47.0-2) and Wayland (wayland 1.23.1-1), with KDE Plasma 6 (plasma-desktop 6.2.4-1, plasma-meta 6.1-1) or GNOME 47 (gnome-desktop 1:44.1-1, gnome-session 47.0.1-1, gnome-shell 1:47.2-1)
  • Pipewire (libpipewire 1:1.2.7-1, pipewire 1:1.2.7-1) with WirePlummer (libwireplumber 0.5.7-1, wireplumber 0.5.7-1)
  • OBS Studio (obs-studio 31.0.0-1, ffmpeg 2:7.1-3, alsa-lib 1.2.13-1, glibc 2.40+r16+gaa533d58ff-2, gcc-libs 14.2.1+r134+gab884fffe3fc-1, systemd-libs 257-1, pam 1.7.0-1, pipewire-audio 1:1.2.7-1, mesa 1:24.3.1-3)
  • Start a Wayland desktop session,
  • Open OBS (through .desktop file, terminal obs, or with GDB)
  • Click the "+" ("Add Source") button in the "Sources" section, and select "Screen Capture (PipeWire)" option,
  • In the "Properties for 'Screen Capture (PipeWire)'" OBS pop-up window, click the "Open Selector" button. (This step will fail under an X.Org desktop session.)
  • In the "Screen Sharing" GNOME/KDE pop-up dialog menu window, select any of the options under either the "screens" tab or the "windows" tab (for attached/virtual monitors or open application windows respectively),
  • Immediate crash (SIGTRAP under GNU Debugger)
  • Get a SystemD coredump file added to /var/lib/systemd/coredump
Edited by Joshua
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information