Skip to content

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

Merged
Marvisak merged 1 commit into
Marvisak:mainfrom
BaggyALPHA:fix/windows-commit-limit-diagnostic
Nov 24, 2026
Merged

Marvisak merged 1 commit into
Marvisak:mainfrom
BaggyALPHA:fix/windows-commit-limit-diagnostic

Conversation

@BaggyALPHA

Copy link
Copy Markdown
Contributor

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).

@DaviTostes

Copy link
Copy Markdown

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

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

@WallasSCRIPTS

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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.

@Marvisak
Marvisak merged commit 9aef3d9 into Marvisak:main Nov 24, 2026
AntoninMichelq pushed a commit to AntoninMichelq/VIctory that referenced this pull request Nov 24, 2026
Issue Marvisak#23 asks for a check at startup: a host whose paging file cannot
take the 99,776 64 KiB pages (6.1 GiB) the title maps in one call on its
first boot stops the title a few seconds in, and until Marvisak#51 only the bare
failure reached the log.

`xmem::commit_headroom` reads the system commit limit and what is left of
it through `K32GetPerformanceInfo`, the call `commit_limit_message` already
makes. `victory run` prints both in the startup block, next to the 6.1 GiB
the first boot asks for, and adds a line when the headroom is short.

Bug reports paste the startup block, so every one of them now carries the
host's commit state beside the build hash and the console mode.

Verified on Windows 11 x64 (AMD RX 7600), Rust 1.98.1: cargo test
--workspace 265 passed, 0 failed, 4 ignored; clippy clean on victory-hle
and victory, --all-targets; rustfmt --edition 2024 clean. The line itself
needs a title to be seen, which this host has no dump for; the numbers
behind it are covered by `commit_headroom_is_within_the_limit`.

The `PERFORMANCE_INFORMATION` initializer in `commit` is fixed here as
clippy asks, since it is the same struct and its warning was the crate's
only one.
mercuryVM pushed a commit to mercuryVM/VIctory that referenced this pull request Nov 24, 2026
A refused XMemVirtualAlloc or XMemAllocDefault handed the title a null in
silence, and the title then writes at null plus an offset, which reads
like a title bug. In Marvisak#289 the faulting write is at 0x217800, the
request's length 0x2173a0 rounded up to 2 KiB, so the base it built on
was most likely such a null.

At the commit limit, XMemVirtualAlloc now writes the same crashes.log
report the physical-page commit writes since Marvisak#51 (the shared part is
`commit_refused`); other refusals, and a host heap out of memory, are
warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
suirentakamura referenced this pull request in suirentakamura/victory-suiren Nov 24, 2026
…ostic

Report Windows commit-limit failures in crashes.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants