obsproject / obsproject/obs-browser

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

Open
#261 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
904
Forks
267
Avg merge
1d 23h
Merged PRs (30d)
2

Description

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:

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the crash with LANG=foo obs and follow the reported CefInitialize() path from obs-browser.so into the CEF locale stack. Use the supplied CEF backtrace and crash logs to identify where an unsupported locale is handled. Done means adding the Browser source no longer segfaults under an unsupported locale.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.