Sodium

Sodium

61M Downloads

Sorter already used

Helsium738 opened this issue · 18 comments

commented
[Chunk Render Task Executor #0/ERROR]: Chunk build failed
java.lang.IllegalStateException: Sorter already used!
	at knot/net.caffeinemc.mods.sodium.client.render.chunk.translucent_sorting.data.StaticNormalRelativeData.getSorter(StaticNormalRelativeData.java:32) ~[sodium-fabric-0.7.0-snapshot+mc1.21.8-build.707.jar:?]
	at knot/net.caffeinemc.mods.sodium.client.render.chunk.compile.tasks.ChunkBuilderMeshingTask.execute(ChunkBuilderMeshingTask.java:219) ~[sodium-fabric-0.7.0-snapshot+mc1.21.8-build.707.jar:?]
	at knot/net.caffeinemc.mods.sodium.client.render.chunk.compile.tasks.ChunkBuilderMeshingTask.execute(ChunkBuilderMeshingTask.java:52) ~[sodium-fabric-0.7.0-snapshot+mc1.21.8-build.707.jar:?]
	at knot/net.caffeinemc.mods.sodium.client.render.chunk.compile.executor.ChunkJobTyped.execute(ChunkJobTyped.java:47) [sodium-fabric-0.7.0-snapshot+mc1.21.8-build.707.jar:?]
	at knot/net.caffeinemc.mods.sodium.client.render.chunk.compile.executor.ChunkBuilder$WorkerRunnable.run(ChunkBuilder.java:193) [sodium-fabric-0.7.0-snapshot+mc1.21.8-build.707.jar:?]
	at java.base/java.lang.Thread.run(Thread.java:1447) [?:?]
[Render thread/ERROR]: Unreported exception thrown!
java.lang.RuntimeException: Exception thrown while executing job
	at knot/net.caffeinemc.mods.sodium.client.render.chunk.compile.executor.ChunkJobResult.unwrap(ChunkJobResult.java:34) ~[sodium-fabric-0.7.0-snapshot+mc1.21.8-build.707.jar:?]
	at knot/net.caffeinemc.mods.sodium.client.render.chunk.RenderSectionManager.collectChunkBuildResults(RenderSectionManager.java:471) ~[sodium-fabric-0.7.0-snapshot+mc1.21.8-build.707.jar:?]
	at knot/net.caffeinemc.mods.sodium.client.render.chunk.RenderSectionManager.uploadChunks(RenderSectionManager.java:355) ~[sodium-fabric-0.7.0-snapshot+mc1.21.8-build.707.jar:?]
	at knot/net.caffeinemc.mods.sodium.client.render.SodiumWorldRenderer.setupTerrain(SodiumWorldRenderer.java:243) ~[sodium-fabric-0.7.0-snapshot+mc1.21.8-build.707.jar:?]
	at knot//MC/net.minecraft.client.render.WorldRenderer.setupTerrain(WorldRenderer.java:2670) ~[client-intermediary.jar:?]
	at knot//MC/net.minecraft.client.render.WorldRenderer.render(WorldRenderer.java:470) ~[client-intermediary.jar:?]
	at knot//MC/net.minecraft.client.render.GameRenderer.renderWorld(GameRenderer.java:738) ~[client-intermediary.jar:?]
	at knot//MC/net.minecraft.client.render.GameRenderer.render(GameRenderer.java:506) ~[client-intermediary.jar:?]
	at knot//MC/net.minecraft.client.MinecraftClient.render(MinecraftClient.java:1361) ~[client-intermediary.jar:?]
	at knot//MC/net.minecraft.client.MinecraftClient.run(MinecraftClient.java:947) [client-intermediary.jar:?]
	at knot/net.minecraft.client.main.Main.main(Main.java:265) [client-intermediary.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:506) [fabric-loader-0.17.2.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:72) [fabric-loader-0.17.2.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) [fabric-loader-0.17.2.jar:?]
	at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:105) [NewLaunch.jar:?]
	at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129) [NewLaunch.jar:?]
	at org.prismlauncher.EntryPoint.main(EntryPoint.java:70) [NewLaunch.jar:?]
Caused by: java.lang.IllegalStateException: Sorter already used!
	at knot/net.caffeinemc.mods.sodium.client.render.chunk.translucent_sorting.data.StaticNormalRelativeData.getSorter(StaticNormalRelativeData.java:32) ~[sodium-fabric-0.7.0-snapshot+mc1.21.8-build.707.jar:?]
	at knot/net.caffeinemc.mods.sodium.client.render.chunk.compile.tasks.ChunkBuilderMeshingTask.execute(ChunkBuilderMeshingTask.java:219) ~[sodium-fabric-0.7.0-snapshot+mc1.21.8-build.707.jar:?]
	at knot/net.caffeinemc.mods.sodium.client.render.chunk.compile.tasks.ChunkBuilderMeshingTask.execute(ChunkBuilderMeshingTask.java:52) ~[sodium-fabric-0.7.0-snapshot+mc1.21.8-build.707.jar:?]
	at knot/net.caffeinemc.mods.sodium.client.render.chunk.compile.executor.ChunkJobTyped.execute(ChunkJobTyped.java:47) ~[sodium-fabric-0.7.0-snapshot+mc1.21.8-build.707.jar:?]
	at knot/net.caffeinemc.mods.sodium.client.render.chunk.compile.executor.ChunkBuilder$WorkerRunnable.run(ChunkBuilder.java:193) ~[sodium-fabric-0.7.0-snapshot+mc1.21.8-build.707.jar:?]
	at java.base/java.lang.Thread.run(Thread.java:1447) ~[?:?]
