Rendering chunks which contain invalid/corrupt biome data causes a crash
3SepeS3 opened this issue ยท 5 comments
Bug Description
Minecraft (1.20.1) crashes suddenly after a couple minutes. I removed all mods except sodium, lithium and fabric api from my mod folder (sodium-fabric-mc1.20.1-0.5.3, lithium-fabric-mc1.20.1-0.11.2, fabric-api-0.90.7+1.20.1). I tried setting the 'use_no_error_g_l_context' to false as it mentioned something about unexplained crashes but it didn't fix the issue.
sodium-options.json
Reproduction Steps
Not really any steps to follow apart from opening the game and flying around in spectator mode at max speed for a couple minutes.
Log File
Crash Report
Something appears to be corrupt in the world file, but I can't be sure. The biome data for a chunk contains null entries, which should not be legal (but could happen if third-party tools are used to modify the world, or if other corruption occurs.)
Can you please upload a copy of the world so that further examination can be done?
Furthermore, can you verify that this problem still happens without Lithium installed? It makes some changes around the storage of world data which could potentially cause this.
It still happens without lithium. It does indeed o
Sanctum (Java 1.20.1).zip
only happen when playing a specific world. It is a world download of a project by a builders team so world edit was probably used. I used NBT explorer to allow me to use cheats on the world. The zipped world file size was to big so I removed stats and advancements and I had to cut 2 region files but i'll upload those in another comment because I feel they could be important.
here are the other region files
other_region.zip
Looking at the world file you uploaded, it appears that the biome data for some chunks (such as chunk [-19, 4, 54]) is corrupted/mangled in such a way as to be unreadable by vanilla. Sodium crashes when it tries to render these chunks, because the game is put into an invalid state where some chunks don't have valid biome data.
This isn't something that makes sense to patch on our side. We could maybe have Sodium interpret broken biome data with some default value, but the reality is that vanilla also explodes on this data. Just loading this world into a vanilla client/server shows constant errors when attempting to access or save these chunks. Maybe this doesn't necessarily cause a crash to desktop, but the game is in a damaged state, and is not functioning correctly.
Sorry to say, but you will have to find a way to surgically modify the world and correct the broken biome data.