Crash files: keep only the newest ones when asked (VICTORY_KEEP_CRASHES) #2802

Open
github-bot wants to merge 1 commit from github-bot/gh-2802 into main AGit
Owner

@⁠Demos974 on GitHub · 2026-11-29 17:30 UTC · original
Demos974:crash-files-cleanup → main · +164 −0 · 2 files · 1 commits · open

What it changes

Every crash leaves a minidump (.dmp, about 34 MB) and a ictory--

With VICTORY_KEEP_CRASHES=<n> (at least 1, since the newest crash log is what a report is asked to attach), before the title runs the n newest minidumps and the n newest crash logs stay, by modified time, and a crashes.log past 1 MiB keeps its last 256 KiB, cut at the start of a record. Unset, nothing changes. Nothing else in the folder is touched (the title keeps its telemetrycache.dat there).

apps/victory/src/crashes.rs (new), one call in apps/victory/src/run.rs.

How it was tested

  • GPU and profile: RTX 5070 Ti 16 GB (driver 621.40), Core Ultra 7 265KF (8 fast + 12 slow cores), 64 GB; Series S, 720p, DLSS Quality, DLSS frame generation x4, no ray tracing
  • Before: the temp folder held 881 MB of crash files
  • After: 169 MB with the switch, the newest crash's files kept; the title started and ran as before
  • For shader changes, the wave sizes tested: not a shader change
  • cargo test passed for the crates it touches: yes (cargo test -p victory --bin victory: 80 passed, two new tests for the choice of files and the cut of crashes.log)

Checked for overlap

  • I searched the open pull requests for crash files and crashes.log. Related: #2074 (writes refused allocations to crashes.log; this only trims it, from the start of a record)

🤖 Generated with Claude Code

**@⁠Demos974** on GitHub · 2026-11-29 17:30 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2802) `Demos974:crash-files-cleanup` → `main` · +164 −0 · 2 files · 1 commits · open ## What it changes Every crash leaves a minidump (<guid>.dmp, about 34 MB) and a ictory-<date>-<time>-<pid>.crash.log in the title's temp folder (data\<title id>\temp), and our crash reporter appends a record to crashes.log beside it. Nothing ever removed any of them: one machine had 26 dumps, 879 MB, after one morning of crashes. With `VICTORY_KEEP_CRASHES=<n>` (at least 1, since the newest crash log is what a report is asked to attach), before the title runs the `n` newest minidumps and the `n` newest crash logs stay, by modified time, and a `crashes.log` past 1 MiB keeps its last 256 KiB, cut at the start of a record. Unset, nothing changes. Nothing else in the folder is touched (the title keeps its `telemetrycache.dat` there). `apps/victory/src/crashes.rs` (new), one call in `apps/victory/src/run.rs`. ## How it was tested - GPU and profile: RTX 5070 Ti 16 GB (driver 621.40), Core Ultra 7 265KF (8 fast + 12 slow cores), 64 GB; Series S, 720p, DLSS Quality, DLSS frame generation x4, no ray tracing - Before: the temp folder held 881 MB of crash files - After: 169 MB with the switch, the newest crash's files kept; the title started and ran as before - For shader changes, the wave sizes tested: not a shader change - `cargo test` passed for the crates it touches: yes (`cargo test -p victory --bin victory`: 80 passed, two new tests for the choice of files and the cut of `crashes.log`) ## Checked for overlap - [x] I searched the open pull requests for crash files and `crashes.log`. Related: #2074 (writes refused allocations to `crashes.log`; this only trims it, from the start of a record) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Every crash leaves a minidump (about 34 MB) and a crash log in the title's
temp folder, and a record in crashes.log beside it; nothing ever removed
them (26 dumps, 879 MB, after one morning of crashes on one machine).

With VICTORY_KEEP_CRASHES=<n> (at least 1), the n newest minidumps and the
n newest crash logs stay, by modified time, before the title runs, and a
crashes.log past 1 MiB keeps its last 256 KiB from the start of a record.
Unset, nothing changes. Nothing else in the folder is touched.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 17:33:26 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2802/head:github-bot/gh-2802'
git switch 'github-bot/gh-2802'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2802'
git switch 'github-bot/gh-2802'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2802'
git switch 'github-bot/gh-2802'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2802'
git switch 'main'
git merge --squash 'github-bot/gh-2802'
git switch 'main'
git merge --ff-only 'github-bot/gh-2802'
git switch 'main'
git merge 'github-bot/gh-2802'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!2802
No description provided.