Game: at Windows' commit limit the NVN layer's own allocations end the game ("recording handle set") with no wait and no out-of-memory notice #333
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot#333
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?
Longshot version
nightly-80-7315957c, a player's log. Longshot main (
16047f55) has the same code; the lines are quoted below.Channel
Nightly
What kind of problem
Crash, freeze or black screen
What happened
At Windows' commit limit (RAM plus the page file full), the game ended with a fatal error that doesn't say it ran out of memory:
recording handle setislive_handle_add()inhost/nvn_native.c(line 1416): when the handle set doubles,callocfails anddie()→hos_fatal()ends the game withExitProcess(3).The memory pressure itself is the known problem (the worklist's top row, memory filling over play; #324 and #77). This issue is about how it ends:
hos_commitand the first-touch handler (host/mkw_glue.c) wait up to 5 s at the commit limit, retrying while the texture cache gives commit back. In this log that wait worked twice, a moment before the crash. The host's own C allocations don't go through it: amalloc/callocfailing at the limit ends the game at once.commit_refused()never ran, and neither did its log line orhos_out_of_memory_box. The player saw a crash with no explanation, and the log's last line names a hash set. The player has tried several forks and assumed it was their GPU.host/nvn_native.catcommand buffer table(1278, 1313),recording buffer (%zu bytes)(1351),recording handle set(1416) andrecording copy (%zu bytes)(1576). Whichever allocation loses the race at the limit decides the message.Expected: a host allocation that fails at the commit limit gets the same treatment as a guest commit: wait for commit to come back, and if it doesn't, say "out of memory (RAM plus the page file)" in the log and in the notice before stopping.
A possible shape (not tried): an
xalloc/xcallocin the host that, on failure, checksGlobalMemoryStatusExheadroom (or_doserrno/GetLastError()for 1455), sleeps and retries likecommit_wait(), and on giving up calls the same path ascommit_refused()beforedie(). Use it at the five sites above, and in other host code thatdie()s on a failed allocation.Where in the game
Hyrule Field (child), loaded from a save, about halfway across. The player says it happens there every time, on every fork they tried.
How often
Every time (for this player, at this spot)
Graphics card and driver version
RTX 3060 12 GB, NVIDIA 617.14
CPU, RAM and operating system
12 cores / 20 threads, 16 GB RAM with a 16 GB page file (commit limit about 32.5 GB), Windows
Changes from the defaults
1920x1080 output, DLSS Quality, Longshot's frame interpolation on (Auto), V-Sync off. Nothing else visible in the log.
What the log shows about memory
VRAM full: ... in system memorylines at the end come from the commit limit, not VRAM: every VRAM block is charged to the process's commit on Windows.longshot_log.txt
Not attached: it's a player's log passed on through Discord. The lines above are quoted from it.
Filed from a review of the player's log; the root cause (commit growth) is the memory row and #324, so this issue covers only the crash path and its message.
🤖 Generated with Claude Code