obsproject / obs-studio

OBS Studio - Free and open source software for live streaming and screen recording
https://obsproject.com
GNU General Public License v2.0
58.68k stars 7.81k forks source link

OBS Crashes after closing and attempting to restart #8709

Closed matteovidali closed 5 months ago

matteovidali commented 1 year ago

Operating System Info

Ubuntu 22.04

Other OS

No response

OBS Studio Version

29.0.2

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/FolrGr5Cbnt4fK9T

OBS Studio Crash Log URL

No response

Expected Behavior

Open and run OBS studio as intended

Current Behavior

Segmentation Fault - the application opens for a breif moment, then aborts.

Steps to Reproduce

  1. add repositories and install obs via apt
  2. run obs in terminal, gives this output:
    
    Warning: Ignoring WAYLAND_DISPLAY on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
    debug: Found dbus service: org.freedesktop.ScreenSaver
    debug: Attempted path: share/obs/obs-studio/locale/en-US.ini
    debug: Attempted path: /usr/share/obs/obs-studio/locale/en-US.ini
    debug: Attempted path: share/obs/obs-studio/locale.ini
    debug: Attempted path: /usr/share/obs/obs-studio/locale.ini
    debug: Attempted path: share/obs/obs-studio/themes/Yami.qss
    debug: Attempted path: /usr/share/obs/obs-studio/themes/Yami.qss
    info: Using EGL/X11
    info: CPU Name: Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
    info: CPU Speed: 2500.502MHz
    info: Physical Cores: 10, Logical Cores: 20
    info: Physical Memory: 64242MB Total, 59126MB Free
    info: Kernel Version: Linux 5.19.0-38-generic
    info: Distribution: "Ubuntu" "22.04"
    info: Session Type: wayland
    info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.22.1
    info: Qt Version: 6.2.4 (runtime), 6.2.4 (compiled)
    info: Portable mode: false
    qt.core.qmetaobject.connectslotsbyname: QMetaObject::connectSlotsByName: No matching signal for on_tbar_position_valueChanged(int)
    info: OBS 29.0.2 (linux)
    info: ---------------------------------
    info: ---------------------------------
    info: audio settings reset:
    samples per sec: 48000
    speakers:        2
    max buffering:   960 milliseconds
    buffering type:  dynamically increasing
    info: ---------------------------------
    info: Initializing OpenGL...
    info: Loading up OpenGL on adapter nouveau NVE4
    info: OpenGL loaded successfully, version 4.3 (Core Profile) Mesa 22.2.5, shading language 4.30
    info: ---------------------------------
    info: video settings reset:
    base resolution:   1920x1080
    output resolution: 1920x1080
    downscale filter:  Bicubic
    fps:               60/1
    format:            NV12
    YUV mode:          Rec. 709/Partial
    info: NV12 texture support not available
    info: P010 texture support not available
    info: Audio monitoring device:
    name: Default
    id: default
    info: ---------------------------------
    warning: No AJA devices found, skipping loading AJA UI plugin
    warning: Failed to initialize module 'aja-output-ui.so'
    warning: No AJA devices found, skipping loading AJA plugin
    warning: Failed to initialize module 'aja.so'
    warning: Failed to load 'en-US' text for module: 'decklink-captions.so'
    warning: Failed to load 'en-US' text for module: 'decklink-output-ui.so'
    libDeckLinkAPI.so: cannot open shared object file: No such file or directory
    warning: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed
    warning: Failed to initialize module 'decklink.so'
    info: [pipewire] No captures available
    info: [obs-browser]: Version 2.19.0
    info: [obs-browser]: CEF Version 103.0.5060.134 (runtime), 103.0.0-5060-shared-textures_143.2591+g4204d54+chromium-103.0.5060.134 (compiled)
    error: os_dlopen(libnvidia-encode.so.1->libnvidia-encode.so.1): libnvidia-encode.so.1: cannot open shared object file: No such file or directory

info: VAAPI: API version 1.14 info: FFmpeg VAAPI H264 encoding not supported info: [obs-websocket] [obs_module_load] you can haz websockets (Version: 5.1.0 | RPC Version: 1) info: [obs-websocket] [obs_module_load] Qt version (compile-time): 6.2.4 | Qt version (run-time): 6.2.4 info: [obs-websocket] [obs_module_load] Linked ASIO Version: 101201 info: [obs-websocket] [obs_module_load] Module loaded. info: [vlc-video]: VLC 3.0.16 Vetinari found, VLC video source enabled info: --------------------------------- info: Loaded Modules: info: vlc-video.so info: text-freetype2.so info: rtmp-services.so info: obs-x264.so info: obs-websocket.so info: obs-vst.so info: obs-transitions.so info: obs-outputs.so info: obs-libfdk.so info: obs-filters.so info: obs-ffmpeg.so info: obs-browser.so info: linux-v4l2.so info: linux-pulseaudio.so info: linux-pipewire.so info: linux-jack.so info: linux-capture.so info: linux-alsa.so info: image-source.so info: frontend-tools.so info: decklink-output-ui.so info: decklink-captions.so info: --------------------------------- QLayout: Attempting to add QLayout "" to OBSBasic "OBSBasic", which already has a layout QWidget::setTabOrder: 'first' and 'second' must be in the same window info: ==== Startup complete =============================================== info: All scene data cleared info: ------------------------------------------------ info: pulse-input: Server name: 'pulseaudio 15.99.1' info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels info: pulse-input: Started recording from 'alsa_output.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo-output.monitor' (default) info: [Loaded global audio device]: 'Desktop Audio' info: pulse-input: Server name: 'pulseaudio 15.99.1' info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels info: pulse-input: Started recording from 'alsa_input.usb-HDA_Webcam_USB_HDA_Webcam_USB_HDA_Webcam_USB-02.analog-stereo' (default) info: [Loaded global audio device]: 'Mic/Aux' info: xshm-input: Geometry 1920x1080 @ 0,540 info: Switched to scene 'Scene' info: ------------------------------------------------ info: Loaded scenes: info: - scene 'Scene': info: - source: 'Screen Capture (XSHM)' (xshm_input) info: ------------------------------------------------ Segmentation fault (core dumped)


