HydroEnergy Hydrodam crash
GamerSocke opened this issue ยท 3 comments
Your GTNH Discord Username
gamersocke
Mod Version
1.0.0-alpha14
Java Version
Java 21
Bug Report
Having a HydroEnergy Hydrodam in renderdistance crashes the game.
crash-2024-01-15_19.25.20-client.txt
java.lang.RuntimeException: Chunk build failed
at me.jellysquid.mods.sodium.client.render.chunk.compile.ChunkBuilder.handleFailures(ChunkBuilder.java:219)
at me.jellysquid.mods.sodium.client.render.chunk.ChunkRenderManager.updateChunks(ChunkRenderManager.java:584)
at me.jellysquid.mods.sodium.client.render.SodiumWorldRenderer.updateChunks(SodiumWorldRenderer.java:237)
at net.minecraft.client.renderer.RenderGlobal.clipRenderersByFrustum(RenderGlobal.java:6180)
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1181)
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1015)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1001)
at net.minecraft.client.Minecraft.run(Minecraft.java:4110)
at net.minecraft.client.main.Main.main(SourceFile:148)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.lang.reflect.Method.invoke(Method.java:578)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:165)
at net.minecraft.launchwrapper.Launch.main(Launch.java:29)
at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:87)
at org.prismlauncher.EntryPoint.listen(EntryPoint.java:130)
at org.prismlauncher.EntryPoint.main(EntryPoint.java:70)
Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.nio.BufferOverflowException
at me.jellysquid.mods.sodium.client.render.chunk.tasks.ChunkRenderRebuildTask.performBuild(ChunkRenderRebuildTask.java:210)
at me.jellysquid.mods.sodium.client.render.chunk.compile.ChunkBuilder$WorkerRunnable.run(ChunkBuilder.java:409)
at java.lang.Thread.run(Thread.java:1623)
Caused by: java.util.concurrent.ExecutionException: java.nio.BufferOverflowException
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
at me.jellysquid.mods.sodium.client.render.chunk.tasks.ChunkRenderRebuildTask.performBuild(ChunkRenderRebuildTask.java:205)
... 2 more
Caused by: java.nio.BufferOverflowException
at java.nio.Buffer.nextPutIndex(Buffer.java:727)
at java.nio.DirectFloatBufferU.put(DirectFloatBufferU.java:361)
at com.sinthoras.hydroenergy.client.renderer.HETessalator.addBlock(HETessalator.java:122)
at com.sinthoras.hydroenergy.client.renderer.HEWaterRenderer.renderWorldBlock(HEWaterRenderer.java:65)
at cpw.mods.fml.client.registry.RenderingRegistry.renderWorldBlock(RenderingRegistry.java:118)
at FMLRenderAccessLibrary.renderWorldBlock(FMLRenderAccessLibrary.java:53)
at net.minecraft.client.renderer.RenderBlocks.renderBlockByRenderType(RenderBlocks.java:296)
at me.jellysquid.mods.sodium.client.render.pipeline.BlockRenderer.renderModel(BlockRenderer.java:63)
at me.jellysquid.mods.sodium.client.render.chunk.tasks.ChunkRenderRebuildTask.performMainBuild(ChunkRenderRebuildTask.java:273)
at me.jellysquid.mods.sodium.client.render.chunk.tasks.ChunkRenderRebuildTask.lambda$performBuild$0(ChunkRenderRebuildTask.java:205)
at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
at com.gtnewhorizons.angelica.rendering.AngelicaRenderQueue.processTasks(AngelicaRenderQueue.java:33)
at net.minecraft.client.renderer.RenderGlobal.updateRenderers(RenderGlobal.java:6101)
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1187)
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1015)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1001)
at net.minecraft.client.Minecraft.run(Minecraft.java:4110)
at net.minecraft.client.main.Main.main(SourceFile:148)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.lang.reflect.Method.invoke(Method.java:578)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:165)
at net.minecraft.launchwrapper.Launch.main(Launch.java:29)
at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:87)
at org.prismlauncher.EntryPoint.listen(EntryPoint.java:130)
at org.prismlauncher.EntryPoint.main(EntryPoint.java:70)
Mod List or GTNH Pack Version
GTNH 2.5.1, Hodgepodge 2.4.9, CodeChicken Core 1.2.0
Final Checklist
- I have searched the issues and haven't found a similar issue.
- I have read the known incompatibilities and this is not related to one of those.
- I am running an officially released version. (Or, if I've compiled it myself I plan to fix the issue)
- This issue is not shader related (they aren't ready yet for testing)
Example of a dam that crashes:
I've been looking into this as it crashes my base as well. Setting the useLimitedRendering
to true
in hydroenergy.cfg alleviates the issue, but there are more. My guess is that the core issue is that the rendering of the HE water blocks is not thread safe. See HEWaterRenderer and HETessalator. Note that the latter uses static fields for everything. Setting that useLimitedRendering
setting to true
causes this if statement to fail and use a fallback renderer that is probably also not entirely safe, but likely easier to fix.
There's also an issue with HydroEnergy where it tries to update lighting information after the client has disconnected, causing repeated crashes in the main menu after leaving a world (due to crash or just logging out).
Crash dump for main rendering issue:
crash-2024-05-03_20.50.13-client.txt
Crash dump for menu screen/bettercrashes issue:
crash-2024-05-03_20.50.16-client.txt
EDIT: This was confirmed in GTNH 2.6.0 with bundled Angelica (alpha40) and updated Angelica (alpha42).