RAGE's own DEBUG INFO, live: VICTORY_RAGE_DEBUGINFO=<seconds> (streaming requests, tile heap, pools, camera, mission) in the log and window caption #643
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/fxceless--victory-fork!643
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-643"
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?
@Jonirulah on GitHub · 2026-11-25 03:50 UTC · original
Jonirulah:rage-debuginfo-live→main· +81 −2 · 4 files · 1 commits · openRAGE already reports its state. This reads it while the title runs, instead of only after a crash.
The title's crash handler writes a
###### DEBUG INFO ######block: game state, frame, streaming requests, tile heap used/total, entity pools (INSTANCE_LIST,OBJECT,LIGHT...), camera position and front, mission and stage, script threads, player, console type. So far it has only been seen in*.crash.logafter a crash, and several issues quote it from there.With
VICTORY_RAGE_DEBUGINFO=<seconds>(diagnostics builds), a thread of ours calls the title's own builder (RVA0x21b9a40in 1.0.2.1) every N seconds:RAGE: ..., next to our frame lines;| RAGE frame 1014 stream 722 tileheap 3881/3977 MB Game Running.VICTORY_RAGE_DEBUGINFO_RVA(hex) overrides the address for another build.Why it's safe to call live: each section reads a cache the title keeps, under a try-lock (
lock cmpxchgon its flag). If the title holds the lock, the section writesCache is locked! Skipping!and moves on, so the call never waits on the title. The builder uses no TLS. Its printf goes through one global 4 KiB buffer of the title's, so only one thread of ours calls it. The first call waits 20 s.What it showed (RTX 3070 Laptop 8 GB, Series S, first room): tile heap 3881/3977 MB with 722 streaming requests pending, then 3560 MB and 27 pending ten seconds later.
MEMORYINFOstays 0 outside a crash; the other sections update live. That makes it useful for questions like the first room's walls: whether RAGE never asked for them, has them queued, or has them loaded and they still aren't drawn.Changes:
apps/victory/src/run.rs(diagnostics only),set_caption_extrainvictory-gpu(host.rs,lib.rs), re-exported fromvictory-hle. Release and diag builds pass onmain(310c6eb).shortcut: the RVA is specific to 1.0.2.1, and nothing checks a signature before the call.
AI-assisted: the builder, its sections and their locks were found with Ghidra by a second Claude session; Claude Code wrote and tested the change, and I ran the game.
The title's crash handler writes a "###### DEBUG INFO ######" block: game state, frame, paused, streaming requests, tile heap used/total, memory pools, console type, camera position and front, mission and stage, script threads, player, the entity pools (BUILDING, OBJECT, LIGHT, INSTANCE_LIST ...), peds and vehicles. Until now it was only seen after a crash, in the crash log. Its builder is the title's routine at RVA 0x21b9a40 in 1.0.2.1; it takes a writer { buf, cap, used } and calls each section in turn. With VICTORY_RAGE_DEBUGINFO=<seconds> (diagnostics builds) a thread of ours calls it every that many seconds with a 64 KiB writer of its own, prints each line as "RAGE: ..." beside our frame lines, and puts the figures worth watching while playing in the window caption: " | RAGE frame 1014 stream 722 tileheap 3881/3977 MB Game Running". VICTORY_RAGE_DEBUGINFO_RVA (hex) points it elsewhere for another build. Why it is safe enough to call while the title runs: every section reads a cache the title keeps, taken with a try-lock (lock cmpxchg on its flag); when the title holds it, the section writes "[Warning] Cache is locked! Skipping!" and goes on, so the call never waits on the title. The builder uses no thread-local state. Its printf formats through one global 4 KiB buffer of the title's, so only this one thread calls it; a crash at the same moment could interleave text, not hang. The first call waits 20 s, past the title's start-up. What it showed on an RTX 3070 Laptop 8 GB, Series S, first room: tile heap 3881 of 3977 MB used with 722 streaming requests pending, then 3560 MB and 27 pending ten seconds later. MEMORYINFO reads 0 outside a crash (the title fills that cache only then); SYSTEM INFO, MISC INFO, MISSION, POOLS and the rest update live. The builder, its sections and their locks were found with Ghidra on the title. shortcut: the RVA is the 1.0.2.1 title's; another build needs VICTORY_RAGE_DEBUGINFO_RVA. There is no signature check before the call.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.