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

SIGSEV crash when initializing CEF with unsupported lang (ie. LANG=foo) #261

Open
odinho opened this issue Jan 24, 2021 · 5 comments
Open

Comments

@odinho
Copy link

odinho commented Jan 24, 2021

Platform

Operating system and version: Ubuntu 20.10
OBS Studio version: OBS Studio - 26.1.1 (linux) (from official Ubuntu PPA: 26.1.1-0obsproject1~groovy)
LANG = nn_NO.UTF-8

Expected Behavior

Should be able to add Browser plugin. (this is not about opening up a file picker, can't get that far)

Current Behavior

Crashes with segmentation fault in libcef.so.

Somewhat useful stack trace:

Thread 1 "obs" received signal SIGSEGV, Segmentation fault.
GetTextDirectionForLocaleInStartUp () at ../../base/i18n/rtl.cc:205
205	../../base/i18n/rtl.cc: No such file or directory.
(gdb) bt
#0  GetTextDirectionForLocaleInStartUp() () at ../../base/i18n/rtl.cc:205
#1  0x00007fffa39d14fc in ICUIsRTL () at ../../base/i18n/rtl.cc:166
#2  IsRTL() () at ../../base/i18n/rtl.cc:155
#3  0x00007fffa461ccad in AdjustParagraphDirectionality () at ../../ui/base/l10n/l10n_util.cc:282
...
#24 0x00007fffa3744445 in CefInitialize() () at ../../cef/libcef/browser/context.cc:251
#25 0x00007fffa16f9457 in cef_initialize() () at ../../cef/libcef_dll/libcef_dll.cc:112
#26 0x00007fffacbcb36b in  () at /usr//lib/obs-plugins/obs-browser.so

Steps to Reproduce

  1. Run LANG=foo obs (I had nn_NO.utf8, but seems you just need something CEF doesn't support)
  2. Right-click in sources and choose "Add source -> Browser"
  3. Dialog Create/Select Source come up, it says "Create new"
  4. Click "OK" -> CRASH

Additional information

It works on my other laptop which is Ubuntu 20.04. It also has nn_NO.UTF-8, but I don't have it here, so can't check if there's any relevant differences.

The obs log:

@Gol-D-Ace
Copy link
Member

https://cef-builds.spotifycdn.com/cef_binary_76.1.13%2Bgf19c584%2Bchromium-76.0.3809.132_linux64_minimal.tar.bz2

You could try replacing your libcef.so with the one from this build. It's the build that the PPA is using but not stripped and probably? has the debug symbols.

@odinho
Copy link
Author

odinho commented Jan 26, 2021

@Gol-D-Ace Thank you so much! That helped me find a workaround. It's due to localization! This works:

LC_ALL=C obs

I don't know if it's because CEF supports nn_NO.UTF-8, or because OBS does, or because none of them do or what it is. But this means it should be possible to reproduce the crash with some testing! :)

obs_crash_locale.log

@odinho odinho changed the title SIGSEV crash on adding "Browser" on OBS Studio - 26.1.1 (linux) on Ubuntu 20.10 SIGSEV crash when initializing CEF with LC_ALL=nn_NO.UTF-8 Jan 26, 2021
@odinho odinho changed the title SIGSEV crash when initializing CEF with LC_ALL=nn_NO.UTF-8 SIGSEV crash when initializing CEF with unsupported lang (ie. LANG=foo) Jan 26, 2021
@odinho
Copy link
Author

odinho commented Jan 26, 2021

So figured out a even smaller test case which should work, just start with LANG=whatever obs, and it should crash! ^_^

@Gol-D-Ace
Copy link
Member

Gol-D-Ace commented Jan 28, 2021

Could you test if this happens with the unstable PPA version?

sudo add-apt-repository ppa:obsproject/obs-studio-unstable
sudo apt-get update
sudo apt install obs-studio

The unstable PPA is using a newer CEF version.

@odinho
Copy link
Author

odinho commented Jan 31, 2021

Still crashes.

But LC_ALL=foo LANG=foo obs actually now works, maybe because obs falls back to "C" automatically now when the lang isn't recognized:

$ LC_ALL=foo LANG=foo obs

(process:112771): Gtk-WARNING **: 18:13:27.694: Locale not supported by C library.
	Using the fallback 'C' locale.

However, when using my nn_NO.UTF-8 standard locale, it crashes. Maybe because OBS accepts it, but CEF doesn't.

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

No branches or pull requests

2 participants