Repository navigation
frontend: Create the crash sentinel directory on a first launch - #424
Merged
Merged
Conversation
Behavior-neutral: checkCrashState calls ensure_crash_sentinel_dir, which has no Qt dependency so it can be unit tested. Refs #154
… parent (RED) Refs #154
CrashHandler checks the sentinel before MakeUserDirs runs, so on a first launch the obs-studio config directory didn't exist, create_directory failed, and the first session ran without a crash sentinel. Closes #154 Local-Gate: v1 tree=e8ddac0f8337aee1dc9c579188f75e1f7871b2e3 secs=147 lanes=lint:run,rust-test:run,tier2-linux:run Ci-Attestation: {"at":1791854791,"gate":"rust/all/fmt","host":"linux-x86_64","key":"6fa2b737279d4f51cb5eec3fa097ef3929c3c516f61811136323e4820750010a","lane":"lint","parents":["3e6d3791238644727e16883a4702bc904f23a3c7"],"secs":20,"stamp":"43ff6a93094f87fcd381fa6f524a4a00","tree":"e8ddac0f8337aee1dc9c579188f75e1f7871b2e3","v":1,"via":"run"} Ci-Attestation: {"at":1791854791,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"6fa2b737279d4f51cb5eec3fa097ef3929c3c516f61811136323e4820750010a","lane":"lint","parents":["3e6d3791238644727e16883a4702bc904f23a3c7"],"secs":20,"stamp":"eadc66cf3c895493d893a3903ff89c4f","tree":"e8ddac0f8337aee1dc9c579188f75e1f7871b2e3","v":1,"via":"run"} Ci-Attestation: {"at":1791854791,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"e0e3c0f8d718255fabcb7a3ed3267f6991995c972ca6421f311d0b6d86feaa0b","lane":"rust-test","parents":["3e6d3791238644727e16883a4702bc904f23a3c7"],"secs":53,"stamp":"d8dda1d70930c740648948ff3cb1e6da","tree":"e8ddac0f8337aee1dc9c579188f75e1f7871b2e3","v":1,"via":"run"} Ci-Attestation: {"at":1791854791,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"63f28129dbcc544a7e02dc90ab97786b9afd1af378b598cb1bd8d466ad4dd036","lane":"tier2-linux","parents":["3e6d3791238644727e16883a4702bc904f23a3c7"],"secs":74,"stamp":"00fd23f50f85442ba6c974c7c3a3ddf9","tree":"e8ddac0f8337aee1dc9c579188f75e1f7871b2e3","v":1,"via":"run"}
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.
Closes #154.
OBSAppconstructsCrashHandlerbeforeAppInit()callsMakeUserDirs(). On a first launch,checkCrashState()'s single-levelcreate_directory(<config>/obs-studio/.sentinel)failed becauseobs-studio/didn't exist yet. The first session ran with no sentinel, so a crash or hang in it wasn't detected on the next launch.frontend/utility/crash-sentinel-dir.{hpp,cpp}(ensure_crash_sentinel_dir), with no Qt.checkCrashStatecalls it.test_crash_sentinel_dir(cmocka,tests.d/) fails with the issue's exact error (cannot create directory: No such file or directory) when the parent is missing. The existing-directory case passes.create_directories.The other single-level
create_directorycalls in the frontend (profile directories under an existing parent) are intentional and untouched.Tier 2: 138/138 pass with OFF and ON. The local gate passed and is stamped. The frontend build itself is checked by this PR's full OBS builds.