Boot fails at System Init (0x80000003) when host memory fills below 4 GiB — port of upstream low_guards (Marvisak#1009) attached, applies to 829188e9 #2177

Closed
opened 2026-11-29 10:17:27 +00:00 by github-bot · 4 comments
Owner

@⁠xxhh1232333 on GitHub · 2026-11-29 10:14 UTC · original

tl;dr On hosts where the free space below 4 GiB is fragmented by the time the title asks for its 185 MB 32-bit block, every boot dies at System Init. Upstream Marvisak/VIctory fixed this in Marvisak/VIctory#1009 (xmem::low_guards); this fork does not include it yet. Attached is the port against 829188e9 — with it, the same machine that crashes ~20/20 launches boots and plays.

Symptom

WARN victory_hle::modules::xmem: XMemVirtualAlloc refused size=193986560 kind=0x42000 flags=0x7 error=... (os error 8) ... VIctory: unhandled exception 0x80000003 at victory-image-b99f876b74d4a77f.dll+0x19f4f58
Crash context: Game State: System Init, Frame: 0.

Reproduced with v2026.11.28.03 (official) and 829188e9 (clean build), both Series X and Series S, with and without settings.xml. A crashing launch never reaches the menus.

Diagnosis

  • Not RAM: commit limit 111 GB, 96 GB free at crash time; pagefile fixed at 64 GB.
  • The request carries ADDRESS_32BIT, so address_range gives 0..4 GiB and VirtualAlloc2 must find a contiguous 185 MB below 4 GiB. The host's own memory (image, driver, caches) fills that range first — the same finding as Marvisak/VIctory#790.
  • Layout luck: in one session a single boot got through before the range filled; every boot after that fails at the same allocation.

Fix (attached)

low_guards-port.patch, applies to 829188e9 with git apply -p1:

  • crates/victory-hle/src/modules/xmem.rs — adds the low_guards module (reserve the free space below 4 GiB at startup, 256 MB slack) and wraps allocation: a refused constrained request with highest < 4 GiB calls low_guards::retry.
  • apps/victory/src/run.rs — low_guards::install() under --execute, before Config::load, the image read, the device and the caches.

It mirrors Marvisak#1009 (merged upstream 2026-11-25). When nothing is refused it does nothing beyond the one-time reservation.

Verified here

  • Before: the log line above and the assert on every boot.
  • After: no XMemVirtualAlloc refused, the world loads and runs. Series S profile, 720p internal: ≈ 30–41 fps presented, frame ≈ 31 ms, CPU-bound (≈ 13 ms preparing incl. ~5 ms buffer copies, GPU ≈ 0.5 ms, ≈ 3 ms copy-back); drops to ~12 fps occasionally. ~44 draws/frame dropped with "no host pipeline".

Environment

RX 6800 16 GB (no NVIDIA GPU), Ryzen 7 7800X3D, ~47 GiB RAM, Win10 22H2 19045, Adrenalin 24.30.31.03. Title build 1.0.2.1. Self-build: Rust 1.98.1, MSVC 14.44, Windows SDK 22621.

Separate observations (identical before/after the patch; happy to file as their own issues with logs)

  • Distant trees and distant NPCs vanish for 1–2 frames at irregular intervals (#1165 class).
  • A boat in a cutscene renders black; some near objects lose all color (#1333/#582 class, and/or indirect light missing with VICTORY_BVH_BUILDER=0).
  • In the same scene the spray/waves draw across the boat hull (#794 class).
  • ~134× "a texture picked by index changed after its upload…" during play.

low_guards-port-829188e9.patch

中文版(Chinese translation)

摘要:在宿主 4 GiB 以下地址空间已经碎片化的机器上,标题启动时请求的 185 MB 32 位块必被拒绝,每次启动都在 System Init 阶段断言崩溃。上游 Marvisak/VIctory 已用 Marvisak/VIctory#1009(xmem::low_guards)修复;本 fork 尚未同步。附件是针对 829188e9 的移植补丁——同一台机器(约 20/20 次启动崩溃)打上后可以正常启动并游玩。

症状

WARN victory_hle::modules::xmem: XMemVirtualAlloc refused size=193986560 kind=0x42000 flags=0x7 error=... (os error 8) ... VIctory: unhandled exception 0x80000003 at victory-image-b99f876b74d4a77f.dll+0x19f4f58

(日志含义:宿主拒绝为游戏预留 185 MB 的"4 GiB 以下"地址块;标题随后在 System Init 阶段触发 0x80000003 断言崩溃。)

崩溃上下文:Game State: System Init,Frame: 0。

复现环境:官方 v2026.11.28.03 与 829188e9 干净构建;Series X / Series S 档案;有/无 settings.xml。崩溃的启动从未到达菜单。

诊断

  • 不是内存不足:崩溃时提交上限 111 GB、空闲 96 GB;页面文件固定 64 GB。
  • 该请求带 ADDRESS_32BIT,address_range 返回 0..4 GiB,VirtualAlloc2 必须在 4 GiB 以下找到连续的 185 MB。宿主自身的早期内存(镜像、驱动、缓存)先占满了该区间——与 Marvisak/VIctory#790 的结论一致。
  • 取决于地址布局运气:某次会话中唯一一次成功启动之后,后续每次都在同一处失败。

修复(附件)

low_guards-port.patch,可 git apply -p1 打到 829188e9:

  • crates/victory-hle/src/modules/xmem.rs:增加 low_guards 模块(启动时预留 4 GiB 以下空闲空间,留 256 MB 余量);被拒的约束请求且 highest < 4 GiB 时调用 low_guards::retry。
  • apps/victory/src/run.rs:--execute 时在 Config::load、镜像读取、设备与缓存之前调用 install()。

与上游 Marvisak/VIctory#1009(2026-11-25 已合并)一致;无拒绝发生时,除一次性预留外无行为变化。

本机验证

  • 打前:每次启动都出现上述日志并断言。
  • 打后:无 refused,世界加载并可游玩。Series S、720p 内部渲染:呈现约 30–41 fps,帧时间约 31 ms,CPU 瓶颈(约 13 ms 准备,含 ~5 ms 缓冲拷贝、贴图 ~1 ms;GPU 约 0.5 ms;回拷约 3 ms);偶发掉到 ~12 fps;每帧约 44 个绘制因 "no host pipeline" 被丢弃。

环境

RX 6800 16 GB(无 NVIDIA 显卡)、Ryzen 7 7800X3D、约 47 GiB 内存、Win10 22H2 19045、Adrenalin 24.30.31.03。游戏版本 1.0.2.1。自编译:Rust 1.98.1、MSVC 14.44、Windows SDK 22621。

其他观察(打补丁前后一致;可另开 issue 附日志)

  • 远处树木与远处 NPC 每隔不规则时间消失 1–2 帧(同 #1165 类)。
  • 过场里船体全黑;部分近景物体颜色丢失(同 #1333/#582 类,和/或 VICTORY_BVH_BUILDER=0 时缺少间接光)。
  • 同一场景浪花/水花绘制穿过船体(同 #794 类)。
  • 游玩中约 134 次 "a texture picked by index changed after its upload…"。

本文由 DeepSeek 生成。 / Drafted with DeepSeek.

**@⁠xxhh1232333** on GitHub · 2026-11-29 10:14 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2177) **tl;dr** On hosts where the free space below 4 GiB is fragmented by the time the title asks for its 185 MB 32-bit block, every boot dies at System Init. Upstream Marvisak/VIctory fixed this in Marvisak/VIctory#1009 (`xmem::low_guards`); this fork does not include it yet. Attached is the port against 829188e9 — with it, the same machine that crashes ~20/20 launches boots and plays. ## Symptom WARN victory_hle::modules::xmem: XMemVirtualAlloc refused size=193986560 kind=0x42000 flags=0x7 error=... (os error 8) ... VIctory: unhandled exception 0x80000003 at victory-image-b99f876b74d4a77f.dll+0x19f4f58 Crash context: `Game State: System Init`, `Frame: 0`. Reproduced with v2026.11.28.03 (official) and 829188e9 (clean build), both Series X and Series S, with and without `settings.xml`. A crashing launch never reaches the menus. ## Diagnosis - **Not RAM**: commit limit 111 GB, 96 GB free at crash time; pagefile fixed at 64 GB. - The request carries `ADDRESS_32BIT`, so `address_range` gives 0..4 GiB and `VirtualAlloc2` must find a contiguous 185 MB *below* 4 GiB. The host's own memory (image, driver, caches) fills that range first — the same finding as Marvisak/VIctory#790. - Layout luck: in one session a single boot got through before the range filled; every boot after that fails at the same allocation. ## Fix (attached) `low_guards-port.patch`, applies to 829188e9 with `git apply -p1`: - `crates/victory-hle/src/modules/xmem.rs` — adds the `low_guards` module (reserve the free space below 4 GiB at startup, 256 MB slack) and wraps allocation: a refused constrained request with `highest < 4 GiB` calls `low_guards::retry`. - `apps/victory/src/run.rs` — `low_guards::install()` under `--execute`, before `Config::load`, the image read, the device and the caches. It mirrors Marvisak#1009 (merged upstream 2026-11-25). When nothing is refused it does nothing beyond the one-time reservation. ## Verified here - Before: the log line above and the assert on every boot. - After: no `XMemVirtualAlloc refused`, the world loads and runs. **Series S profile, 720p internal: ≈ 30–41 fps presented**, frame ≈ 31 ms, CPU-bound (≈ 13 ms preparing incl. ~5 ms buffer copies, GPU ≈ 0.5 ms, ≈ 3 ms copy-back); drops to ~12 fps occasionally. ~44 draws/frame dropped with "no host pipeline". ## Environment RX 6800 16 GB (no NVIDIA GPU), Ryzen 7 7800X3D, ~47 GiB RAM, Win10 22H2 19045, Adrenalin 24.30.31.03. Title build 1.0.2.1. Self-build: Rust 1.98.1, MSVC 14.44, Windows SDK 22621. ## Separate observations (identical before/after the patch; happy to file as their own issues with logs) - Distant trees and distant NPCs vanish for 1–2 frames at irregular intervals (#1165 class). - A boat in a cutscene renders black; some near objects lose all color (#1333/#582 class, and/or indirect light missing with `VICTORY_BVH_BUILDER=0`). - In the same scene the spray/waves draw across the boat hull (#794 class). - ~134× "a texture picked by index changed after its upload…" during play. [low_guards-port-829188e9.patch](https://github.com/user-attachments/files/35568450/low_guards-port-829188e9.patch) <details> <summary>中文版(Chinese translation)</summary> **摘要**:在宿主 4 GiB 以下地址空间已经碎片化的机器上,标题启动时请求的 185 MB 32 位块必被拒绝,每次启动都在 System Init 阶段断言崩溃。上游 Marvisak/VIctory 已用 Marvisak/VIctory#1009(`xmem::low_guards`)修复;本 fork 尚未同步。附件是针对 829188e9 的移植补丁——同一台机器(约 20/20 次启动崩溃)打上后可以正常启动并游玩。 ## 症状 WARN victory_hle::modules::xmem: XMemVirtualAlloc refused size=193986560 kind=0x42000 flags=0x7 error=... (os error 8) ... VIctory: unhandled exception 0x80000003 at victory-image-b99f876b74d4a77f.dll+0x19f4f58 (日志含义:宿主拒绝为游戏预留 185 MB 的"4 GiB 以下"地址块;标题随后在 System Init 阶段触发 0x80000003 断言崩溃。) 崩溃上下文:`Game State: System Init`,`Frame: 0`。 复现环境:官方 v2026.11.28.03 与 829188e9 干净构建;Series X / Series S 档案;有/无 `settings.xml`。崩溃的启动从未到达菜单。 ## 诊断 - **不是内存不足**:崩溃时提交上限 111 GB、空闲 96 GB;页面文件固定 64 GB。 - 该请求带 `ADDRESS_32BIT`,`address_range` 返回 0..4 GiB,`VirtualAlloc2` 必须在 4 GiB 以下找到连续的 185 MB。宿主自身的早期内存(镜像、驱动、缓存)先占满了该区间——与 Marvisak/VIctory#790 的结论一致。 - 取决于地址布局运气:某次会话中唯一一次成功启动之后,后续每次都在同一处失败。 ## 修复(附件) `low_guards-port.patch`,可 `git apply -p1` 打到 829188e9: - `crates/victory-hle/src/modules/xmem.rs`:增加 `low_guards` 模块(启动时预留 4 GiB 以下空闲空间,留 256 MB 余量);被拒的约束请求且 `highest < 4 GiB` 时调用 `low_guards::retry`。 - `apps/victory/src/run.rs`:`--execute` 时在 `Config::load`、镜像读取、设备与缓存之前调用 `install()`。 与上游 Marvisak/VIctory#1009(2026-11-25 已合并)一致;无拒绝发生时,除一次性预留外无行为变化。 ## 本机验证 - 打前:每次启动都出现上述日志并断言。 - 打后:无 `refused`,世界加载并可游玩。**Series S、720p 内部渲染:呈现约 30–41 fps**,帧时间约 31 ms,CPU 瓶颈(约 13 ms 准备,含 ~5 ms 缓冲拷贝、贴图 ~1 ms;GPU 约 0.5 ms;回拷约 3 ms);偶发掉到 ~12 fps;每帧约 44 个绘制因 "no host pipeline" 被丢弃。 ## 环境 RX 6800 16 GB(无 NVIDIA 显卡)、Ryzen 7 7800X3D、约 47 GiB 内存、Win10 22H2 19045、Adrenalin 24.30.31.03。游戏版本 1.0.2.1。自编译:Rust 1.98.1、MSVC 14.44、Windows SDK 22621。 ## 其他观察(打补丁前后一致;可另开 issue 附日志) - 远处树木与远处 NPC 每隔不规则时间消失 1–2 帧(同 #1165 类)。 - 过场里船体全黑;部分近景物体颜色丢失(同 #1333/#582 类,和/或 `VICTORY_BVH_BUILDER=0` 时缺少间接光)。 - 同一场景浪花/水花绘制穿过船体(同 #794 类)。 - 游玩中约 134 次 "a texture picked by index changed after its upload…"。 </details> *本文由 DeepSeek 生成。 / Drafted with DeepSeek.*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 10:17:27 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-11-29 15:58 UTC · original

Update: v2026.11.29.01 has a start-up crash (0x80000003 during System Init, often on non-16:9 or scaled displays) that we have fixed for the next build. The workaround until then is to run setx VICTORY_NATIVE_SIZE 2560x1440 once, open a new terminal and start again. If it still crashes, please attach the log from %LOCALAPPDATA%\VIctory\logs. If you need it playable right now, v2026.11.28.03 is the last build without these regressions.

**@⁠trustno1-coder** on GitHub · 2026-11-29 15:58 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2177#issuecomment-7258517724) Update: v2026.11.29.01 has a start-up crash (0x80000003 during System Init, often on non-16:9 or scaled displays) that we have fixed for the next build. The workaround until then is to run `setx VICTORY_NATIVE_SIZE 2560x1440` once, open a new terminal and start again. If it still crashes, please attach the log from %LOCALAPPDATA%\VIctory\logs. If you need it playable right now, v2026.11.28.03 is the last build without these regressions.
Author
Owner

@⁠trustno1-coder on GitHub · 2026-11-29 16:32 UTC · original

Correction to the workaround above: setx only reaches programs started after you sign out and back in, so it often never reaches the game. Start it with the size given directly instead:

victory.exe play --set VICTORY_NATIVE_SIZE=2560x1440

That workaround is only for the crash at System Init on a non-16:9 output size. If your log has a line XMemVirtualAlloc refused size=6538919936, it is a different crash (Windows refused the game a 6.5 GB memory reservation); closing other programs and setting the page file to "System managed" may help there, and v2026.11.28.03 works meanwhile.

**@⁠trustno1-coder** on GitHub · 2026-11-29 16:32 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2177#issuecomment-7258989139) Correction to the workaround above: `setx` only reaches programs started after you sign out and back in, so it often never reaches the game. Start it with the size given directly instead: ``` victory.exe play --set VICTORY_NATIVE_SIZE=2560x1440 ``` That workaround is only for the crash at System Init on a non-16:9 output size. If your log has a line `XMemVirtualAlloc refused size=6538919936`, it is a different crash (Windows refused the game a 6.5 GB memory reservation); closing other programs and setting the page file to "System managed" may help there, and v2026.11.28.03 works meanwhile.
Author
Owner

@⁠trustno1-coder on GitHub · 2026-11-29 20:36 UTC · original

This issue has the start-up crash where Windows refuses the game's 6.5 GB reservation (XMemVirtualAlloc refused size=6538919936 ... os error 8, then +0x1e6c284). v2026.11.29.04 is a build with only one fix aimed at exactly this crash.

We couldn't reproduce the real crash here, so it may not fix it for you. Please try it and tell us here whether the game now starts, and attach the play log and crashes.log either way. If the play log has a line with no room at first in the title's window, include that line; it tells us whether this was the cause.

**@⁠trustno1-coder** on GitHub · 2026-11-29 20:36 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2177#issuecomment-7262218523) This issue has the start-up crash where Windows refuses the game's 6.5 GB reservation (`XMemVirtualAlloc refused size=6538919936 ... os error 8`, then `+0x1e6c284`). [v2026.11.29.04](https://github.com/trustno1-coder/VIctory-NVIDIA/releases/tag/v2026.11.29.04) is a build with only one fix aimed at exactly this crash. We couldn't reproduce the real crash here, so it may not fix it for you. Please try it and tell us here whether the game now starts, and attach the play log and crashes.log either way. If the play log has a line with `no room at first in the title's window`, include that line; it tells us whether this was the cause.
Author
Owner

@⁠trustno1-coder on GitHub · 2026-11-30 16:39 UTC · original

This should be fixed in v2026.11.30.02. If it still happens on the latest version, please open a new issue with the logs from a run on that version (the play log from %LOCALAPPDATA%\victory\logs and crashes.log).

**@⁠trustno1-coder** on GitHub · 2026-11-30 16:39 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2177#issuecomment-7285026966) This should be fixed in [v2026.11.30.02](https://github.com/trustno1-coder/VIctory-NVIDIA/releases/tag/v2026.11.30.02). If it still happens on the latest version, please open a new issue with the logs from a run on that version (the play log from `%LOCALAPPDATA%\victory\logs` and `crashes.log`).
This discussion has been locked. Commenting is limited to contributors.
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#2177
No description provided.