mojira.dev
MC-306748

Profiler tick ended before path was fully popped (remainder: 'root'). Mismatched push/pop?

I encountered the error Profiler tick ended before path was fully popped (remainder: 'root'). Mismatched push/pop?, causing invalid global percentage in game’s profiler pie chart.

After investigating the game's source code, I though the problem is that net.minecraft.client.renderer.LevelRenderer#renderLevel push a profiler named "executeFrameGraph" without poping it.

Implementing this Mixin patch below can fix this error:

@Mixin(LevelRenderer.class)
public class LevelRendererMixin { // Fix MC-306748
    @Inject(
            method = "renderLevel",
            at = @At("TAIL")
    )
    private void afterRenderLevel(
            GraphicsResourceAllocator resourceAllocator,
            DeltaTracker deltaTracker,
            boolean renderOutline,
            CameraRenderState cameraState,
            Matrix4f modelViewMatrix,
            GpuBufferSlice terrainFog,
            Vector4f fogColor,
            boolean shouldRenderSky,
            ChunkSectionsToRender chunkSectionsToRender,
            CallbackInfo ci,
            @Local(type = ProfilerFiller.class) ProfilerFiller profiler
    ) {
        profiler.pop();
    }
}

Attachments

Comments 1

Thank you for helping us improve Minecraft! We saved your files:

[media]

Burning_TNT

(Unassigned)

Unconfirmed

(Unassigned)

26.1 Snapshot 11

Retrieved