Skip to content

macOS: UI thread deadlock on popup_whitelist_mutex when YouTube Live Control Panel reloads chat dock (33.0.0) #14082

Closed as not planned

Description

@evgenyfeldman

My Claude Code project encountered a total-freeze-bug after update. Here's Claude's comment:


Operating System Info

macOS 27.0.1 (Apple M1 Pro)

OBS Studio Version

33.0.0 (macOS Apple Silicon, official release build)

What happened

After updating from 32.2.2 to 33.0.0, OBS hard-freezes (UI completely unresponsive, has to be force-quit), usually within seconds after launch. A YouTube account is connected (Settings → Stream → YouTube, signed in), so the YouTube Live Control Panel dock and the YouTube Chat dock are present.

32.2.2 with the exact same profile and scene collection works fine.

Root cause (from a sample of the hung process, symbolicated with the 33.0.0 dSYMs)

The UI thread deadlocks on itself on the global, non-recursive popup_whitelist_mutex in obs-browser:

main thread:
  QApplicationPrivate::notify_helper
  (anonymous namespace)::request_handler_on_before_browse          (obs-browser)
  QCefBrowserClient::OnBeforeBrowse            browser-panel-client.cpp:158   <- holds popup_whitelist_mutex (taken at :137)
    QMetaObject::invokeMethod(widget, "urlChanged")   (direct call, same thread)
  QCefWidget::qt_static_metacall               moc_browser-panel.cpp:82
    -> YouTubeAppDock::ReloadChatDock -> YoutubeAuth::ReloadChat -> chat->cefWidget->reloadPage()
  CefBrowserCToCpp::ReloadIgnoreCache
  (anonymous namespace)::request_handler_on_before_browse          (obs-browser)
  QCefBrowserClient::OnBeforeBrowse            browser-panel-client.cpp:138   <- tries to lock popup_whitelist_mutex again
  std::mutex::lock -> __psynch_mutexwait        (blocked forever)

Sequence:

  1. The YouTube Live Control Panel browser navigates, so QCefBrowserClient::OnBeforeBrowse runs and takes std::lock_guard<std::mutex> lock(popup_whitelist_mutex) (browser-panel-client.cpp:137).
  2. While still holding the lock, it calls QMetaObject::invokeMethod(widget, "urlChanged", ...) (line 157). The widget lives on the same thread, so this is a direct call.
  3. YouTubeAppDock connects QCefWidget::urlChanged to YouTubeAppDock::ReloadChatDock (YouTubeAppDock.cpp:143). That calls YoutubeAuth::ReloadChat(), which calls chat->cefWidget->reloadPage(), which calls CefBrowser::ReloadIgnoreCache().
  4. With the CEF version in 33.0.0, ReloadIgnoreCache() synchronously re-enters OnBeforeBrowse for the chat browser on the same thread. That tries to lock the same global popup_whitelist_mutex again, and the thread deadlocks.

In 32.2.2 the reload was evidently dispatched asynchronously, so the re-entrancy never happened.

A secondary symptom: obs-websocket requests that need the UI thread (e.g. CreateScene → obs_canvas_scene_create → OBSBasic::SourceCreated → WaitConnection()) also hang forever, because the UI thread is already deadlocked.

Possible fixes

  • In QCefBrowserClient::OnBeforeBrowse, release popup_whitelist_mutex before emitting urlChanged, for example by scoping the lock to the forced_popups loop only.
  • Or emit urlChanged with Qt::QueuedConnection.
  • Or connect YouTubeAppDock::ReloadChatDock with Qt::QueuedConnection.

Expected Result

No deadlock; navigation in the YouTube Live Control Panel reloads the chat dock without freezing OBS.

Steps to reproduce

  1. macOS, OBS 33.0.0, connect a YouTube account (Settings → Stream → Service: YouTube, Connect Account).
  2. Keep the YouTube Live Control Panel and YouTube Chat docks enabled.
  3. Launch OBS. Any navigation in the Live Control Panel can trigger the deadlock; for me it happens within seconds of launch, and also while creating a scene via obs-websocket.

Workaround

Downgrading to 32.2.2. Closing the YouTube Live Control Panel dock should avoid it in theory (YouTubeAppDock::closeEvent destroys the browser widget), but OBS freezes before I can close it.

Activity

  1. WizardCM commented on Oct 24, 2026

    @WizardCM
    Member
  2. Fenrirthviti commented on Oct 26, 2026

    @Fenrirthviti
    Member

    Per our contribution policy, please do not post AI content in our repository in the future.

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

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions