From ed25de6521731c6ef9dc284d127ac467c11e679b Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Fri, 16 Oct 2026 00:35:32 -0400 Subject: [PATCH] engine: crash reports name the startup step, the renderer and a native crash (#299) The journal keeps the startup step the app is in (phase) and the renderer (set_environment) across rebases; an unclean exit before the first frame is reported "during startup (, N s after launch)". native_paths() is where a native exception filter writes what it caught and a minidump; the next start puts the exception code, module+offset and thread into the report and moves the minidump into its folder. Adapted from SolidCraft's crash.rs. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo --- crates/engine/src/crash.rs | 205 ++++++++++++++++++++++++++++--- crates/engine/src/crash_tests.rs | 106 ++++++++++++++++ 2 files changed, 295 insertions(+), 16 deletions(-) diff --git a/crates/engine/src/crash.rs b/crates/engine/src/crash.rs index 287b912..933cf48 100644 --- a/crates/engine/src/crash.rs +++ b/crates/engine/src/crash.rs @@ -19,8 +19,16 @@ //! written again; at most [`MAX_NEW_PER_SESSION`] new reports per run, [`MAX_REPORTS`] //! reports, [`MAX_TOTAL_BYTES`] on disk, nothing older than [`MAX_AGE_DAYS`] days. //! +//! - **Startup steps** ([`phase`]): the journal keeps the step the app is in while it gets its +//! window and graphics device up (window, graphics instance, adapter, device, shader +//! compiles, first frame, [`RUNNING`]), so a crash inside a graphics driver still says where +//! it happened, and the renderer ([`set_environment`]) once the adapter is picked. +//! - **Native crashes** (Windows): the app's exception filter writes what it caught (exception +//! code, faulting module and offset) and a minidump next to the journal ([`native_paths`]); +//! the next start puts both into the unclean exit's report. +//! //! Reports are folders `crashes/