Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant add window capture (xcomposite) in obs 26.0.0-rc2-16 build from source with browser-source on ubuntu 20.04.1 LTS #3479

Closed
koreanfan opened this issue Sep 16, 2020 · 9 comments · Fixed by #4151

Comments

@koreanfan
Copy link

Platform

Operating system and version: Ubuntu 20.04.1 lts with latest updates
OBS Studio version: 26.0.0-rc2-16

Expected Behavior

add window capture, choose game window, and start stream

Current Behavior

click to add window capture, set name for window capture, press ok and obs freeze and not responding

Steps to Reproduce

1.build obs from source with browser source
2.add window capture
3.set name for window capture and press ok
4.obs freeze and not responding

Additional information

@KOLANICH
Copy link

I confirm that this issue exists in the current version built from git.

@KOLANICH
Copy link

KOLANICH commented Oct 15, 2020

Also I advice to rename the issue for better discoverability. I mean incorporate the word "hang" into the title.

@jimchrist-x
Copy link

I have the same issue

@ahefner
Copy link

ahefner commented Dec 4, 2020

Same here, built on Ubuntu 18.04 from commit 08ebc25

#0 0x00007ffff2f7f9f3 in futex_wait_cancelable (private=, expected=0, futex_word=0x5555563046e8) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1 0x00007ffff2f7f9f3 in __pthread_cond_wait_common (abstime=0x0, mutex=0x5555563045c0, cond=0x5555563046c0) at pthread_cond_wait.c:502
#2 0x00007ffff2f7f9f3 in __pthread_cond_wait (cond=0x5555563046c0, mutex=0x5555563045c0) at pthread_cond_wait.c:655
#3 0x00007fffed5c29fd in () at /usr/lib/x86_64-linux-gnu/libX11.so.6
#4 0x00007fffed5c2e89 in () at /usr/lib/x86_64-linux-gnu/libX11.so.6
#5 0x00007fffed5c004d in XInternAtom () at /usr/lib/x86_64-linux-gnu/libX11.so.6
#6 0x00007fffa5e3786f in XCompcap::ewmhIsSupported() () at /home/hefner/obs-studio/plugins/linux-capture/xcompcap-helper.cpp:57
#7 0x00007fffa5e379fb in XCompcap::getTopLevelWindowsabi:cxx11 () at /home/hefner/obs-studio/plugins/linux-capture/xcompcap-helper.cpp:100
...

Never returns from that futex_wait_cancelable, whatever that means. Befitting Murhpy's Law, it works fine if I run it under Valgrind, aside from being too slow to use...

@Chiitoo
Copy link
Contributor

Chiitoo commented Dec 4, 2020

For what it is worth, I can't re-produce here on Gentoo Linux, with OBS Studio at 26.1.0-rc1-18-g08ebc25e.

The terminal output could be a good start on looking for what's different for you who do see the issue happening.

@kkartaltepe
Copy link
Collaborator

If you can reproduce this, try applying this patch and see if anything changes.

diff --git a/plugins/linux-capture/xcompcap-main.cpp b/plugins/linux-capture/xcompcap-main.cpp
index 9d3b15333..e82862fb5 100644
--- a/plugins/linux-capture/xcompcap-main.cpp
+++ b/plugins/linux-capture/xcompcap-main.cpp
@@ -24,6 +24,8 @@ bool XCompcapMain::init()
                return false;
        }
 
+       XInitThreads();
+
        int eventBase, errorBase;
        if (!XCompositeQueryExtension(xdisp, &eventBase, &errorBase)) {
                blog(LOG_ERROR, "Xcomposite extension not supported");

@ahefner
Copy link

ahefner commented Dec 6, 2020 via email

@Ndugutse

This comment has been minimized.

kkartaltepe added a commit to kkartaltepe/obs-studio that referenced this issue Jan 28, 2021
In case no-one else initializes X11 locks do this as part of loading the
module.

Fixes obsproject#3479
@nebspacefarer
Copy link

If you can reproduce this, try applying this patch and see if anything changes.

I can't manage to build OBS on my distro despite following the guide, getting some errors about some dependencies versions unavailable on Debian Bullseye, is there any way to have a quick amd64 deb build of that fix before it gets pushed?
Cause it's quite critical to be able to use OBS, no scene management can be done right now because there is no way to add a new Window Capture and no Game Capture feature on Linux

jp9000 pushed a commit that referenced this issue Jan 28, 2021
In case no-one else initializes X11 locks do this as part of loading the
module.

Fixes #3479
polamjag pushed a commit to polamjag/obs-studio that referenced this issue Feb 10, 2021
In case no-one else initializes X11 locks do this as part of loading the
module.

Fixes obsproject#3479
1div0 pushed a commit to 1div0/obs-studio that referenced this issue Apr 22, 2021
In case no-one else initializes X11 locks do this as part of loading the
module.

Fixes obsproject#3479
tommyvct pushed a commit to tommyvct/obs-studio that referenced this issue May 22, 2021
In case no-one else initializes X11 locks do this as part of loading the
module.

Fixes obsproject#3479
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants