Skip to content

bug: frontend: unattended start blocks forever on the "Crash Detected" dialog after an unclean shutdown (upstream #12650) #809

Closed

Description

@vpacher

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.cpp OBSApp::checkForUncleanShutdown() calls handleUncleanShutdown() unconditionally when crashHandler_->hasUncleanShutdown() is true:
if (hasUncleanShutdown) {
	UncleanLaunchAction launchAction = handleUncleanShutdown(hasNewCrashLog);
  • handleUncleanShutdown() (same file) runs crashWarning.exec(), a modal dialog with no timeout.
  • frontend/obs-main.cpp: the --disable-shutdown-check branch and disable_shutdown_check were 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:

  1. Start OBS through the unit.
  2. Kill it: systemctl kill -s KILL <unit> (or a container hard stop such as Proxmox pct stop).
  3. 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 --help again.

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.

Activity

  1. vpacher commented on Oct 15, 2026

    @vpacher
    MemberAuthor

    Claiming: this issue.

    1. RED: move the unclean-launch decision into frontend/utility/unclean-launch.hpp (decideUncleanLaunch(), no change in behaviour) and add test_unclean_launch (cmocka, no widgets). The case "unclean shutdown + --disable-shutdown-check" fails: the prompt is still shown.
    2. GREEN: parse --disable-shutdown-check in obs-main.cpp again (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.
  2. zackees commented on Oct 15, 2026

    @zackees
    Member

    On the "Related" note (sentinel path): that one is already handled. CrashHandler.cpp passes "obs-studio/.sentinel" to GetAppConfigPathPtr (frontend/OBSApp.cpp:1810), which under OBS_RUST_VERSION maps it through AppConfigRelativePath (frontend/utility/AppIdentity.hpp): a leading obs-studio/ becomes obs-studio-rust/. So the fork's sentinel lives in obs-studio-rust/.sentinel and an upstream crash won't trigger the fork's prompt. No separate issue needed.

  3. vpacher commented on Oct 15, 2026

    @vpacher
    MemberAuthor

    Thanks, you're right. I only looked at the literal in CrashHandler.cpp and missed the AppConfigRelativePath() mapping in GetAppConfigPathPtr(). 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.

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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions