User startup crash: xmem: keep a stretch below 4 GiB for the title's 32-bit graphics heap #43
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/43"
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 ReTerryDavis/ReVIctory. Originally posted by staticman256 on 2026-12-04T10:47:30Z.
xmem: keep a stretch below 4 GiB for the title's 32-bit graphics heap
In plain terms
On some PCs the game dies half a second after launch, before the first frame, with
nothing on screen to say why. On the machine this was traced on (RX 9070 XT, Windows 11)
that happened on most starts of v0.2.0, v0.4.0 and v0.5.0. The one user who reported it
was technical enough to collect logs, build branches and run an A/B. Most people who hit
it will see a launcher that "does nothing" and move on, so the number of affected users
is likely larger than the number of reports.
The fix is small (2 files), has an off switch, and changes nothing on machines that
never had the problem.
What was wrong
At its start the title asks once for a 185 MB region that must be one free piece of
address space below 4 GiB (
XMemVirtualAlloc, kind 0x42000, flags 0x7). The requestarrives late: after the driver, its shader cache files and the packed shader cache are
mapped. On an affected machine those land below 4 GiB and leave no piece that big. The
request is refused (
os error 8, though 24 GB of RAM was free), NULL is returned, andthe title stops on its own assert (
0x80000003atvictory-image+0x19f4f58). There wasno retry.
What is changed
the driver and the shader cache are loaded. The title's 32-bit heap is split off its
front and the rest is released.
VICTORY_LOW_WINDOW_MBsets the size;0gives the old behaviour.biggest free piece, the ten biggest allocations with file names). Until now a report of
this kind could not be diagnosed from a log.
Evidence
Affected machine, both binaries built there with the same toolchain, launched
alternately:
0xc0000005)VICTORY_LOW_WINDOW_MB=0With the branch, runs of 25 minutes (23,112 frames) and 6.5 minutes were played. The new
log line at a refusal showed 4 MB free below 4 GiB in about 700 allocations, the biggest
being two 1 GiB private blocks, the AMD driver's
.parcshader cache maps (512, 192, 128and 64 MB),
shaders-pack.bin(238 MB) andamdxc64.dll(136 MB).On a machine that never failed (also RX 9070 XT) the stretch was held at 0x2580000, the
heap was placed in it, and play was unchanged; with
=0none of the new lines appeared.Not covered
not established, nor who owns the two 1 GiB blocks.
=0starts wasgranted near the top of the range (0xf2…).
0xc0000005(reserved, never committed) and a single stack overflow seen on thatmachine occur with and without this change and are not addressed.
not exercised; both fall back to the old path.
Claude Fable 5.2/Medium
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.