bazukas / obs-linuxbrowser

OBS Linux Browser Plugin
GNU General Public License v2.0
502 stars 47 forks source link

OBS Crash – glGetError 0x505 with AMD gpu #89

Closed lulou closed 5 years ago

lulou commented 5 years ago

Hello Everyone, I custom compiled obs-linuxbrowser with cef-minimal on archlinux. I used NexAdn's packages on AUR. But OBS crashes when adding the obs-linuxbrowser to a scene.

I am on a Ryzen 2400G, with amdgpu finally working. All other modules/filters work properly.

Any ideas?

OBS log:

Attempted path: share/obs/obs-studio/locale/en-US.ini
Attempted path: /usr/share/obs/obs-studio/locale/en-US.ini
Attempted path: share/obs/obs-studio/locale.ini
Attempted path: /usr/share/obs/obs-studio/locale.ini
Attempted path: share/obs/obs-studio/themes/Dark.qss
Attempted path: /usr/share/obs/obs-studio/themes/Dark.qss
Attempted path: share/obs/obs-studio/license/gplv2.txt
Attempted path: /usr/share/obs/obs-studio/license/gplv2.txt
info: CPU Name: AMD Ryzen 5 2400G with Radeon Vega Graphics
info: CPU Speed: 1732.087MHz
info: Physical Cores: 4, Logical Cores: 8
info: Physical Memory: 6978MB Total, 4586MB Free
info: Kernel Version: Linux 4.18.16-arch1-1-ARCH
info: Distribution: "Arch Linux" Unknown
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.20.3
info: Portable mode: false
QMetaObject::connectSlotsByName: No matching signal for on_advAudioProps_clicked()
QMetaObject::connectSlotsByName: No matching signal for on_advAudioProps_destroyed()
QMetaObject::connectSlotsByName: No matching signal for on_program_customContextMenuRequested(QPoint)
info: OBS 22.0.2-1 (linux)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
        samples per sec: 44100
        speakers:        2
info: ---------------------------------
info: Initializing OpenGL...
info: Loading up OpenGL on adapter X.Org AMD RAVEN (DRM 3.26.0, 4.18.16-arch1-1-ARCH, LLVM 7.0.0)
info: OpenGL loaded successfully, version 4.5 (Core Profile) Mesa 18.2.3, shading language 4.50
info: ---------------------------------
info: video settings reset:
        base resolution:   1920x1080
        output resolution: 1920x1080
        downscale filter:  Bicubic
        fps:               30/1
        format:            NV12
        YUV mode:          601/Partial
info: Audio monitoring device:
        name: Default
        id: default
info: ---------------------------------
error: Required module function 'obs_module_load' in module '/usr//lib/obs-plugins/libcef.so' not found, loading of module failed
libDeckLinkAPI.so: cannot open shared object file: No such file or directory
info: No blackmagic support
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: VLC 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-transitions.so
info:     obs-outputs.so
info:     obs-linuxbrowser.so
info:     obs-libfdk.so
info:     obs-filters.so
info:     obs-ffmpeg.so
info:     linux-v4l2.so
info:     linux-pulseaudio.so
info:     linux-jack.so
info:     linux-decklink.so
info:     linux-capture.so
info:     linux-alsa.so
info:     image-source.so
info:     frontend-tools.so
info: ---------------------------------
info: ==== Startup complete ===============================================
info: All scene data cleared
info: ------------------------------------------------
info: pulse-input: Server name: 'pulseaudio 12.2'
info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.pci-0000_06_00.6.analog-stereo.monitor'
info: pulse-input: Server name: 'pulseaudio 12.2'
info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_input.usb-Generic_FULL_HD_1080P_Webcam_200901010001-02.analog-stereo'
info: [Media Source 'LuluDesk']: settings:
        input:                   rtmp://192.168.2.2/obs/luludesk
        input_format:            
        speed:                   100
        is_looping:              no
        is_hw_decoding:          no
        is_clear_on_media_end:   yes
        restart_on_activate:     yes
        close_when_inactive:     yes
