You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
macOS: no hang on quit when the first browser source is created off the main thread during shutdown #2391
Follow-up from the coordinator review of obs-rust/obs-browser#10 (#2387, obs-rust/obs-browser#10 (review)). On macOS, obs_browser_initialize() now hands BrowserInit() to the Qt main thread with a blocking queued call when it is called from another thread. If that happens while OBS shuts down, after Qt's main loop has stopped, nothing runs the queued call, and the calling thread waits forever: OBS hangs on quit.
It needs a first browser source created off the main thread during shutdown (for example an obs-websocket CreateInput that arrives while OBS quits), so it is rare, but a hang on quit is hard to diagnose.
Scope
obs-rust/obs-browser obs_browser_initialize() (Qt-loop build): when the Qt application is closing down (QCoreApplication::closingDown()), do not hand BrowserInit() to the main thread; leave CEF uninitialized, as for a failed initialization.
Keep the hand-over in a small helper without CEF (for example RunOnQtMainThread(std::function<void()>), returning whether it ran), so it can be tested on its own.
Acceptance criteria
RED then GREEN in obs-browser: a Qt Core test calls the helper from a worker thread after the application's event loop has finished, and requires it to return within a timeout without running the function. The same test shows that it still runs the function on the main thread while the loop runs.
tests/first_source_off_main_thread.py still passes on macOS.
RED in obs-rust/obs-browser: the hand-over to the Qt main thread moves into a helper without CEF, and a Qt Core test calls it from a worker thread after the event loop has finished (it must return within a timeout without running the function) and while the loop runs (it must run the function on the main thread).
GREEN: the helper does not hand over when QCoreApplication::closingDown(), and obs_browser_initialize() leaves CEF uninitialized then.
tests/first_source_off_main_thread.py on macOS, then the submodule bump here.
Activity
vpacher commentedon Oct 25, 2026
Claiming: investigation
Plan, as in the description:
QCoreApplication::closingDown(), andobs_browser_initialize()leaves CEF uninitialized then.tests/first_source_off_main_thread.pyon macOS, then the submodule bump here.Do not hand over to the Qt main thread once its loop has stopped (#11)
obs-browser: Update to 63fd678 (macOS sandbox, no hang on quit) (obs-…