-
Notifications
You must be signed in to change notification settings - Fork 233
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
[BUG] Crash due to conflict between libcef and gtk using the glib event loop on linux #219
Comments
Just as a note here, we are rolling back the deployment of the browser source plugin on Linux through the official PPA until this can be resolved. If anyone has experienced this issue and has ideas on how to properly fix it, please let us know. |
Would it be possible to always force a non-native file picker (like with the fix for the font and color picker crashes) or does that not work on some distros? |
Unfortunately the none native file dialog (Qt) lacks functionality. |
Original issue for reference #141 The proposed solution there doesnt affect native dialogs which in gtk land will likely all use g(tk)lib for messaging and threading support. |
Hi, GTK developer here. Is there any chance to have a backtrace of the crash to analyze? |
From the original issue for reference: |
@ebassi This is the backtrace on Ubuntu 19.10
|
Iirc the original stack was from a release with debug symbols. If you attempt to run debug chromium you will die on asserts checking that messages are appropriately ordered (obviously when the message is not coming from chromium that check is going to have a bad time) |
@Gol-D-Ace Thanks, much appreciated. There are still missing debugging symbols for the libcef shared library, but since you're using |
Tried it again and now I'm getting this.
|
Ah that is similar to the debug build crashes that check sequence but instead this looks like its also in release. https://chromium.googlesource.com/chromium/src/+/refs/tags/75.0.3770.156/base/threading/sequenced_task_runner_handle.cc#26 |
I do hope the task runner is not causing the source dispatch to happen in a different thread than the one that is spinning the GLib main loop of |
@ebassi |
This plugin has not been working before, this was our first attempt at releasing on Linux. There is another similar browser source plugin that was developed by a third party, but is no longer maintained. |
Hello, has there been any progress here? It is a very unfortunate situation to not have the browser plugin available. |
I usually don't |
I'm using https://github.com/bazukas/obs-linuxbrowser/releases/tag/0.6.1 as a workaround. |
Another workaround: obsproject/obs-studio#2644 (comment) |
Unfortunately this is something we haven't had the bandwidth to take a closer look at yet. If anyone else out there wants to take a crack at it, then please do, by all means. |
I am a user of free software and Linux in particular. I always use that particular option and it is the reason to have a Windows partition on my laptop. When the official support for the plugin in Linux was announced, I was very happy, I thought that the developers were finally giving it the importance that corresponds to Linux users, then my disappointment was great and with the last message more. I am not an expert programmer in this particular problem, if that were the case I would have fixed it myself. How many developers outside the OBS project are willing to give their time to fix this bug? Until now nobody and I fear that this will continue. Without a real interest from the OBS team in fixing this bug, without a developer assigned, this serious bug will remain open for months or years. How unfortunate! |
There are many talented developers in the Linux community. Unfortunately this is a case where we simply don't have enough people to look at everything. Practically speaking, OBS only has one full-time developer. We welcome contribution from the community. Be the change you want to see in the world. |
It is definitely a matter of priorities... |
Hm, does that mean OBS Studio doesn't need to disable GLib's mainloop anymore? |
This should be all you need to revert the dialogs and use the glib message pump. It didnt crash for me forcing the gtk file selector and leaving it open for a while (fingers crossed) diff --git a/UI/obs-app.cpp b/UI/obs-app.cpp
index a415b3f4d..bfa91546e 100644
--- a/UI/obs-app.cpp
+++ b/UI/obs-app.cpp
@@ -1940,10 +1940,6 @@ static int run_program(fstream &logFile, int argc, char *argv[])
Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
#endif
-#if !defined(_WIN32) && !defined(__APPLE__) && BROWSER_AVAILABLE
- setenv("QT_NO_GLIB", "1", true);
-#endif
-
QCoreApplication::addLibraryPath(".");
#if __APPLE__
diff --git a/UI/qt-wrappers.cpp b/UI/qt-wrappers.cpp
index 76c532043..13b8d4613 100644
--- a/UI/qt-wrappers.cpp
+++ b/UI/qt-wrappers.cpp
@@ -351,61 +351,32 @@ void setThemeID(QWidget *widget, const QString &themeID)
QString SelectDirectory(QWidget *parent, QString title, QString path)
{
-#if defined(BROWSER_AVAILABLE) && defined(__linux__)
- QString dir = QFileDialog::getExistingDirectory(
- parent, title, path,
- QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks |
- QFileDialog::DontUseNativeDialog);
-#else
QString dir = QFileDialog::getExistingDirectory(
parent, title, path,
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
-#endif
-
return dir;
}
QString SaveFile(QWidget *parent, QString title, QString path,
QString extensions)
{
-#if defined(BROWSER_AVAILABLE) && defined(__linux__)
- QString file = QFileDialog::getSaveFileName(
- parent, title, path, extensions, nullptr,
- QFileDialog::DontUseNativeDialog);
-#else
QString file =
QFileDialog::getSaveFileName(parent, title, path, extensions);
-#endif
-
return file;
}
QString OpenFile(QWidget *parent, QString title, QString path,
QString extensions)
{
-#if defined(BROWSER_AVAILABLE) && defined(__linux__)
- QString file = QFileDialog::getOpenFileName(
- parent, title, path, extensions, nullptr,
- QFileDialog::DontUseNativeDialog);
-#else
QString file =
QFileDialog::getOpenFileName(parent, title, path, extensions);
-#endif
-
return file;
}
QStringList OpenFiles(QWidget *parent, QString title, QString path,
QString extensions)
{
-#if defined(BROWSER_AVAILABLE) && defined(__linux__)
- QStringList files = QFileDialog::getOpenFileNames(
- parent, title, path, extensions, nullptr,
- QFileDialog::DontUseNativeDialog);
-#else
QStringList files =
QFileDialog::getOpenFileNames(parent, title, path, extensions);
-#endif
-
return files;
} |
I think I did read this wrong. |
Considering that this issue doesn't seem to |
Give us more time to test with CEF 4280 as it was still indicated 3770 in the official building guide for 26.1.1 published 23 days ago and personaly, I need to push production tests to approve. |
Sure. |
I see that @WizardCM did rewrite the build instructions. |
Hi, |
@joan31 For Ubuntu you could try out the unstable PPA. Other repos / distributions will need to update the used CEF version. You can either wait until they do that or build.obs including the browser source yourself. |
I'm on Arch Linux. I can build muy own OBS. |
FYI on AUR https://aur.archlinux.org/packages/obs-studio-git/ it is ok with the good CEF version 4280. |
Tested and approved. Everything works well after several hours on Debian 10. There is a regression from this PR who enhanced this ability to control volume ? |
@maxdrfr Make sure to enable "Control Audio via OBS" in the Browser Source's properties. |
Thank you, my fault. |
Is this actually a plugin that can be built on its own like it is the case with the two outdated external ones? If so that would at least make packaging a bit easier. At least on Arch CEF is not in any official repository, probably for a good reason. As a plugin it could live in the AUR and could be used with OBS from the official binary repos. |
We no longer support building obs-browser separately from obs-studio because there are features in obs-studio that rely on building the application with obs-browser enabled. We recommend building obs-studio with obs-browser enabled, per the build instructions on the obs-studio wiki. Since the patch above was merged in obsproject/obs-studio#4155, and we're now using CEF 4280 on Linux for OBS Studio 27, we consider this Issue to be fixed. As such, I'm closing this. |
Will you enable this plugin in your official builds again? |
@hollunder |
Would it be helpful if a PR is submitted to update the README.md? |
This issue was resolved already. What update are you looking to make? |
As mentioned by @hollunder:
In README.md it mentions the following: |
Ah, yes please feel free to submit an update for that! |
This mentions that it is fixed and the readme needs to be updated, however it's been stated here by @Gol-D-Ace "The plugin is already enabled in 26.1.1 Ubuntu PPA builds and will be updated in v27 to a newer version." So what about other versions? In my case Fedora 34 which is running v27.0.1-2 of OBS and I don't see a "Browser Source" option. |
Hi My guess would be that like on many distributions they decided that they don't want to deal with CEF or simply don't have a CEF package available that they could build with. |
I am currently changing from Win10 to Ubuntu. |
Hi Only the PPA, Flatpak and Snap have the browser source available there. Only the PPA has and the Flatpak will have the service integrations available. Does your OBS say dfsg in the window title? If so you are using the Debian repo Version which lacks the browser source, VST and FTL |
Thanks a lot, you are right. I had to use a workaround and installed the linuxBrowser plugin. |
Platform
Operating system and version: Any Linux distro using a desktop environment that makes use of GTK like for example the standard flavor of Ubuntu
OBS Studio version: 25.0.4 (any that include the browser source and therefore libcef)
Expected Behavior
Not have the file dialog / OBS hang or crash when using a file dialog to choose a file for example an image on the image source.
Current Behavior
The file dialog will hang or crash including OBS and makes it impossible to select a file.
Steps to Reproduce
Additional information
Followup issue for obsproject/obs-studio#2644 to get more exposure
This issue seems to get caused by GTK and libcef both using the glib event loop and causing a conflict. Using for example the QT dialogs (none native) will work around the issue.
Unfortunately this work around reduces functionality on GTK and might even break OBS installs entirely on distros where the qt5 configuration tool isn't available because the deb package will depend on it.
The text was updated successfully, but these errors were encountered: