YaLTeR / niri

A scrollable-tiling Wayland compositor.
https://matrix.to/#/#niri:matrix.org
GNU General Public License v3.0
3.58k stars 105 forks source link

OBS crashes when using browser source #585

Closed raiguard closed 1 month ago

raiguard commented 1 month ago

When attempting to add a browser source to OBS (flatpak), OBS crashes. While OBS is the one segfaulting, this crash only occurs on Niri - Sway and Gnome work fine.

https://github.com/user-attachments/assets/dcba5420-61f2-4dea-8771-2c7bf0c4ae13

journalctl:

Aug 10 13:23:10 tantal audit[146776]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=18 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=146776 comm="CrBrowserMain" exe="/app/bin/obs" sig=11 res=1
Aug 10 13:23:10 tantal kernel: CrBrowserMain[147711]: segfault at 8 ip 00007f33315dbd40 sp 00007f3357dfef80 error 4 in libcef.so[7f332dece000+9445000] likely on CPU 12 (core 2, socket 0)
Aug 10 13:23:10 tantal kernel: Code: cc cc cc cc cc cc cc cc cc cc 55 48 89 e5 41 57 41 56 41 54 53 48 83 ec 30 49 89 f7 49 89 fc 31 ff e8 74 da f3 fd 84 c0 74 3f <49> 8b 7c 24 08 48 85 ff 75 0d 4c 89 e7 e8 8e fb ff ff 49 8b 7c 24
Aug 10 13:23:10 tantal audit: BPF prog-id=255 op=LOAD
Aug 10 13:23:10 tantal audit: BPF prog-id=256 op=LOAD
Aug 10 13:23:10 tantal audit: BPF prog-id=257 op=LOAD
Aug 10 13:23:10 tantal systemd[1]: Started systemd-coredump@26-147721-0.service - Process Core Dump (PID 147721/UID 0).
Aug 10 13:23:10 tantal audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-coredump@26-147721-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Aug 10 13:23:10 tantal systemd-coredump[147722]: Process 146776 (obs) of user 1000 dumped core.

                                                 Stack trace of thread 125:
                                                 #0  0x00007f33315dbd40 n/a (/app/lib/obs-plugins/libcef.so + 0x57dbd40)
                                                 #1  0x00007f333156d7ea n/a (/app/lib/obs-plugins/libcef.so + 0x576d7ea)
                                                 #2  0x00007f33315923c3 n/a (/app/lib/obs-plugins/libcef.so + 0x57923c3)
                                                 #3  0x00007f333159212e n/a (/app/lib/obs-plugins/libcef.so + 0x579212e)
                                                 #4  0x00007f333156cee9 n/a (/app/lib/obs-plugins/libcef.so + 0x576cee9)
                                                 #5  0x00007f333156cc03 n/a (/app/lib/obs-plugins/libcef.so + 0x576cc03)
                                                 #6  0x00007f332decf3b8 n/a (/app/lib/obs-plugins/libcef.so + 0x20cf3b8)
                                                 #7  0x00007f33aab7482d n/a (/app/lib/obs-plugins/obs-browser.so + 0x7682d)
                                                 #8  0x00007f33aab4ff5b n/a (/app/lib/obs-plugins/obs-browser.so + 0x51f5b)
                                                 #9  0x00007f33aab50edd n/a (/app/lib/obs-plugins/obs-browser.so + 0x52edd)
                                                 #10 0x00007f33d02f14e4 n/a (/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.32 + 0xf14e4)
                                                 #11 0x00007f33d00a1e39 n/a (/usr/lib/x86_64-linux-gnu/libc.so.6 + 0x8ee39)
                                                 #12 0x00007f33d01299c4 n/a (/usr/lib/x86_64-linux-gnu/libc.so.6 + 0x1169c4)
                                                 ELF object binary architecture: AMD x86-64

System Information

YaLTeR commented 1 month ago

CEF in OBS needs a DISPLAY to not crash. I reported it here: https://github.com/obsproject/obs-studio/issues/11019

For now, run Xwayland using one of the options, and give OBS a DISPLAY, then it will run fine. (OBS itself will still be a Wayland window.)

raiguard commented 1 month ago

Thanks for the quick response, I got it working with xwayland-satellite. I didn't realize that Xwayland wasn't built-in, nor that the browser plugin required it.