Skip to content

Frontend: crash sentinel never created on first launch (CrashHandler runs before MakeUserDirs) #154

Closed

Description

@zackees

Found during the sanitizer launch passes (round 2 meta issue linked as parent). Upstream OBS code, unchanged in this fork.

Symptom

Every launch with a fresh profile logs:

error: Crash sentinel location '<home>/.config/obs-studio/.sentinel' does not exist and unable to create directory:
filesystem error: cannot create directory: No such file or directory [<home>/.config/obs-studio/.sentinel].
...
error: Crash sentinel location '<home>/.config/obs-studio/.sentinel' does not exist      (at shutdown)

The first session after install runs with no crash sentinel, so a crash or hang during that first run isn't detected as an unclean shutdown on the next launch.

Cause

  • OBSApp::OBSApp creates OBS::CrashHandler (OBSApp.cpp:998-1000), and its constructor calls checkCrashState() (CrashHandler.cpp:110).
  • That runs before OBSApp::AppInit() calls MakeUserDirs() (OBSApp.cpp:1133), so ~/.config/obs-studio doesn't exist yet.
  • checkCrashState uses std::filesystem::create_directory (single level), which fails when the parent is missing.

Repro

HOME=$(mktemp -d) obs, then check the log.

Fix

Use create_directories, or create the crash handler (or at least run checkCrashState) after MakeUserDirs().

Activity

  1. added
    bug
    on Oct 10, 2026
  2. zackees commented on Oct 13, 2026

    @zackees
    MemberAuthor

    Claiming: #154. Plan: extract the sentinel-directory step of checkCrashState into a Qt-free helper, cmocka test for a missing parent (RED), then create_directories (GREEN). One PR.

  3. added
    claimed
    on Oct 13, 2026
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

    bugclaimed

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions