Skip to content

bug: libobs: OBS refuses to start when one core module can't be loaded (obs-browser.so without libcef.so), and a missing core module skips the ones after it #749

Closed

Description

@rdoupe

Reported on #404 by a user of the AUR package obs-studio-rust-git (Arch, KDE Wayland): OBS doesn't start. The log shows:

error: os_dlopen(/usr/bin/../lib/obs-modules/core/obs-browser.so->...): libcef.so: cannot open shared object file: No such file or directory
warning: Module '/usr/bin/../lib/obs-modules/core/obs-browser.so' not loaded
...
error: Failed to load core OBS modules. OBS cannot run without these modules. Please try reinstalling OBS.

Location

  • libobs/obs-module.c load_all_callback(): when obs_open_module() returns MODULE_FAILED_TO_OPEN (line 533), the module is counted as a load failure for every module type, core modules included (goto load_failure, line 537). obs_load_core_modules() (line 577) then returns false when any core module failed.
  • frontend/plugin-manager/PluginManager.cpp loadAllPlugins() line 88: when obs_load_core_modules() returns false, it throws "Failed to load core OBS modules", and OBS exits.
  • libobs/obs-core-modules-loader-nix.c load_core_modules() line 54: when a core module file isn't found, it logs "Failed to load core module" and breaks. Every core module after it in the list is then not loaded, and the load still reports success.

The core module list is every module the build enables (set_obs_core_modules(), cmake/common/helpers_common.cmake line 523), so obs-browser is on it whenever ENABLE_BROWSER is on (plugins/CMakeLists.txt line 17). obs-browser links libcef.so directly, so if CEF isn't installed, dlopen() fails. Decklink and NVENC don't hit this: they load their libraries at run time and fail in obs_module_load(), which is not fatal.

This code came from upstream OBS 33 (libobs: Add core module loading functionality). Stock OBS 33.0.0-rc1 and upstream master have the same code, so they behave the same. OBS 32.2.2 loaded obs-browser as an ordinary plugin: a dlopen() failure was only listed in the "some plugins failed to load" dialog, and OBS kept running. This fork changed nothing here.

Class

OBS does not start (a packaging slip turns into a startup failure). The second half: OBS starts silently without core modules (encoders, outputs, filters, websocket) when one core module file is missing.

How it is reached

  • Any install where a core module is present but one of its libraries is missing. The AUR package installs obs-browser.so into /usr/lib/obs-modules/core/ while cef is only a build dependency, so it is gone when an AUR helper removes build dependencies afterwards.
  • Any install where a core module file is missing, for example a package that splits obs-browser out of the main package. The modules after it in the list (for obs-browser: obs-ffmpeg, obs-filters, obs-outputs, obs-x264, obs-websocket, rtmp-services, ...) are then not loaded.

Reproduced in the current release

AppImage v0.1.0-beta.20261014, extracted, headless (private Xvfb, private HOME). The AppImage has no obs-browser, so a core module with a missing library was made by replacing obs-vst.so with a stub module that needs a libcef.so that isn't installed:

  • Unchanged AppImage: all core modules load (control).
  • obs-vst.so needs a missing libcef.so: os_dlopen(... obs-vst.so): libcef.so: cannot open shared object file, then Failed to load core OBS modules. OBS cannot run without these modules. and OBS exits. That's the same sequence as the report.
  • obs-vst.so removed: Failed to load core module obs-vst. obs-websocket, obs-x264, rtmp-services and text-freetype2 (the core modules after it) are missing from "Loaded Modules", and OBS starts without them, with nothing to tell the user.

Proposed fix and failing test

Fix: in load_all_callback(), a core module that fails to open is recorded as a disabled module (OBS_MODULE_FAILED_TO_OPEN, as before), with a warning, and isn't counted as a core module load failure. Other failures (an incompatible version, a generic error) still are. In the Linux core module loader, a missing core module file no longer stops the loop.

RED test (cmocka, test_core_module_load, Linux): lays out a stub module under every core module name next to a copy of the test binary, and runs obs_load_core_modules() in that copy. 2 of 3 cases fail today:

  • missing_dependency (the first core module needs a library that isn't installed): obs_load_core_modules() returns false.
  • missing_file (the first core module isn't installed): image-source and every core module after it aren't loaded.
  • all_present (control) passes.

Not covered: the Windows and macOS core module loaders stop at a missing core module the same way (break / return). They are left as they are here, because I can't run them.

Activity

  1. rdoupe commented on Oct 14, 2026

    @rdoupe
    CollaboratorAuthor

    Claiming: this issue.

    1. RED: test_core_module_load lays out stub modules under every core module name next to a copy of the test binary and runs obs_load_core_modules() there. When one core module needs a library that isn't installed, the load fails as a whole (OBS won't start). When one core module file is missing, the core modules after it aren't loaded.
    2. GREEN: a core module that fails to open is recorded as failed to open, with a warning, and OBS carries on, as OBS 32 did for the same plugin. The Linux loader no longer stops at a missing core module.
      PR today.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions