Crash reports: keep them when stderr is closed #1964
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from Marvisak/VIctory. Originally posted by imjustprism on 2026-11-25T01:53:21Z.
crash 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.
Imported from Marvisak/VIctory. Originally posted by DesertGamer on 2026-11-25T02:15:41Z.
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.
Imported from Marvisak/VIctory. Originally posted by AgneyaK on 2026-11-25T02:41:26Z.
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.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T08:24:16Z.
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
[PR #1966] keep crash reports when stderr is closedto [PR #1966] Crash reports: keep them when stderr is closedImported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-27T02:40:40Z.
Independent CPU-only verification on Windows (Rust 1.100.0/MSVC, worktree-local
CARGO_TARGET_DIR,CARGO_BUILD_JOBS=2, no game data).3eab67c, merge base940d32f.cargo test --locked -p victory-loader --test crash_log -- reports_reach_the_log_when_stderr_is_closed --exact --test-threads=1 --quiet->test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1 filtered out(exit 0).git diff --check 940d32f HEAD-> exit 0.git grep -c ... crates/victory-loader/tests/crash_log.rs-> no hits).Note: only the named synthetic integration test was replayed; the full crate suite was not run. GPU/driver: N/A (CPU-only crash-log test). AI-assisted (Hy4 flash). No game data, assets, extracted shaders or DRM involved.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.