bazukas/obs-linuxbrowser

Crash when creating Linux Browser widget

Sakuya-Izayoi opened this issue · 4 comments

I'm using latest OBS version from snap. When I'm trying to add a Linux Browser widget the app immediately crashes.

14:45:31.618: CPU Name: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
14:45:31.618: CPU Speed: 995.879MHz
14:45:31.620: Physical Cores: 4, Logical Cores: 8
14:45:31.620: Physical Memory: 15923MB Total, 919MB Free
14:45:31.620: Kernel Version: Linux 4.18.0-16-generic
14:45:31.620: Distribution: "Ubuntu Core" "18"
14:45:31.633: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.20.1
14:45:31.634: Portable mode: false
14:45:31.946: OBS 23.0.2 (linux)
14:45:31.946: ---------------------------------
14:45:31.963: ---------------------------------
14:45:31.963: audio settings reset:
14:45:31.963: 	samples per sec: 44100
14:45:31.963: 	speakers:        2
14:45:31.969: ---------------------------------
14:45:31.969: Initializing OpenGL...
14:45:31.989: Loading up OpenGL on adapter Intel Open Source Technology Center Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2) 
14:45:31.989: OpenGL loaded successfully, version 4.5 (Core Profile) Mesa 18.2.2, shading language 4.50
14:45:32.008: ---------------------------------
14:45:32.008: video settings reset:
14:45:32.008: 	base resolution:   1920x1080
14:45:32.008: 	output resolution: 1280x720
14:45:32.008: 	downscale filter:  Bicubic
14:45:32.008: 	fps:               60/1
14:45:32.008: 	format:            NV12
14:45:32.008: 	YUV mode:          601/Partial
14:45:32.009: NV12 texture support not available
14:45:32.015: Audio monitoring device:
14:45:32.015: 	name: По умолчанию
14:45:32.015: 	id: default
14:45:32.015: ---------------------------------
14:45:32.017: Failed to load 'en-US' text for module: 'decklink-ouput-ui.so'
14:45:32.112: No blackmagic support
14:45:32.117: os_dlopen(libnvidia-encode.so.1->libnvidia-encode.so.1): libnvidia-encode.so.1: cannot open shared object file: No such file or directory
14:45:32.117: 
14:45:32.117: FFMPEG VAAPI supported
14:45:32.122: VLC found, VLC video source enabled
14:45:32.123: Failed to load 'ru-RU' text for module: 'libobs-linuxbrowser.so'
14:45:32.123: ---------------------------------
14:45:32.123:   Loaded Modules:
14:45:32.123:     libobs-linuxbrowser.so
14:45:32.123:     vlc-video.so
14:45:32.123:     text-freetype2.so
14:45:32.123:     rtmp-services.so
14:45:32.123:     obs-x264.so
14:45:32.123:     obs-transitions.so
14:45:32.123:     obs-outputs.so
14:45:32.123:     obs-libfdk.so
14:45:32.123:     obs-filters.so
14:45:32.123:     obs-ffmpeg.so
14:45:32.123:     linux-v4l2.so
14:45:32.123:     linux-pulseaudio.so
14:45:32.123:     linux-jack.so
14:45:32.123:     linux-decklink.so
14:45:32.123:     linux-capture.so
14:45:32.123:     linux-alsa.so
14:45:32.123:     image-source.so
14:45:32.123:     frontend-tools.so
14:45:32.123:     decklink-ouput-ui.so
14:45:32.123: ---------------------------------
14:45:32.123: ==== Startup complete ===============================================
14:45:32.125: All scene data cleared
14:45:32.125: ------------------------------------------------
14:45:32.127: pulse-input: Server name: 'pulseaudio 11.1'
14:45:32.127: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
14:45:32.127: pulse-input: Started recording from 'alsa_output.pci-0000_00_1f.3.analog-stereo.monitor'
14:45:32.128: pulse-input: Server name: 'pulseaudio 11.1'
14:45:32.128: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
14:45:32.128: pulse-input: Started recording from 'alsa_input.pci-0000_00_1f.3.analog-stereo'
14:45:32.128: xshm-input: Geometry 1920x1080 @ 0,0
14:45:32.136: Switched to scene 'portal'
14:45:32.136: ------------------------------------------------
14:45:32.136: Loaded scenes:
14:45:32.136: - scene 'mc':
14:45:32.136:     - source: 'game' (xcomposite_input)
14:45:32.136: - scene 'portal':
14:45:32.136:     - source: 'game2' (xcomposite_input)
14:45:32.136: - scene 'desktop':
14:45:32.136:     - source: 'screen' (xshm_input)
14:45:32.136: - scene 'donations':
14:45:32.136: ------------------------------------------------
14:45:32.680: adding 46 milliseconds of audio buffering, total audio buffering is now 46 milliseconds (source: Mic/Aux)
14:45:32.680: 
14:45:33.437: User switched to scene 'desktop'
14:45:33.805: User switched to scene 'donations'
14:45:37.238: obs-linuxbrowser: shm_open error

Possible duplicate of #62.

Quote from bazukas from #62:

[...]
Problem in Ubuntu 18.04 is that you need to install a dependency (sudo apt-get install libgconf-2-4).
Latest release binary should work with that.

The issue isn't with obs-studio or obs-linuxbrowser, but with the confinement of snaps - see this forum post.

The solution I found was to remove the snap version and use the deb:

  • Make a copy of your config ~/snap/obs-studio/current/.config/obs-studio/ somewhere outside of the ~/snap/obs-studio/ dir
  • sudo snap remove obs-studio
  • sudo apt install obs-studio
  • Copy your backed up config to ~/.config/obs-studio/

Okay, so snap packages can't access /dev/shm, right? I'll add a section in the readme that we don't support snap installations.