Crash right after "audio DSP connected": title memsets unmapped address 0x217800 (len 0x2173a0) #289
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#289
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@DreamColt14 on GitHub · 2026-11-24 02:03 UTC · original
Environment
d2a4bae1f4, release buildWhat happens
Boot, first-boot screens and menus render at 30 fps. About 9 s after start, right after
"audio DSP connected base_length=393216 ir_seconds=30 max_streams=128 max_channels=1",
the title crashes:
0xc0000005, write at 0x217800, VCRUNTIME140.dll+0x1e579 (14.51.36247.0).
This is the rep stosb in memset: memset(dst=0x217800, 0, len=0x2173a0)
(r9=rdi=0x217800, r8=rcx=0x2173a0 unchanged, so the first byte already faulted).
The minidump memory map has 0x0-0x55a0000 FREE, so this is not a guard-page race.
Callers: image+0x1712b25, +0x1e74a4f, +0x5c523b0, +0x25a4d45, +0x1d857a6
Struct at r15 (title memory): ptr 0xd074b8dc0, u16 0x15, u16 0x16, u64 0x217800 @+0x10,
u32 0x2173a0 @+0x1c and @+0x20, u32 0x3000 @+0x24.
Guess (unverified): 0x217800 is small and 0x800-aligned, like an APU device address from
the HLE heap (audio.rs, APU_BASE = 0x10000), so the title may be using a device address
where it expects a host pointer. I could not disassemble the title image to check.
Attached: crashes.log and the crash.log from the title's data folder (minidump on request).
victory-20261124-042612-21088.crash.log
crashes.log
@pushkarreddyy on GitHub · 2026-11-24 12:00 UTC · original
Claiming this issue for investigation and resolution.
Architectural Context & Root Cause Analysis
In
crates/victory-hle/src/modules/audio.rs,APU_BASEis defined as0x0001_0000, andheap_allocissues 32-bit device addresses (apu) in that range (such as0x217800). However,heap_allocallocates backing host buffers via standard heapalloc_zeroed, keeping the 32-bitapudevice address virtualized only inHEAP.by_apu.When the audio DSP or middleware expects CPU-visible direct access to the APU buffer or assumes device addresses correspond to accessible virtual memory, passing
0x217800directly intomemsetfaults because0x00010000..is unmapped in the title process virtual address space.We are investigating establishing a fixed low memory mapping or ensuring APU allocation addresses mirror a reserved virtual region so direct CPU accesses by audio worker threads do not fault.
@pushkarreddyy on GitHub · 2026-11-24 12:18 UTC · original · edited 2026-11-24 14:22 UTC
Verified Patch Ready on Fork
The implementation resolving APU device address mapping is verified and available on my fork:
161cdc7based onmain(ffe310e)Changes (
crates/victory-hle/src/modules/audio.rs):heap_allocon Windows to allocate backing APU memory usingVirtualAlloc(apu as *mut c_void, size, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE)directly at the 32-bit device addressapu(starting atAPU_BASE = 0x0001_0000).std::alloc::alloc_zeroed.free_apu_memoryto properly release viaVirtualFreeorstd::alloc::dealloc.0x217800, direct CPU operations by title audio worker threads (such asmemset(0x217800, 0, len)) execute without access violations (0xc0000005).apu_alloc_memory_is_accessible.Verification:
rustfmt --edition 2024.cargo xtask policyclean).@imjustprism on GitHub · 2026-11-24 20:45 UTC · original
i hit this crash on my machine and traced it. the write to 0x217800 is not an apu device address being used as a pointer. the title asks ApuAlloc for one block of about 401 MiB and passes null for the device-address out-param, so it never sees a device address at all.
on my machine the host refused that allocation: windows was almost out of commit (ram + pagefile) because of other work, the title's own telemetry showed about 8 MB left. the call failed, the title did not check the result, and then cleared memory at null plus an offset inside that block. that offset is 0x217800.
i can reproduce it on demand: running the title in a job object with a 7.1 GB per-process commit cap gives the same crash at the same address. with commit free it boots to the menus, peak private memory about 7.3 GB.
so mapping memory at the device addresses would at best let the write land in an unrelated block and hide the crash. if you hit this, check free commit before launch and your pagefile size.
i have a small change that writes the refused allocation to crashes.log with the size and the system commit, so this shows up by name. pr coming.
@Marvisak on GitHub · 2026-11-25 01:47 UTC · original
Automated triage for the maintainers.
0x217800right after "audio DSP connected"), so it is tracked here. The related startup failure when Windows cannot commit memory is #23.crates/victory-hle/src/modules/audio.rs,ApuAllocgives the title a host pointer throughout(fromheap_alloc, which usesalloc_zeroed) and writes the device address only to the optional second out-parameter. When the host allocation fails, it returnsE_OUTOFMEMORYand leavesoutunwritten. A write at a small offset from null therefore matches an allocation that failed and whose result went unchecked. That is the explanation in the latest comment (commit exhausted, reproducible with a commit cap). It does not match a device address used as a pointer.crashes.logwas announced in the thread.Generated by Claude Code