Repository navigation
Description
Operating System Info
Other
Other OS
Arch Linux
OBS Studio Version
Git
OBS Studio Version (Other)
OBS Studio Log URL
OBS won't let me upload an old-enough log file. Will attach instead.
OBS Studio Crash Log URL
No response
Expected Behavior
Full screen recording on selected monitor.
Current Behavior
OBS crashes after the second time I select the screen (I'm not sure why, but OBS always asks me twice for which screen to use on start-up), with:
(lldb) bt
* thread #28, name = 'PipeWire thread', stop reason = signal SIGSEGV: invalid address (fault address: 0x30)
* frame #0: 0x00007fffc7e3e8ec linux-pipewire.so`renegotiate_format(data=0x0000555557a102e0, expirations=<unavailable>) at pipewire.c:631:2
frame #1: 0x00007fffbffe4cc9 libspa-support.so`source_event_func(source=0x00005555574dcc60) at loop.c:663:2
frame #2: 0x00007fffbffe6666 libspa-support.so`loop_iterate(object=0x00005555574af308, timeout=<unavailable>) at loop.c:496:4
frame #3: 0x00007fff88cda14d libpipewire-0.3.so.0`do_loop(user_data=0x0000555557315260) at thread-loop.c:295:14
frame #4: 0x00007ffff3eaa9eb libc.so.6`start_thread(arg=<unavailable>) at pthread_create.c:444:8
frame #5: 0x00007ffff3f2e7cc libc.so.6`__clone3 at clone3.S:78
I'm running:
- obs-studio @ b29a44a
- pipewire: 0.3.82
- hyprland: 0.30.0
- xdg-desktop-portal-hyprland: 1.2.2
on Arch Linux. The logs just prior to the crash are:
09:01:45.260: [pipewire] Asking for desktop
09:01:46.292: [pipewire] Asking for desktop
09:01:46.293: [pipewire] desktop selected, setting up screencast
09:01:46.294: [pipewire] desktop selected, setting up screencast
09:01:46.565: [pipewire] Server version: 0.3.82
09:01:46.565: [pipewire] Library version: 0.3.82
09:01:46.565: [pipewire] Header version: 0.3.82
09:01:46.565: [pipewire] Created stream 0x5555574dccd0
09:01:46.565: [pipewire] Stream 0x5555574dccd0 state: "connecting" (error: none)
09:01:46.566: [pipewire] Playing stream 0x5555574dccd0
09:01:46.602: [pipewire] Stream 0x5555574dccd0 state: "paused" (error: none)
09:01:46.603: [pipewire] Server version: 0.3.82
09:01:46.603: [pipewire] Library version: 0.3.82
09:01:46.603: [pipewire] Header version: 0.3.82
09:01:46.603: [pipewire] Negotiated format:
09:01:46.603: [pipewire] Format: 8 (Spa:Enum:VideoFormat:BGRx)
09:01:46.603: [pipewire] Modifier: 0x0
09:01:46.603: [pipewire] Size: 3840x2160
09:01:46.603: [pipewire] Framerate: 0/1
09:01:46.603: [pipewire] Created stream 0x555557511cf0
09:01:46.603: [pipewire] Stream 0x555557511cf0 state: "connecting" (error: none)
09:01:46.603: [pipewire] Playing stream 0x555557511cf0
09:01:46.603: [pipewire] Stream 0x555557511cf0 state: "paused" (error: none)
09:01:46.603: [pipewire] Negotiated format:
09:01:46.603: [pipewire] Format: 8 (Spa:Enum:VideoFormat:BGRx)
09:01:46.603: [pipewire] Modifier: 0x200000028a37f04
09:01:46.603: [pipewire] Size: 3840x2160
09:01:46.603: [pipewire] Framerate: 0/1
09:01:46.604: [pipewire] Stream 0x5555574dccd0 state: "streaming" (error: none)
09:01:46.605: [pipewire] Negotiated format:
09:01:46.605: [pipewire] Format: 8 (Spa:Enum:VideoFormat:BGRx)
09:01:46.605: [pipewire] Modifier: 0x0
09:01:46.605: [pipewire] Size: 3840x2160
09:01:46.605: [pipewire] Framerate: 0/1
09:01:46.606: [pipewire] Negotiated format:
09:01:46.606: [pipewire] Format: 8 (Spa:Enum:VideoFormat:BGRx)
09:01:46.606: [pipewire] Modifier: 0x200000028a37f04
09:01:46.606: [pipewire] Size: 3840x2160
09:01:46.606: [pipewire] Framerate: 0/1
09:01:46.623: Cannot create EGLImage: Arguments are inconsistent (for example, a valid context requires buffers not supplied by a valid surface).
09:01:46.623: [pipewire] Renegotiating stream
If I remove all the pipewire inputs from my scene JSON config, then OBS starts just fine (and doesn't prompt me to select a screen). If I then try to add a window capture via Pipewire, it crashes again (after I select the screen).
Log file from crashing run:
2023-10-19 09-17-06.txt
Steps to Reproduce
- Open OBS Studio
- Add pipewire as a source
- Select a screen
- Crash
Anything else we should know?
Not sure if this is related to #9617.
I'm using a build of Git HEAD.
Downgrading pipewire and xdg-desktop-portal-hyprland, restarting, and then starting OBS fixes the problem.
Activity
jonhoo commentedon Oct 19, 2023
Possibly related to hyprwm/xdg-desktop-portal-hyprland#112 (where the maintainer suggests it's likely an obs issue).
nickc01 commentedon Oct 20, 2023
mesmerx commentedon Oct 20, 2023
+1 same crash for me
but my bt is a little different
kkartaltepe commentedon Oct 21, 2023
if your stack has
#1 0x00007fff8c1841b8 in swap_texture_red_blue (texture=0x7fff6014fe20)this is a duplicate already fixed issue. Please only provide stacks from current master obs, always include the commit id you have tested on.And ensure your stacks have symbols and lines , stacks without debug symbols are not going to be helpful in identifying if there are any other additional issues than what was originally reported.
nickc01 commentedon Oct 21, 2023
I emerged the 9999 ebuild versions of obs and pipewire, and now it no longer crashes when sharing screens. However, when I go to share the screen, the red and blue channels seem to be swapped.

The obs logs says the negotiated format was Spa:Enum:VideoFormat:RGBX
I can create a separate issue for this, since it no longer seems relevant to the problem in this issue
kkartaltepe commentedon Oct 21, 2023
Yes please create another issue for this.I already have a fix pending for this so no need for an issue.kkartaltepe commentedon Oct 21, 2023
I was able to replicate this.
linux-pipewire: Load glad symbols on start
kkartaltepe commentedon Oct 21, 2023
Ok actually it was probably a different issue, but if you can try the glad symbols change and see if it fixes anything that would help.
nickc01 commentedon Oct 23, 2023
Update
So I tried reemerging the 9999 ebuilds of obs-studio and pipewire to test out the new commits, and I'm now getting the SEGFAULT again when selecting a monitor to share. What's interesting is that the backtrace shows that the segfault is occurring at the "swap_texture_red_blue" function. Except now it's SEGFAULTing on the 9999 builds, even though this should already be a fixed issue.
Pipewire commit - 920beea3
OBS Studio commit - 454fc55
Console Log
Details
Backtrace
Details
jonhoo commentedon Oct 23, 2023
I'm traveling for most of this week, but will give it a try once I have a chance, thanks!
nickc01 commentedon Oct 24, 2023
I was able to build the kkartaltepe:pipewire-load-gl version of obs, and it seems to have fixed the crashing issue. It still had the "red and blue channels swapped" issue, but that was fixed after I applied the changes you made here #9743 (comment), which looks to already be merged into master. OBS seemed to function normally now, and I was able to record my desktop with no issues 👍

sebastian-s-beckmann commentedon Oct 26, 2023
@jonhoo could you retry whether this still happens on latest master (as of today)?
jonhoo commentedon Oct 26, 2023
Should have a chance to test it this weekend! 👍
MasterKing0806 commentedon Oct 27, 2023
Just tested screensharing on latest master and it did not work for me either. Obs was still crashing.
I am on the newest Hyprland and xdg-desktop-portal-hyprland commit on Arch. Pipewire is also on the latest version from the Arch repo.
jonhoo commentedon Oct 28, 2023
@gxalpha No luck with latest
master(specifically ba44671) and all other dependencies fully updated:Log: obs.log
linux-pipwire: Pass obs_pw_stream to renegitation callback
linux-pipwire: Pass obs_pw_stream to renegitation callback
linux-pipwire: Pass obs_pw_stream to renegotiation callback
linux-pipwire: Pass obs_pw_stream to renegotiation callback
linux-pipwire: Pass obs_pw_stream to renegotiation callback
jonhoo commentedon Oct 29, 2023
Yep, can confirm that this was fixed by #9774 🎉
Thanks all!
linux-pipwire: Pass obs_pw_stream to renegotiation callback