info: v4l2-input: Start capture from /dev/video2
info: v4l2-input: Input: 0
info: v4l2-input: Resolution: 1920x540
info: v4l2-input: Pixelformat: VYUY
info: v4l2-input: Linesize: 3840 Bytes
info: v4l2-input: Framerate: 50.00 fps
info: v4l2-input: Start capture from /dev/video4
info: v4l2-input: Input: 0
info: v4l2-input: Resolution: 800x600
info: v4l2-input: Pixelformat: VYUY
info: v4l2-input: Linesize: 1600 Bytes
info: v4l2-input: Framerate: 20.00 fps
info: v4l2-input: Start capture from /dev/video4
error: v4l2-input: Unable to set input 0
error: v4l2-input: Initialization failed
info: Switched to scene 'Gaming'
info: ------------------------------------------------
info: Loaded scenes:
info: - scene 'Gaming':
info:     - source: 'LuluDesk' (ffmpeg_source)
info:     - source: 'Webcam Screenmount' (v4l2_input)
info:         - filter: 'Chroma Key' (chroma_key_filter)
info:         - filter: 'Video Delay (Async)' (async_delay_filter)
info: - scene 'IRL':
info:     - source: 'CamLink Corner' (v4l2_input)
info: - scene 'IRL Two Cams':
info:     - source: 'CamLink Corner' (v4l2_input)
info:     - source: 'FlintLXT Mobilecam' (v4l2_input)
info: ------------------------------------------------
info: adding 23 milliseconds of audio buffering, total audio buffering is now 23 milliseconds
error: A sprite cannot be drawn without a width/height
error: A sprite cannot be drawn without a width/height
error: A sprite cannot be drawn without a width/height
(...) [removed duplicate error messages]
error: A sprite cannot be drawn without a width/height
error: A sprite cannot be drawn without a width/height
error: A sprite cannot be drawn without a width/height
error: A sprite cannot be drawn without a width/height
qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 4002, resource id: 65011856, major code: 130 (Unknown), minor code: 3
qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 4032, resource id: 65011856, major code: 130 (Unknown), minor code: 3
qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 4035, resource id: 65011856, major code: 130 (Unknown), minor code: 3
info: adding 23 milliseconds of audio buffering, total audio buffering is now 46 milliseconds
error: glBufferData failed, glGetError returned 0x505
error: device_texture_create (GL) failed
info: User added source 'Linux Browser' (linuxbrowser-source) to scene 'Gaming'
info: User added source 'Linux Browser' (linuxbrowser-source) to scene 'Gaming'
qt.qpa.xcb: xcb_shm_create_segment() failed for size 2053600
The X11 connection broke (error 7). Did the X11 server die?

If I understand it correctly, this error means opengl runned out of memory. I have 7GB of RAM and assigned 1GB of VRAM (Testest with 4GB VRAM, same error).

Thank you.

NexAdn commented 5 years ago

This seems to be a Qt-related error (OBS Studio uses Qt). As we are not using Qt directly, but rather make OBS create the properties window for us, there should be nothing we can do about it, but if you know for sure it is caused by our code, please let me know.

Linuxbrowser utilizes Chromium Embedded Framework (and therefore a Chromium browser) to render the websites. It might be the browser instance which is taking up too much memory (probably not VRAM), but I don't know for sure if that's possible as the error has to do with Qt, which is being used by OBS, not CEF.

lulou commented 5 years ago

Added another 8GB of RAM. Still same error. This time even KDE crashed completely.

Currently I recompile everything (even CEF) from scrach with debug enabled. Maybe I can get more information from there on.

lulou commented 5 years ago

Compiled obs master with linuxbrowser master. Now I get constant KDE/X11 crashes.

error: glBufferData failed, glGetError returned 0x505
error: device_texture_create (GL) failed
info: User added source 'Linux Browser' (linuxbrowser-source) to scene 'Gaming LoL'
info: User added source 'Linux Browser' (linuxbrowser-source) to scene 'Gaming LoL'
qt.qpa.xcb: xcb_shm_create_segment() failed for size 2053600
The X11 connection broke: Error during FD passing (code 7)
XIO:  fatal IO error 2 (No such file or directory) on X server ":0"
      after 8930 requests (8930 known processed) with 0 events remaining.
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = obs path = /opt/obs-studio-git/bin pid = 949
KCrash: Arguments: /opt/obs-studio-git/bin/obs 
KCrash: Attempting to start /usr/lib/drkonqi from kdeinit
sock_file=/run/user/1000/kdeinit5__0
Invalid read from eventfd: Bad file descriptor
Code should not be reached at pulsecore/fdsem.c:157, function flush(). Aborting.
Unable to start Dr. Konqi
Re-raising signal for core dump handling.
./start_obs.sh: line 3:   949 Aborted                 (core dumped) ./obs
NexAdn commented 5 years ago

Unfortunately, I can't reproduce these errors using current cef-minimal (updated today) and obs-linuxbrowser master branch.

lulou commented 5 years ago

Ok, thanks for the information. Do you use an nvidia graphics card?

NexAdn commented 5 years ago

currently, GTX 960 with proprietary drivers and NVENC

lulou commented 5 years ago

It seems this is amdgpu related. Posting more logs when i finished compiling in debug. Thank you.

lulou commented 5 years ago

So I installed windows build 15xxx, installed chrome and windows BSOD'ed. Windows current build works. This is deffinately a amdgpu error. You can close this.

I dont know weather google will develop aditional driver hacks or its completely resolved differently.

Disabling all hardware accelerations did not help either.

NexAdn commented 5 years ago

Okay, thank you four your information. I will add this to the known issues.

MGlolenstine commented 5 years ago

Sorry for opening this issue again, but upon getting the same error message and not being able to use it, all I did was install cef-minimal and it's working fine now. Running fx-8320E and Rx480 8GB, so it's not an AMD's fault after all! (It could be a fix in the CEF tho.)