Immersive Engineering

Immersive Engineering

152M Downloads

Client Crash — BufferBuilder empty when stacking multiple Engineering Workbenches (IE 12.3.1-189, MC 1.21.1)

Closed this issue · 4 comments

commented

Minecraft Version

1.21.1

Immersive Engineering Version

12.3.1-189

How did it happen?

Client crashes with the following error while entering certain chunks containing Immersive Engineering blocks:

java.lang.IllegalStateException: BufferBuilder was empty
at immersiveengineering.client.utils.VertexBufferHolder.lambda$new$1(VertexBufferHolder.java:92)

I came across this issue while playing on FTB Evolution 1.21.1 version 1.19.0 with neoforge version 21.1.172 on a multiplayer server (i don't know if this is reproducible on singleplayer as i rarely play singleplayer).

Reproduction Steps:

1 - Place an Engineering Workbench.

2 - Directly on top of that, place a second Engineering Workbench (Basically stacking them).

3 - Client-side crash will automatically occur as soon as rendering attempts to generate buffers for the stacked workbenches.

Root Cause Analysis:

  • Stacking two Engineering Workbenches vertically appears to cause invalid dynamic render buffer state within Immersive Engineering’s VertexBufferHolder.
  • BufferBuilder fails to build any vertices (BufferBuilder was empty) leading to immediate client-side rendering crash.
  • Server remains fully stable. I don't know if other players are affected by it aswell as i never managed to get someone to check it out.
  • Issue persists regardless of client-side video settings or rendering mods.
  • Breaking and separating the stacked workbenches resolves the issue entirely.

Suspected cause in code:

  • The Engineering Workbench may be generating positional offsets or dynamic rendering logic that assumes unobstructed placement.
  • When stacked directly, some bounding box or render data calculation likely results in an empty render buffer being submitted.

Additional Notes:

  • This issue is 100% reproducible. Very safe untill you enter the chunk the workbenches are placed
  • No third-party mods (apart from standard FTB Evolution 1.19.0 package) were involved. (That i'm aware of with the exception of journeymap)
  • Client rendering mods (ImmediatelyFast, Embeddium, Iris, Flywheel etc.) were present but didn't seem to be directly responsible as i rarely ever touch the video settings apart from the GUI scale.

Suggested fix direction:

  • Validate render buffer contents prior to submission inside VertexBufferHolder.
  • Prevent Engineering Workbench from being placed directly on top of another identical tile entity.
  • Add safeguard check to avoid submitting empty BufferBuilder objects.

Crash Log

https://pastebin.com/e3ySFNjU

commented

Update IE and see if the issue persists then

commented

Image

Works perfectly fine in my dev environment!

commented

Then it may be the FTB team's fault for not having updated the mod in the mod pack as we usually don't manually update them as a new update could possibly revert them back

commented

It's not the FTB team's fault at all. If you want to report an issue with IE, you have to test on the newest available version, because otherwise your testing may be nullified by changes we have since made.