obsproject / obsproject/obs-browser

OBS/CEF segfaults consistently on application exit

Open
#501 10 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

edit:
Offending commit and workaround found, see comment 7.


Operating System Info

Other

Other OS

Fedora 42

OBS Studio Version

Other

OBS Studio Version (Other)

32.0.0-beta1

OBS Studio Log URL

https://github.com/user-attachments/files/22277058/2025-09-11.16-08-07.txt

OBS Studio Crash Log URL

https://github.com/user-attachments/files/22277059/gdb.txt

Expected Behavior

OBS should be closing the browserdocks and exiting cleanly.

Current Behavior

OBS segfaults on exit, resulting in the "unclean shutdown" dialogue showing each launch.

Steps to Reproduce

Unfortunately reproduction is a bit murky since last time during testing I wasn't able to get it consistently either (which is why I didn't open an issue then), so I can only infer from my main profile where it happens consistently.

  1. Login to Twitch to get the Twitch docks
  2. Add a couple more custom browser docks (I have 5 additional)
    • https://dashboard.twitch.tv/popout/u/<user>/stream-manager/stream-health
    • https://dashboard.twitch.tv/popout/u/<user>/stream-manager/quick-actions
    • https://dashboard.twitch.tv/popout/u/<user>/stream-manager/activity-feed?uuid=<uuid> (not sure why I still have this TBH)
    • https://dashboard.twitch.tv/popout/u/<user>/stream-manager/reward-queue?uuid=<uuid>
    • https://play.pretzel.rocks/my-music/playlists
    • I also have various browser sources, but from what I understand they should not be relevant here
  3. Close OBS
  4. Get lucky(?)
  5. ...
  6. Profit(?)/segfault
Anything else we should know?

This used to be a widespread issue (happening with just the Twitch docks even), but was fixed in (IIRC) OBS 30. It started happening again with the OBS 31.1 beta cycle.

On Discord I was troubleshooting with Matt and we ended up increasing the timeout here:
https://github.com/obsproject/obs-browser/blob/910617b4997b0f53f2b3f95c7d2fa0f4a0753a92/panel/browser-panel.cpp#L169-L176

... to 5000, which fixed it for the most part. However it seems to me that increasing the timeout is really only a bandaid and not fixing the actual problem?

Regardless, during testing with a new profile I was unable to reproduce this consistently, which is likely due to not adding all the docks I have in my main profile, where I do get this consistently.

To my knowledge the exact cause of this crash is still unknown, but it was "fixed" with OBS 30 introducing the timeout loop. I have yet to figure out what happened between 31 and 31.1 beta1 to have this reappear, since I didn't get to bisect considering I couldn't reproduce it reliably in testing.

I don't remember if the backtrace from back then was the same/similar, you'd have to check the old beta discord channels for it, pretty sure I posted it.

This crash is likely tangentially related to #353

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 with the shutdown timeout loop in obs-browser/panel/browser-panel.cpp and inspect the attached OBS log and gdb backtrace. Reproduce exit with Twitch and custom browser docks if possible, then identify why browserdocks still trigger a segfault and verify that OBS exits cleanly without the unclean-shutdown dialog.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.