Open mahkoh opened 1 month ago
Without remembering any OBS code:
if you're making a QWidget then doing myWidget->create / myWidget->winId to get a window that's an OBS bug, as you've got Qt and OBS drawing into the same thing
OBS draws directly into the QWidget for all displays (OBS rendered content), perhaps the project is using a different setting that causes the shm to be attached.
I am also experiencing this issue or something similar. It seems to somewhat fix itself but it has reappeared today after installing openrazer. 2024-09-02 04-46-41.txt
I posted a question about mixing app and GL buffer attaches on wayland that might be relevant here: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/211
I'm pretty sure removing https://github.com/obsproject/obs-studio/blob/master/UI/window-projector.cpp#L41-L44 will resolve this for people experiencing issues. Unfortunately a real solution is a bit more complicated assuming this really does work.
Operating System Info
Other
Other OS
Arch Linux
OBS Studio Version
30.1.2
OBS Studio Version (Other)
No response
OBS Studio Log URL
https://obsproject.com/logs/WQGyYH2S1OMk7op4
OBS Studio Crash Log URL
No response
Expected Behavior
OBS does not crash.
Current Behavior
OBS crashes.
Steps to Reproduce
Start OBS under a wayland compositor that supports explicit sync and with graphics drivers that support explicit sync. With up-to-date nvidia drivers, that should always be the case. With mesa, you will also have to set the environment variable
MESA_LOADER_DRIVER_OVERRIDE=zink
to ensure that vulkan is being used under the hood.After starting OBS, right click on the preview and select
Windowed Projector (Preview)
. You might have to repeat this several times.OBS crashes.
Anything else we should know?
I am reasonably certain that this is caused by the following series of events:
The last step is unsound. QT must not not manipulate the surface buffer while the surface is owned by an OpenGL or Vulkan context. I believe that that much is required by the OpenGL and Vulkan specifications.
The question is if QT is in the wrong here (although I don't see how, QT seems to know nothing about OBS creating on OpenGL context) or if this is an OBS bug because OBS creates an OpenGL context without properly informing QT about this.
@davidedmundson can you comment on the above?