Skip to content

[Bug] Crash or Compatibility #577

Description

@BuenChico785446

Describe the bug
Game freezes and eventually hard-crashes on the render thread while a monster
spawner's mob preview is being rendered. EMF throws a repeated
IndexOutOfBoundsException while writing vertex data for a custom model cube
(EMFModelPartCustom$EMFCube), which appears to leave Minecraft's pose stack
unbalanced. About 14 of these exceptions get logged in the same tick, immediately
followed by a fatal IllegalStateException: Pose stack not empty on the render
thread, which freezes the game completely (had to be force-closed via Task Manager).

This seems to be very rare, it only happened once in this session, right as a
spawner's preview mob was rendering, and I can't reliably reproduce it on demand.

To Reproduce
Steps to reproduce the behavior:

  1. Load a save with a monster spawner nearby whose preview entity uses a custom
    (CEM) model via EMF/ETF.
  2. Be in render range while the spawner renders its spinning mob preview.
  3. Crash occurs spontaneously (no direct player action needed), could not
    reliably reproduce a second time.
  4. See error / freeze.

Expected behavior
Spawner preview renders normally without corrupting the pose stack.

Screenshots
N/A (game froze, no visual glitch before the freeze).

Crashlog
See attached latest.log. Relevant section starts at the first
IndexOutOfBoundsException in EMFModelPartCustom$EMFCube, ends with:

[Render thread/ERROR] [net.minecraft.client.Minecraft/FATAL]: Unreported exception thrown!
java.lang.IllegalStateException: Pose stack not empty
at net.minecraft.client.renderer.LevelRenderer.m_109588_(LevelRenderer.java:1431)
at net.minecraft.client.renderer.LevelRenderer.m_109599_(LevelRenderer.java:1282)
at net.minecraft.client.renderer.GameRenderer.m_109089_(GameRenderer.java:1126)
at net.minecraft.client.renderer.GameRenderer.m_109093_(GameRenderer.java:909)
at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1146)

(please complete the following information):

  • Minecraft Version: 1.20.1
  • Forge Version: 47.4.23
  • EMF version: 3.3.5
  • ETF version: 7.2.1
  • Does the issue persist with only EMF installed?: Not tested yet, happened in a
    large modpack.
  • if applicable, provide your modlist or log: https://mclo.gs/joA3vSQ

Additional context
The exception fires inside SpawnerRenderer -> EntityRenderDispatcher ->
MobRenderer, i.e. while rendering the mob preview inside a monster spawner block,
not a "live" mob in the world. The repeated IndexOutOfBoundsException on the
vertex buffer suggests the custom model for whatever entity was in the spawner had
more vertices/cubes than the allocated buffer expected. The thrown exception then
appears to skip the matching popPose() call, corrupting the pose stack for the
rest of the frame and crashing the render thread shortly after.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions