Crash log: a panic carries our Rust stack #390
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!390
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-390"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Kaairim on GitHub · 2026-11-24 02:52 UTC · original
Kaairim:panic-backtrace→main· +38 −1 · 1 files · 1 commits · draftWhat
The panic hook in
crash.rsnow appends our Rust stack tocrashes.log, captured withBacktrace::force_capture()whateverRUST_BACKTRACEsays.Why
A panic in an
extern "system"function aborts the process (0xc0000409, as in #167), so the crash log is all that is left of it. It had the message and the location of the panic, but not the path that led there. Release builds already havedebug = "line-tables-only", so the stack names functions, files and lines.Tested
Windows 11 (build 26300), Rust 1.98.1 (pinned toolchain), x86_64-pc-windows-msvc:
crash::tests::a_panic_logs_our_stack: runs the test binary again as a child (panic_child, the pattern ofthreads::tests::exit_child) withRUST_BACKTRACEremoved; the child logs crashes to a temporary file and panics in an#[inline(never)]function. The log must hold the message,our stack:and that function's name. Without the fix it fails onour stack:.cargo test --workspace --no-fail-fast: 266 passed, 0 failed, 4 ignored (main: 264 / 0 / 4;panic_childcounts as a pass when run directly).cargo clippy --workspace --all-targets: the same two warnings as main.rustfmt --checkoncrash.rsshows the same six hunks as on main, none in the lines changed here.Not covered: the std unwinder stops at a frame without unwind data, so a panic on a title thread shows our frames down to the thunk, not the title's callers. Adding the file's own walker (
unwind+locate, asreport_unhandleddoes) would show those; I left it out to keep this small and can follow up if wanted. Not run: the title.Improvements by William "kaairim" Deivid (wdcore). AI-assisted: Claude Code with Claude Opus 5.5 wrote the change, the test and this description; a second Claude Opus 5.5 agent reviewed the diff.
🤖 Generated with Claude Code
@jeremygold02 on GitHub · 2026-11-24 04:26 UTC · original
Thanks @Kaairim for adding the Rust stack to panic reports. I tested head
e125477cbd6df1267ea4e5c099d13ab5e9e03dbawith:Result: 1 passed, 0 failed (19 filtered out). The regression test triggers a controlled panic and verifies the captured report includes our Rust stack. I did not inspect or reproduce any game log or title run.
@Marvisak on GitHub · 2026-11-25 01:16 UTC · original
Automated triage for the maintainers.
Needs rebase. This pull request conflicts with
main(conflicting:crates/victory-loader/src/crash.rs). It will be reviewed once it is rebased onto the currentmain.Generated by Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.