Report Windows commit-limit failures in crashes.log #51

Manually merged
github merged 1 commit from gh-pr/51/head into gh-pr/51/base 2026-11-26 03:48:15 +00:00
Owner

@⁠BaggyALPHA on GitHub · 2026-11-23 23:49 UTC · original
BaggyALPHA:fix/windows-commit-limit-diagnostic → main · +68 −10 · 2 files · 1 commits · merged 2026-11-24 00:43 UTC

Problem

When Windows refuses to commit physical pages with error 1455, VIctory logs a warning that can be missed before the title hits a breakpoint. The subsequent crash report gives users little indication that the host ran out of commit capacity. Refs #23.

Change

  • Print the failed allocation size and paging-file guidance and append them to crashes.log. Include the current system commit usage and limit when Windows supplies them.
  • Document where to check committed memory in Task Manager. The allocation still returns failure to the title as before.

Verification

  • cargo test --workspace --locked on Windows with Rust 1.98.1. 225 passed and three reference-data tests were ignored. The new test checks the report both with and without system commit counters.
  • The changed Rust file passes rustfmt --edition 2024 --check. Workspace-wide formatting already fails on upstream 97c78d1.
  • The pre-commit asset-policy check passed for both staged files.

The diagnostic was verified with synthetic inputs. I did not run the title or exhaust the host's commit capacity. No game assets are included.

AI-assisted (OpenAI Codex).