4. Uploading logs to log analyzer gives only the issue about wayland but when running obs with `-platform wayland` option, segmentation fault still occurs. 
5. Purge full system install of obs with `sudo apt purge obs-studio` and removing config files with `sudo rm -rf ~/.config/obs-studio` 
6. Reinstall with `sudo apt install obs-studio` allows for one time start up noramlly. Can connect a twitch account, and setup scene except screen record is just black (assuming that has to do with the driver issue: `error: os_dlopen(libnvidia-encode.so.1->libnvidia-encode.so.1): libnvidia-encode.so.1: cannot open shared object file: No such file or directory` though I could not find a fix for this.
7. After setting up a scene, I can do most things in OBS, but upon closing OBS, and attempting to restart either via symlink to desktop, or via `obs` command in terminal, i get the above behaviour - seg fault with no logs. (unless I am missing them somewhere!)

### Anything else we should know?

_No response_
matteovidali commented 1 year ago

upon running obs with gdb (gdb obs), The error seemed very similar to #7971 and the solution seems to have desired effect of fixing this issue. To note, it was deleting the DockState line in global.ini (~/.config/obs-studio/global.ini)

kkartaltepe commented 1 year ago

https://github.com/obsproject/obs-studio/issues/7971 is related to trying to load Qt5 dock states from Qt6. Are you saying that you were using two different OBSs (perhaps snap at qt5 and our ppa at qt6)? Or that you were always launching a single version of obs and could replicate this issue with a clean global.ini?

theretohere commented 1 year ago

I am seeing this issue also.

Version: 29.0.2-0obsproject1~jammy OS: Linux Mint 21.1.

Repo info: add-apt-repository ppa:obsproject/obs-studio /etc/apt/sources.list.d$ cat obsproject-obs-studio-jammy.list deb [arch=amd64 signed-by=/etc/apt/keyrings/obsproject-obs-studio-jammy.gpg] https://ppa.launchpadcontent.net/obsproject/obs-studio/ubuntu jammy main

Details: First run of obs works properly. Close obs, and attempting to re-open results in seg fault.

Deleting directory ~/.config/obs-studio results in being able to open obs again.

Fix was to comment out the DockState line in ~/.config/obs-studio/global.ini

DreamHollow commented 1 year ago

I'm starting to see this issue as well.

It started after I added a "Jack Input" audio source. I was trying to determine the cause of an audio bug. Program suddenly crashed and I had to kill it via Task Manager in XFCE.

Version: 29.1.2 Flatpak OS: Linux Mint 21.1

Details: OBS does not launch at all via GUI icon or directly running flatpak from terminal. Program seems to initialize, reaches final line, but no OBS GUI displays. One debug line says "an error occurred when reading source info!" or something along those lines.

No idea how to fix this but it's preventing me from opening OBS at all.

kkartaltepe commented 1 year ago

It is unhelpful to assume you have the same issue and not provide all of the things mentioned in our bug reporting template.

If you have read the original bug and follow ups then please provide a backtrace from gdb if you get a segfault.

If you dont get a segfault and have other behavior then you should probably use our discord support channel.

RytoEX commented 5 months ago

Since deleting the DockState line in global.ini (~/.config/obs-studio/global.ini) fixed the OP's issue, and without additional information, I'm going to assume this was the same as #7971 and #7284, which was really QTBUG-104962, which was fixed in Qt 6.2.7 and 6.4.0+. As I commented in 7284:

As far as I can tell from the QTBUG, this is a known issue in Qt 6.2.x that will not be fixed in the 6.2.x series (see also QTBUG-104962). Their recommendation is to use Qt 6.4+, which we do in the Flatpak release of OBS. For PPA builds, we use what is available to the PPA builder, which is Qt 6.2.4 for Ubuntu 22.04. For Ubuntu 22.10 PPA builds, we use Qt 6.3.1, where this is also not fixed, and there will be no further updates to the Qt 6.3 branch. Once Ubuntu 23.04 is out, our PPA builds will use whatever is available there, which seems likely to be Qt 6.4.2, where this is fixed.

Some possible solutions you can choose include:

  1. Switch to the Flatpak build where this should not occur. Confirmation that this does not occur would be welcome. a. Optionally, switch back to the PPA release to see if this remains fixed after the dockstate is loaded and saved.
  2. Wait for a PPA release of OBS Studio on Ubuntu 23.04.
  3. Build OBS against Qt 6.4 yourself.
  4. Delete the DockState from ~/.config/obs-studio/global.ini.

I do not think there is a reliable way for us to detect that the DockState was saved by Qt5, so I do not think there is anything we can do to mitigate this.