[Crash] Access violation in nvnTextureBuilderSetSwizzle when opening the ocarina note sheet (RTX 5070 Ti) #500
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot#500
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?
Builder version
current
main(46ea554), built from sourceHow you built
From source (pipeline as in #384)
Game files given to it
A .nup (build
e0f3ccfa)The error
Freeze, then crash, on opening the ocarina note sheet. In Hyrule Field, after taking the ocarina: the first open of the note sheet froze the picture (~9 s at ~14 fps in the log's present intervals) — the audio kept running. Opening it a second time crashed the game outright.
Windows WER signature:
Resolved against that build's
hookshot.map: the RVA lands insiden_nvnTextureBuilderSetSwizzle, +0x2d into it — i.e.TB(P(0))->d.swizzle_r = ...dereferenced a null or freed texture-builder pointer (host/nvn_native.c, theNV(nvnTextureBuilderSetSwizzle)handler; none of thenvnTextureBuilder*handlers null-checkP(0)).Context from the same session's log: the freeze window shows new texture/program churn (the sheet UI's first build), then the second open hit the stale builder. Session before the crash: 108,240 presents, mean 54.7 fps, 0 shader failures, no other crash — see #386 for the session's full picture.
A null guard in the
nvnTextureBuilder*handlers (early return whenP(0)is null, like a console would silently tolerate) would at least turn this crash into a visible glitch. Reproduction: take the ocarina, open the note sheet, close it, open it again.Visual Studio or Build Tools version, and Windows SDK version
MSVC 14.44, SDK 10.0.26100
Operating system and free space on the output drive
Windows 11, ~60 GB free
Confirmations
Second reproduction, different context: in combat against flying enemies in Hyrule Field, the game froze once (picture stalled, audio continued), and the second freeze crashed with the exact same signature:
So it is not specific to the ocarina sheet — it reproduces in combat too, as a freeze-then-crash-on-second-freeze pattern, with the null/freed texture-builder pointer being dereferenced in
nvnTextureBuilderSetSwizzleboth times. The freeze-then-crash cadence suggests the game recovers the first stale-builder state and the second one is fatal.Near the crash, the log shows mesh-program work for the flying enemies (
mesh b46dc62c84b9b85e, 32 threads, storage buffers in c0) and repeatedupload over a drawn imagewarnings (textures #242 1536x864 and #1704 384x216 the GPU wrote and the game uploaded over) — possibly related to how the builders for those combat textures are recycled.0c511fdis inmain: a texture builder with no address now goes to a zeroed scratch builder, sonvnTextureBuilderSetSwizzleno longer readsA64_MEM + 0x5c, and the first four occurrences lognvn: a texture builder of no address (lr ...).I added a game-free regression test that builds the real setter from
host/nvn_native.cand calls it with a null builder: PR #540. Please retest on a build with that commit, especially the combat reproduction from your second comment, and attachhookshot_log.txtif it still crashes. The lastnvn: a texture builderline is the one I need.Fixed in release faster-fps: a null texture builder now gets a scratch one, so the ocarina note sheet no longer crashes. Please update from https://github.com/NotRexed/Hookshot/releases/latest.