**@⁠BaggyALPHA** on GitHub · 2026-11-23 23:49 UTC · [original](https://github.com/Marvisak/VIctory/pull/51) `BaggyALPHA:fix/windows-commit-limit-diagnostic` → `main` · +68 −10 · 2 files · 1 commits · merged 2026-11-24 00:43 UTC ## Problem When Windows refuses to commit physical pages with error 1455, VIctory logs a warning that can be missed before the title hits a breakpoint. The subsequent crash report gives users little indication that the host ran out of commit capacity. Refs #23. ## Change - Print the failed allocation size and paging-file guidance and append them to `crashes.log`. Include the current system commit usage and limit when Windows supplies them. - Document where to check committed memory in Task Manager. The allocation still returns failure to the title as before. ## Verification - `cargo test --workspace --locked` on Windows with Rust 1.98.1. 225 passed and three reference-data tests were ignored. The new test checks the report both with and without system commit counters. - The changed Rust file passes `rustfmt --edition 2024 --check`. Workspace-wide formatting already fails on upstream `97c78d1`. - The pre-commit asset-policy check passed for both staged files. The diagnostic was verified with synthetic inputs. I did not run the title or exhaust the host's commit capacity. No game assets are included. AI-assisted (OpenAI Codex).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:48:13 +00:00
github manually merged commit 7e42fefebc into gh-pr/51/base 2026-11-26 03:48:15 +00:00
Author
Owner

@⁠DaviTostes on GitHub · 2026-11-24 00:09 UTC · original

Tested 7e42fef stacked on #39 on Arch Linux x86_64, rustc 1.98.1: pass (no regression only).

  • cargo test --workspace: 155 passed, 0 failed, 3 ignored; merge with #39 clean.
  • Scope note: the reporting path is Windows-only (xmem commit-limit text in crashes.log), so the Linux run covers the portable HLE suite around it.
  • Overlap note: #64 changes the same crates/victory-hle/src/modules/xmem.rs area for the same purpose (reporting the commit limit before the page pool fails). Worth picking one shape between the two.
  • No game data used.

AI-assisted (DeepSeek V4.1 Flash coding agent).

**@⁠DaviTostes** on GitHub · 2026-11-24 00:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/51#issuecomment-7117758540) Tested `7e42fef` stacked on **#39** on **Arch Linux x86_64, rustc 1.98.1**: **pass (no regression only)**. - `cargo test --workspace`: **155 passed, 0 failed, 3 ignored**; merge with #39 clean. - Scope note: the reporting path is Windows-only (`xmem` commit-limit text in `crashes.log`), so the Linux run covers the portable HLE suite around it. - Overlap note: **#64** changes the same `crates/victory-hle/src/modules/xmem.rs` area for the same purpose (reporting the commit limit before the page pool fails). Worth picking one shape between the two. - No game data used. AI-assisted (DeepSeek V4.1 Flash coding agent).
Author
Owner

@⁠WallasSCRIPTS on GitHub · 2026-11-24 00:09 UTC · original

This covers the same commit-limit failure I had in #64, so I am closing mine
in your favour — crashes.log is a better place for the report than a log
line alone.

One addition worth considering: a startup preflight in victory run that
reads K32GetPerformanceInfo once and prints available commit and the
limit, warning below ~7 GiB of headroom before the title loads. A user with
a small pagefile then sees the cause before the breakpoint, and the
crashes.log report confirms it if it still fails. My now-closed #64 has
that piece in apps/victory/src/run.rs and two tests for the report and the
charge reading if you want to fold it in.

Nit on the test: PERFORMANCE_INFORMATION is initialized with
..Default::default(), so cb is set afterwards — that is fine, but
cb: size_of::<...>() as u32 in the struct literal is clearer and matches
the other callers.

**@⁠WallasSCRIPTS** on GitHub · 2026-11-24 00:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/51#issuecomment-7117768000) This covers the same commit-limit failure I had in #64, so I am closing mine in your favour — `crashes.log` is a better place for the report than a log line alone. One addition worth considering: a startup preflight in `victory run` that reads `K32GetPerformanceInfo` once and prints available commit and the limit, warning below ~7 GiB of headroom before the title loads. A user with a small pagefile then sees the cause before the breakpoint, and the `crashes.log` report confirms it if it still fails. My now-closed #64 has that piece in `apps/victory/src/run.rs` and two tests for the report and the charge reading if you want to fold it in. Nit on the test: `PERFORMANCE_INFORMATION` is initialized with `..Default::default()`, so `cb` is set afterwards — that is fine, but `cb: size_of::<...>() as u32` in the struct literal is clearer and matches the other callers.
Author
Owner

@⁠WallasSCRIPTS on GitHub · 2026-11-24 00:41 UTC · original

Verified 7e42fef on Windows 11 / AMD RX 7600 with Rust 1.98.1:

  • modules::xmem::tests::commit_limit_report_includes_request_and_system_commit passes.
  • cargo test -p victory-hle: 81 passed, 1 failed — modules::display::tests::sdr_and_display_deferrals (0x80070032). This same display test fails on an unmodified main checkout here because the machine has no display device.
  • cargo build --profile diag -p victory --features diagnostics links, and victory.exe --help runs.
  • Clippy reports field_reassign_with_default at xmem.rs:650, where info.cb is assigned after PERFORMANCE_INFORMATION::default(); initializing cb in the struct literal clears it.

No title data or small-pagefile host was available, so the real Windows error 1455 path was not exercised.

**@⁠WallasSCRIPTS** on GitHub · 2026-11-24 00:41 UTC · [original](https://github.com/Marvisak/VIctory/pull/51#issuecomment-7118334210) Verified `7e42fef` on Windows 11 / AMD RX 7600 with Rust 1.98.1: - `modules::xmem::tests::commit_limit_report_includes_request_and_system_commit` passes. - `cargo test -p victory-hle`: 81 passed, 1 failed — `modules::display::tests::sdr_and_display_deferrals` (`0x80070032`). This same display test fails on an unmodified `main` checkout here because the machine has no display device. - `cargo build --profile diag -p victory --features diagnostics` links, and `victory.exe --help` runs. - Clippy reports `field_reassign_with_default` at `xmem.rs:650`, where `info.cb` is assigned after `PERFORMANCE_INFORMATION::default()`; initializing `cb` in the struct literal clears it. No title data or small-pagefile host was available, so the real Windows error 1455 path was not exercised.
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/Marvisak--VIctory!51
No description provided.