From 276d331c63c2a2873ce03861c7c1eb435c6e9125 Mon Sep 17 00:00:00 2001 From: Overhatch Date: Mon, 3 Aug 2026 06:39:36 +0800 Subject: [PATCH] Fix frame-stats crash from the unregistered lightGridPublish stage RtTerrain.stream times a terrain.lightGridPublish stage, but the name was never added to Profile's pre-declared array. Profile.indexOf throws IllegalArgumentException on an unknown name rather than ignoring it, so once frame-stats.enabled is set, the first light-grid publish throws on the render thread and drops RT back to vanilla wholesale. With frame stats off, count/stage short-circuit before the lookup, which is why this never surfaced. Audited every stage/endStage/count literal in the repo against the pre-declared arrays; this was the only omission. Co-Authored-By: Claude Opus 5 (1M context) --- src/main/java/dev/comfyfluffy/caustica/rt/RtFrameStats.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/dev/comfyfluffy/caustica/rt/RtFrameStats.java b/src/main/java/dev/comfyfluffy/caustica/rt/RtFrameStats.java index 7722b8fd..172cc2d5 100644 --- a/src/main/java/dev/comfyfluffy/caustica/rt/RtFrameStats.java +++ b/src/main/java/dev/comfyfluffy/caustica/rt/RtFrameStats.java @@ -38,6 +38,7 @@ public final class RtFrameStats { "terrain.drainCompletion", "terrain.snapshotDispatch", "terrain.publish", + "terrain.lightGridPublish", "entity.capture", "entity.capture.extract", "entity.capture.submit",