Crash reports: keep them when stderr is closed #1966
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!1966
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1966"
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?
@imjustprism on GitHub · 2026-11-25 01:53 UTC · original
imjustprism:fix/crash-report-broken-stderr→main· +79 −24 · 2 files · 1 commits · opencrash reports were printed with
eprint!, which panics when stderr is a pipe whose reader has left (a pager, or a| select -firstthat stopped reading). in the exception handler that panic cannot unwind, so the process died with 0xc0000409 and the report never reached crashes.log.log_crashlost the host gpu failure text the same way. the reports are now written to stderr with the write error ignored, so the log still gets them.the new test runs a child whose stderr is closed, raises a breakpoint and logs a gpu failure. without the change the child aborts and the log holds only the panic.
@DesertGamer on GitHub · 2026-11-25 02:15 UTC · original
VIctory V2: community PRs, merged and tested
Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch.
Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1).
⚠️ Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk.
Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help:
https://DesertGamer/VIctory-V2
Unofficial community fork of Marvisak/VIctory, GPL-3.0.
@AgneyaK on GitHub · 2026-11-25 02:41 UTC · original
Verified locally: merged
3eab67contomain940d32f(clean), Windows 11 26300, Rust 1.98.1 MSVC.main. Withmain'scrash.rsand this PR's test,reports_reach_the_log_when_stderr_is_closedfails exactly as described: With the PR it passes.cargo test -p victory-loader --locked5 runs, all green (34 unit + thecrash_logtests).cargo clippy -p victory-loader --all-targets --locked -- -D warnings: clean.host::faillogs throughtracingbefore calling the report.tracing-subscriber0.3.23's fmt layer haslog_internal_errors: falseby default, so a broken stderr is ignored there, not printed witheprintln!. That path is fine with this PR.victory-loader/src/stacks.rs(VICTORY_STACKS) prints witheprintln!(lines 99, 113, 119), so a stack dump with a closed stderr would panic that thread too. It's a diagnostics switch, so it's lower stakes.Not tested: the title with a closed stderr.
AI use: Claude Code (Claude Opus 5.5) ran these checks and wrote this; the results are from the runs described.
@Marvisak on GitHub · 2026-11-25 08:24 UTC · original · edited 2026-11-25 08:27 UTC
Automated triage for the maintainers.
Needs work: needs the maintainer's decision. The fix reads as correct. It is marked this way only because the new test starts a child process (see below), and changes that spawn processes are left to the maintainer.
crates/victory-loader/src/crash.rsnow writes crash reports withprint_to_stderr, which ignores the write error, instead ofeprint!/eprintln!. This coverslog_crashand the lines inreport(including thesave_on_crashnote). A closed stderr no longer panics inside the exception handler, which used to abort with 0xc0000409 before the report was appended tocrashes.log. After the change there are no othereprint!calls in the crash path, and the text written to the log is unchanged.The new test
reports_reach_the_log_when_stderr_is_closedre-runs its own test binary as a child process, the same wayfirst_chance_breakpoint_loggingonmainalready does; nothing external is started. A contributor's comment confirms that the test fails onmainwith the abort and passes with the change.CI (
check): passing.Generated by Claude Code
keep crash reports when stderr is closedto Crash reports: keep them when stderr is closedView 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.