Repository navigation
Description
Summary
Since OBS 32.0, --disable-shutdown-check is gone (upstream de997b1, "frontend: Update crash handling and log upload functionality"). The fork inherits this. After an unclean shutdown (crash, SIGKILL, power loss, a container hard stop), the next start shows a modal "OBS Studio Crash Detected" QMessageBox and waits. On an unattended host (systemd service, headless X, kiosk, container), nobody can click it. OBS stays in that state with no websocket, no outputs and no log after line 1.
The flag is still parsed by many service units and autostart scripts. Since 32.0 an unknown argument is ignored, so these setups break without a warning.
Upstream closed the report as not planned (#12650, reported by @L4cache and others; duplicates #12694, #12703). Upstream's reason: crashes must stay visible. The fix below keeps them visible in the log and only skips the blocking prompt.
Location
frontend/OBSApp.cppOBSApp::checkForUncleanShutdown()callshandleUncleanShutdown()unconditionally whencrashHandler_->hasUncleanShutdown()is true:
if (hasUncleanShutdown) {
UncleanLaunchAction launchAction = handleUncleanShutdown(hasNewCrashLog);handleUncleanShutdown()(same file) runscrashWarning.exec(), a modal dialog with no timeout.frontend/obs-main.cpp: the--disable-shutdown-checkbranch anddisable_shutdown_checkwere removed in de997b1.
Class
Availability / logic error: the process blocks forever on start, without a user to answer the dialog.
How it is reached
Reproduced with the v0.1.0 master build (aaed86f) on Debian 13, headless (Xorg on :1), started by a systemd unit with --disable-shutdown-check:
- Start OBS through the unit.
- Kill it:
systemctl kill -s KILL <unit>(or a container hard stop such as Proxmoxpct stop). - Start the unit again.
Result: the log stops at Crash or unclean shutdown detected. The "OBS Studio Crash Detected" window is open on the X display. The websocket port does not open. Expected: with --disable-shutdown-check, OBS logs the unclean shutdown and starts normally.
A real-world trigger: Home Assistant's Proxmox integration stops containers with a hard stop. Every stop is then unclean, and every next start blocks.
Proposed fix and failing test
Fix: restore --disable-shutdown-check.
- With the flag,
checkForUncleanShutdown()does not show the dialog. It logs a warning (Unclean shutdown detected; prompt skipped (--disable-shutdown-check)), launches in normal mode (no Safe Mode) and does not upload a crash log. - Without the flag, the behavior does not change.
- Add the flag to
--helpagain.
To make the decision testable without a display, move it into a small pure helper, for example frontend/utility/unclean-launch.hpp:
struct UncleanLaunchDecision {
bool showPrompt;
bool logSkippedPrompt;
};
UncleanLaunchDecision decideUncleanLaunch(bool hasUncleanShutdown, bool disableShutdownCheck);RED test (cmocka, test_unclean_launch, no Qt widgets):
- unclean shutdown + flag set:
showPrompt == false,logSkippedPrompt == true. Fails today: the helper only takes the unclean state into account. - unclean shutdown + no flag:
showPrompt == true(passes before and after). - clean shutdown, with or without flag:
showPrompt == false(passes before and after).
GREEN: implement the helper, parse the flag in obs-main.cpp, and use the helper in checkForUncleanShutdown().
Related (separate issue, if wanted)
frontend/utility/CrashHandler.cpp uses crashSentinelPath = "obs-studio/.sentinel". This is the upstream directory, not the fork's obs-studio-rust config identity (#632). An upstream OBS crash on the same machine can therefore trigger the prompt in the fork, and the other way round.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
vpacher commentedon Oct 15, 2026
Claiming: this issue.
frontend/utility/unclean-launch.hpp(decideUncleanLaunch(), no change in behaviour) and addtest_unclean_launch(cmocka, no widgets). The case "unclean shutdown +--disable-shutdown-check" fails: the prompt is still shown.--disable-shutdown-checkinobs-main.cppagain (and list it in--help). With the flag,checkForUncleanShutdown()logs a warning, launches in normal mode and does not upload. Without the flag, nothing changes.PR today.
zackees commentedon Oct 15, 2026
On the "Related" note (sentinel path): that one is already handled.
CrashHandler.cpppasses"obs-studio/.sentinel"toGetAppConfigPathPtr(frontend/OBSApp.cpp:1810), which underOBS_RUST_VERSIONmaps it throughAppConfigRelativePath(frontend/utility/AppIdentity.hpp): a leadingobs-studio/becomesobs-studio-rust/. So the fork's sentinel lives inobs-studio-rust/.sentineland an upstream crash won't trigger the fork's prompt. No separate issue needed.vpacher commentedon Oct 15, 2026
Thanks, you're right. I only looked at the literal in
CrashHandler.cppand missed theAppConfigRelativePath()mapping inGetAppConfigPathPtr(). Confirmed on my test box: the sentinels are in~/.config/obs-studio-rust/.sentinel/. Dropping that note; the PR for the main issue is #810.frontend: Restore --disable-shutdown-check
frontend: Route the unclean-shutdown prompt through a helper
frontend: Restore --disable-shutdown-check
frontend: Restore --disable-shutdown-check (obs-rust#810)
infra: Claim bot labels and assigns claimants, expires stale claims (o…