Bug: tint lookup spins forever on a missing key (freeze when the house repairs task completes) #553
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/gamingwithhomie--larp!553
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-553"
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?
@dot-mike on GitHub · 2026-12-06 02:25 UTC · original
dot-mike:fix/tint-lookup-hang-upstream→main· +49 −0 · 2 files · 1 commits · openThe game freezes for good when the house repairs task completes. No frame begins again, and after 20 s larp logs
larp_gpu::stall: no frame begun for 20 s. It also happens with no mods loaded.Where it hangs
0x25D8000→0x317F0→0x31890→0x50EB750.0x31890walks a per-view list of objects. For each one it calls0x50EB750.0x50EB750turns the object into a handle and looks it up in a global hash table (image+0x876FC50, size atimage+0x876FC48). The value it finds is a 16-bit colour or tint, which goes into an ARGB colour for the draw.0x80), so a missing handle makes it loop forever. That's the freeze:0x50EB826 je(no match) →0x50EB9D1 inc eax; jmp 0x50EB80F(next group);0x6Fof 128.0x1FFFF). So the freeze means an object was still in the render list after its table entry was removed.Fix
hooks::tint_lookup_exit, retail build only, called next toconstant_uploadsbefore the title runs:+0x50EB9D1(inc eax; jmp +0x50EB80F) become a jump to 34 bytes of int3 padding at+0x55E824D. It doesn't overlapSETTINGS_CAVE.vpmovmskb. If one is there, the key is absent, and it returns through the function's own exit at+0x50EB910. Otherwise it does what the stock bytes did.larp_loader::patchwith the stock bytes checked first.The result: an object missing from the table draws without its tint for that frame, and the render worker no longer hangs. Lookups of keys that are in the table are unchanged.
Testing
procdump -mmon the frozen process. One thread was inlarp-image+0x50EB826, and all the others were waiting.hook: tint lookup returns on a missing key. Completing the task shows "house repairs complete", and the game keeps running. I tested this on a build of this patch on top of a local branch.main, builds withcargo build --release -p larp.Known limit
The early exit is exact if entries are never removed one at a time. I only found inserts into the first group with room, and a clear of the whole table. If a single-entry delete exists, a key past a freed slot could be missed. That object would draw without its tint for a frame.
🤖 Generated with Claude Code
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.