commented

You've provided us with none of the information we require to debug this issue. Please properly fill out the issue template.

commented

I've managed to squeeze the user for the required information on discord, but have no found a conclusive culprit. Bisection of the combination of mods that cause the rare issue is needed. I vaguely remember C2ME being correlated with this issue, but that was a long time ago and might be wrong.

latest.log

Image

Do not make issues like this. The issue template exists for a reason and it costs us a lot of time when you make it this hard for us.

commented

What do you mean no information? It explodes in vanilafix client, not my problem.

commented

@ebertin42 @DWaveletT @Helsium738 @Carter4242 Please test whether this build from the PR I just made fixes the issue. Thanks!

commented

crash-2025-10-02_01.53.32-client.txt

Alright, got a new crash without C2ME this time. Took longer than usual but I assume I was just lucky.

I just saw that my Nvidia driver is not updated to last version, I will try to update it. No idea if it will make any difference but let's try.

commented

Thanks! Does the crash also reproduce without all the other mods? At this point it's good to know that it isn't C2ME causing this, but we can't really know that no other mod is causing this since you have a lot of mods installed. I've only observed this crash with a very small group of users, and those users seem to have it happen semi-consistently.

commented

I can give it a try without anything else, I was not trying it since playing on this server without all my mods became kind of difficult. I'll comeback when I have more news.

I will try the new Driver first.

commented

crash-2025-10-02_01.05.58-client.txt

Hello,

The crash happens as well on my side. I provided you the full crash logs if it helps. It was not happening until very recently (but I haven't been playing in the last month so maybe more time).

I'm using a lot of mod, all listed in the crash-log, but I can give you a more detailed list if needed.

FYI, I'm playing on Hypixel Skyblock and it crash when I do a very specific action, breaking Ice, but it don't happen every single time. I can sometime spend 15-20 minutes before it crash. No idea if it happen because the server try to make me render something specific and not usually encountered ?

Also I do use "Concurrent Chunk Management Engine". I tried multiple versions of C2ME and it always crash. I will try to play without it completely and tell you if it changed anything.

Please tell me if I should instead open a new "proper" issue.

commented

Knowing whether this is correlated with C2ME would be very useful.

commented

It was not driver related. I will try without any other mods.

commented

Seems to work without issue if I disable every other mod. Do you have any other usual suspect in mind?

commented

I had a look at your mod list but I can't see anything particularly suspicious. That being said, I don't know what many of your mods are doing so I can't really reach a verdict. The most efficient way to find out is probably by recursively binary splitting the mods and narrowing down which set of mods causes the issue. My general suspicion would be anything that mixes into sodium, and anything related to chunk loading/processing or rendering. It's very useful to know that it's not C2ME but I also can't say if it's a bug in our code or a bug in another mod.

commented

Alright, I will try that. I've not been crashing in a while so I assume it was because specifically of the area I was in.

So it may be a Skyblock specific mod that is causing the issue, a lot of them play with rendering one way or another. Sad news: I will have to wait a few day, this area is not always available...

commented

crash-2025-10-02_16.56.05-client.txt

I just got one as well, if it keeps happening, I'll start removing stuff, but this was after a while of being online. Hopefully, this can help

commented

I guess now we just need to test the intersection of the mods you both have?

commented

Hi, I'm experiencing this issue too. And I seem to have found an easy way to reproduce it.

Here's my crash report:

latest.log

Video recording:

2025-10-03-17-41-38.mp4

Sodium configuration file:

sodium-options.json

To reproduce: In Minecraft 1.21.9, create a new world, find an End Portal, light up a Nether Portal near the portal, place some twitching pistons next to it (in this case, a sand duplicator), and then randomly move around. Within a few minutes, the game crashes. Destroying some blocks seems to increase the chance of crashing.

I've also encountered this issue in other situations. I occasionally experienced a crash while using a TNT bomber to clear the End (this happened while interacting with blocks, such as mining or clicking buttons).

It seems that frequently triggering pistons increases the likelihood of triggering the bug.

My installed mods include fabric-api-0.133.14+1.21.9, fabric-language-kotlin-1.13.6+kotlin.2.2.20, and sodium-fabric-0.7.0+mc1.21.9. I used the default settings for sodium, except that I set Perfect Translucency to OFF (which was the answer I received from ChatGPT when I encountered this issue before, but it didn't seem to help).

commented

very interesting! the thing with the pistons makes sense. I guess maybe it's just harder to reproduce in scenarios with only sodium? I'll try to reproduce it later.

commented

Btw, it only happen when my game was trying to display a lot of custom elements or particles and trying to mine something. I was also at my lowest on FPS side (From an usual 160+ FPS to approx 40FPS when the crash happen). A freeze was also happening like in the video but no idea if it was just the game processing the crash or if it's part of the crash reason.