obs-studio icon indicating copy to clipboard operation
obs-studio copied to clipboard

Instant crash trying to capture screen using Wayland in 29.0 Beta 1

Open David-Else opened this issue 2 years ago • 7 comments

Operating System Info

Other

Other OS

RHEL 9.1 (actually a clone, AlmaLinux 9.1)

OBS Studio Version

Other

OBS Studio Version (Other)

29.0 Beta 1 flatpak

OBS Studio Log URL

https://obsproject.com/logs/pBl5C7XBrUFlS86b

OBS Studio Crash Log URL

I don't know of any other log file

Expected Behavior

I want to record the screen with Screen Capture (Pipewire), I click it, select the monitor and it should work.

Current Behavior

It just crashes instantly.

Steps to Reproduce

  1. Start OBS
  2. Select Screen Capture (Pipewire)
  3. Select the monitor (as shown below) ... Screenshot from 2022-11-23 20-00-28

Anything else we should know?

It was working on the last stable version using flatpak.

This version gets the screen resolution wrong, it is a 4k monitor, but it thinks it is current 1920 x 1080 (it is not) or 7680 x 4320 (which does not exist):

Screenshot from 2022-11-23 19-38-43

Actual Gnome settings

Screenshot from 2022-11-23 19-41-06

In case it helps:

$ dnf info pipewire

Installed Packages
Name         : pipewire
Version      : 0.3.47
Release      : 2.el9_0
Architecture : x86_64
Size         : 74 k
Source       : pipewire-0.3.47-2.el9_0.src.rpm
Repository   : @System
From repo    : AppStream
Summary      : Media Sharing Server
URL          : https://pipewire.org/
License      : MIT
Description  : PipeWire is a multimedia server for Linux and other Unix like operating
             : systems.

David-Else avatar Nov 23 '22 20:11 David-Else

Did the same happen with 28.1.2 ?

Edit: Sorry I didn't see that you already specified it.

tytan652 avatar Nov 23 '22 20:11 tytan652

Did the same happen with 28.1.2 ?

No, that worked fine.

David-Else avatar Nov 23 '22 20:11 David-Else

Note: Between 28.1.2 and 29, we changed the Flatpak runtime and use now the included PipeWire (from Freedesktop) rather than our own module.

tytan652 avatar Nov 23 '22 20:11 tytan652

I hope the final version of 29 works on Wayland using Flatpak or it would be a major regression.

David-Else avatar Dec 31 '22 18:12 David-Else

… or it would be a major regression.

You (or RHEL 9) seems to be the only one having this issue, calling it a "major regression" is a overstatement.

tytan652 avatar Dec 31 '22 19:12 tytan652

Popping in to say that I can't reproduce this on NixOS 22.11. Multi-monitor setup, one's 1080p and one's 1440p, both 144hz monitors, I can capture both or either display without issue on the flatpak beta. I'm on KDE, though. So this could be GNOME, 4k resolution, or maybe something specific to RHEL.

You (or RHEL 9) seems to be the only one having this issue, calling it a "major regression" is a overstatement.

