RAGE's own DEBUG INFO, live: VICTORY_RAGE_DEBUGINFO=<seconds> (streaming requests, tile heap, pools, camera, mission) in the log and window caption #643

Open
Jonirulah wants to merge 1 commit from upstream-pr/643 into main
Jonirulah commented 2026-11-25 03:50:48 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Jonirulah on 2026-11-25T03:50:48Z.


RAGE 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.log after 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 (RVA 0x21b9a40 in 1.0.2.1) every N seconds:

  • each line goes to stderr as RAGE: ..., next to our frame lines;
  • the useful figures go in the window caption: | 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 cmpxchg on its flag). If the title holds the lock, the section writes Cache 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. MEMORYINFO stays 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_extra in victory-gpu (host.rs, lib.rs), re-exported from victory-hle. Release and diag builds pass on main (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.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6596796149 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/643). Originally posted by [Jonirulah](https://github.com/Jonirulah) on 2026-11-25T03:50:48Z. --- **RAGE 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.log` after 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 (RVA `0x21b9a40` in 1.0.2.1) every N seconds: - each line goes to stderr as `RAGE: ...`, next to our frame lines; - the useful figures go in the window caption: ` | 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 cmpxchg` on its flag). If the title holds the lock, the section writes `Cache 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. `MEMORYINFO` stays 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_extra` in `victory-gpu` (`host.rs`, `lib.rs`), re-exported from `victory-hle`. Release and diag builds pass on `main` (`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.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/643:upstream-pr/643'
git switch 'upstream-pr/643'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/643'
git switch 'upstream-pr/643'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/643'
git switch 'upstream-pr/643'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/643'
git switch 'main'
git merge --squash 'upstream-pr/643'
git switch 'main'
git merge --ff-only 'upstream-pr/643'
git switch 'main'
git merge 'upstream-pr/643'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
fxceless/victory-fork!643
No description provided.