Repository navigation
Route obs64 abort() to Crashpad's handler in the bridge CRT - #1835
Merged
Merged
Conversation
Since the static-CRT switch, Crashpad lives in the /MD bridge DLL and its SIGABRT handler is registered in that CRT. abort() in obs64 uses its own CRT, which has no handler, so every HandleCrash path ending in abort() (libobs fatal errors, std::terminate, shutdown timeout) produced no report. Forward SIGABRT to an exported bridge function that calls abort() in the bridge CRT. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The SIGABRT path does not check bridge_active, so an abort after DisableReports() can still generate and upload a crash report despite reporting being disabled.
1 open issue
What changed in this PR
Restores abort-based crash reporting for obs64 after the static-CRT split introduced in #1781 by forwarding aborts to the Crashpad bridge’s CRT.
Changes:
- Adds a non-returning bridge export that calls
abort(). - Installs a Windows SIGABRT forwarding handler in obs64 with a recursion guard and exit fallback.
- Preserves existing CRT linkage.
| File | Description |
|---|---|
| obs-studio-server/source/util-crashmanager.cpp | Installs the guarded SIGABRT forwarding handler. |
| obs-studio-server/source/crashpad-bridge.h | Declares the non-returning abort bridge API. |
| obs-studio-server/source/crashpad-bridge.cpp | Implements abort forwarding within the bridge’s CRT. |
Review effort: Balanced
DisableReports leaves the handler registered, so an abort after shutdown could still produce and upload a report. Terminate directly when the bridge is inactive, using the same gate as the exception filter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sandboxcoder
approved these changes
Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem: Since #1781, obs64 uses the static CRT while Crashpad lives in the /MD bridge DLL. Crashpad's SIGABRT handler is registered in the DLL's CRT, so
abort()in obs64 never reaches it. EveryHandleCrashpath ending inabort()(libobs fatal errors,std::terminate,stopAllOutputstimeout) sends no report. Affects 0.27.22 (Desktop 1.22) onward.Change: The bridge exports
osn_crashpad_bridge_abort(), which callsabort()in its own CRT. obs64 installs a SIGABRT handler (with recursion guard) that forwards to it. CRT linkage is unchanged.Effect: These crashes reach Sentry again.
Related: #1833.
Tests
node ci/run-unit-tests.js62/62; clang-format 18.1.3 cleanNot verified: bcrash/D3D11 path, HandleCrash annotations in the dump, combination with #1833.
🤖 Generated with Claude Code