This is a really callous way of responding to a bug that breaks a major/primary feature of OBS (which, I'd argue display capturing is), without even specifying that you've tested it and can't reproduce it, or asking for more information.

viscountexx avatar Jan 08 '23 18:01 viscountexx

@mindmeshlink Thanks for testing. I don't know what is going on with RHEL 9.1, but I have given up on using Wayland for now, it has caused issues in some other apps too. Wayland is nearly ready to replace Xorg, but not quite yet.

David-Else avatar Jan 08 '23 18:01 David-Else

Hey guys! I'm having this issue too. It also happens when trying to capture a window. When opening OBS after it crashes, the Select Window/Screen dialog pops up immediately again.

OBS version: 29.0.0 OS: Ubuntu 22.04, Gnome on Wayland

neolight1010 avatar Feb 01 '23 00:02 neolight1010

I guess I should have asked that a while ago but a backtrace of the issue is needed (I just didn't know about using GDB in the Flatpak).

For the Flatpak (src):

$ flatpak install org.freedesktop.Sdk.Debug com.obsproject.Studio.Debug # Optional: Install OBS and PipeWire debug symbols
$ flatpak run --command=sh --devel com.obsproject.Studio
$ gdb /app/bin/obs

In non-flatpak:

$ gdb obs

Once gdb ready, run by entering the command r and reproduce the crash. Once done, you should be able to enter the command bt. Message the output of this command. You can quit by entering the command q.

tytan652 avatar Feb 01 '23 06:02 tytan652

flatpak run --command=sh --devel com.obsproject.Studio

Thanks, I'm using the following versions:

Ubuntu 22.04.1 LTS using Gnome 42.5 on Wayland (XPS 13 Plus 9320 (4k IPS) with i7 1260P). Flatpak: com.obsproject.Studio | Version: 29.0.2

Please note that the packaged OBS by Ubuntu doesn't contain this issue, although it's (obviously) rather outdated so I prefer to use the Flatpak if possible. The packaged version by Ubuntu is: obs-studio/jammy 27.2.3+dfsg1-1 amd64

GDB backtrace of the Flatpak version (all debug symbols enabled):

info: [pipewire] desktop selected, setting up screencast
[New Thread 0x7fff5ebad640 (LWP 93)]
[New Thread 0x7fff161c2640 (LWP 94)]
info: [pipewire] Server version: 0.3.48
info: [pipewire] Library version: 0.3.59
info: [pipewire] Header version: 0.3.59
info: [pipewire] Created stream 0x55555749ea90
info: [pipewire] Stream 0x55555749ea90 state: "connecting" (error: none)
info: [pipewire] Playing stream 0x55555749ea90
info: [pipewire] Stream 0x55555749ea90 state: "paused" (error: none)

Thread 46 "PipeWire thread" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff161c2640 (LWP 94)]
0x00007fff78dee21e in impl_send_command () from /usr/lib/x86_64-linux-gnu/libpipewire-0.3.so.0
(gdb) bt
#0  0x00007fff78dee21e in impl_send_command () at /usr/lib/x86_64-linux-gnu/libpipewire-0.3.so.0
#1  0x00007fff78dd29bb in pw_impl_node_set_state ()
    at /usr/lib/x86_64-linux-gnu/libpipewire-0.3.so.0
#2  0x00007fff785b5a3d in client_node_command ()
    at /usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-client-node.so
#3  0x00007fff785c4474 in client_node_demarshal_command.lto_priv ()
    at /usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-client-node.so
#4  0x00007fff785fd738 in process_remote ()
    at /usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-protocol-native.so
#5  0x00007fff785fddc0 in on_remote_data ()
    at /usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-protocol-native.so
#6  0x00007fff78d453c0 in loop_iterate ()
    at /usr/lib/x86_64-linux-gnu/spa-0.2/support/libspa-support.so
#7  0x00007fff78df52bc in do_loop () at /usr/lib/x86_64-linux-gnu/libpipewire-0.3.so.0
#8  0x00007ffff436a1da in start_thread () at /usr/lib/x86_64-linux-gnu/libc.so.6
#9  0x00007ffff43f2d84 in clone () at /usr/lib/x86_64-linux-gnu/libc.so.6

Andreas02-dev avatar Feb 07 '23 09:02 Andreas02-dev

This is a known regression in pipewire, that we reported and was fixed in 0.65. For now you can either build obs from scratch on the host instead of using flatpak or upgrade the host to at least pipewire 0.65 to work around this issue.

kkartaltepe avatar Feb 07 '23 13:02 kkartaltepe

@GeorgesStavracas This bug is only half fixed. OBS still can't see the resolution of my 4k screen.

This version gets the screen resolution wrong, it is a 4k monitor, but it thinks it is current 1920 x 1080 (it is not) or 7680 x 4320 (which does not exist):

I have changed my operating system to Debian 12 which has pipewire 0.3.6.5 and am using OBS 29.1.3 flatpak, so it no longer crashes, but it still does exactly the same thing in regard to the resolutions as in the screen shots I attached, it won't detect the available resolutions correctly. My workaround is to setup OBS in Xorg and then switch to Wayland. It remembers the resolutions and works OK.

Here are the options it gives me after I have used the hack to get the correct resolution:

Screenshot from 2023-07-05 12-05-29

David-Else avatar Jul 05 '23 11:07 David-Else

That would be a different issue, but since you are using debian I would recommend not making an issue until you attempt on a modern Qt release. Either on something like arch or debian testing. If the issue still persists with in those environments feel free to make an issue (though it would probably end up being a bug in Qt anyway).

As for workarounds just type the output resolution you want into the box if you dont see it in the list. You dont need to load up on Xorg.

kkartaltepe avatar Jul 05 '23 15:07 kkartaltepe

@kkartaltepe Thanks for the quick reply. Debian 12 is less than an month old and comes with Gnome 43 etc. I don't fully understand how flatpak dependencies relate to OS dependencies, is the OBS Flatpak not packaging its own Qt? If not, what version does OBS expect?

I don't count an OS released a month ago as not modern, although I understand that Debian stable gets out of date quickly, it is not the case at this point in time. Debian backports is not even out yet for Debian 12.

David-Else avatar Jul 05 '23 17:07 David-Else