Skip to content

mac: init CEF before running NSApplication loop#1614

Merged
sandboxcoder merged 1 commit intoobs_merge_31.1.2from
rno/mac-init-cef
Jan 6, 2026
Merged

mac: init CEF before running NSApplication loop#1614
sandboxcoder merged 1 commit intoobs_merge_31.1.2from
rno/mac-init-cef

Conversation

@sandboxcoder
Copy link
Copy Markdown
Contributor

@sandboxcoder sandboxcoder commented Dec 20, 2025

Description

Adding a state machine to track application state (Idle, initAPI, initCEF, Stop) which is helpful to ensure CefInitialize is called after api has been initialized. This way, obs-browser can be properly initialized in the main thread.

Motivation and Context

Solves issue where Google Chromium would fail to initialize. Most notably, it solves this crash:

shared_memory_switch.cc(237)] No rendezvous client, terminating process (parent died?)

How Has This Been Tested?

Attaching a test case that creates a browser source. Also verified in SLD.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

* Apparently CEF 6533 (obs31.1) is a bit more strict how it is
initialized. Now CefInitialize() will be invoked before
NSApplication is instantiated.
@sandboxcoder sandboxcoder marked this pull request as ready for review December 20, 2025 09:35
@sandboxcoder sandboxcoder changed the title mac: init Cef before running NSApplication loop mac: init CEF before running NSApplication loop Dec 20, 2025
@sandboxcoder sandboxcoder merged commit 61f53ee into obs_merge_31.1.2 Jan 6, 2026
15 checks passed
@sandboxcoder sandboxcoder deleted the rno/mac-init-cef branch January 6, 2026 17:15
summeroff pushed a commit that referenced this pull request Mar 11, 2026
* Apparently CEF 6533 (obs31.1) is a bit more strict how it is
initialized. Now CefInitialize() will be invoked before
NSApplication is instantiated.
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 this pull request may close these issues.

2 participants