Glitchfiend / TerraBlender

TerraBlender is a library mod for adding biomes in a simple and compatible manner with Minecraft's new biome/terrain system.
https://www.curseforge.com/minecraft/mc-mods/terrablender
GNU Lesser General Public License v3.0
85 stars 28 forks source link

error reading nexted level.dat #107

Closed MuteTiefling closed 1 year ago

MuteTiefling commented 1 year ago

What's the issue you encountered?

Error: Exception reading C:\Users\nicho\curseforge\minecraft\Instances\e9-pr\saves\Creative Test\level.dat java.lang.RuntimeException: Tried to read NBT tag with too high complexity, depth > 512

This started happening recently after restarting my dev instance.

How can the issue be reproduced?

Uncertain. I /reload frequently in this world, but it could be anything as far as I know.

Logs

https://gist.github.com/MuteTiefling/9b3603d0b0bf98abbd7a1013f20594d4

Mod Version

TerraBlender-forge-1.19.2-2.0.1.136

Additional information

I've included my level.dat from this world. It's just renamed to level.dat.txt to get it attached. Browse to Data > WorldGen Settings > dimensions > minecraft:overworld > generator > settings > surface_rule > base to begin seeing the issue.

The base tag itself is nested repeatedly under itself which appears to be the cause of the error:

image

I tried manually expanding this to see how far it goes, but it's very deep and I gave up. Then I used the Expand Tree option and waited a solid 45 minutes for it to finish... it did not finish expanding.

level.dat.txt

MuteTiefling commented 1 year ago

So after digging a little more, I was able to re-open the world by deleting the surface rules out of the overworld and nether. This changed the type from terrablender:merged to the basic minecraft one, so I figured the issue would probably never come back up.

So I've made a fresh world and copied over the nether/overworld nodes from it to my test world. This had the expected knockon effect of resetting the seed, but I also noticed worldgen rates had drastically improved. Previously generating new chunks was horrendously slow. Now it's back to the way I remember it when this world was new.

MuteTiefling commented 1 year ago

Looks like all you need to reproduce this is to open and close the world repeatedly. Below are the level.dat file sizes after loading a world and then saving/closing it. Each load/save cycle is increasing the file size

Below, on the left is after a few saves, on the right is how it started

image

MuteTiefling commented 1 year ago

Hrm... just created another small test instance with only JEI, BYG, and TerraBlender and it does not appear to be doing the same thing. Will keep testing and let you know, but if you have any ideas that might help explain this, they would be appreciated.

MuteTiefling commented 1 year ago

Alright, I haven't narrowed down exactly what mod does it... but I can say this for a certainty right now:

Once the responsible mod is removed, any world that already exhibits this behavior will continue to do so.

So, while Terrablender is not directly responsible, it does perpetuate the issue afterwards.

I know this because at some point while yeeting mods from my test instance, I decided to make a fresh world for testing, rather than re-opening one of the previous test worlds having the issue. The brand new test world no longer had the issue, so at some point, I had already removed the responsible mod but hadn't noticed because a fresh world is required to see if the cause is gone.

MuteTiefling commented 1 year ago

Alright, we've narrowed it down to Citadel citadel-2.1.1-1.19.jar

I've added that to my mini test instance with just terrablender and byg and can reproduce the issue

aAndrew3030 commented 1 year ago

With each new save, the loading of new chunks gets slower and slower until new chunks stop loading or the world becomes corrupt. Every few saves, I need to manually fix this in the world to keep keep new chunks loading smoothly. I guess a temp fix would be to pre-gen chunks, set a world boarder, and manually fix when the world gets to the 512 limit

Adubbz commented 1 year ago

This looks to have been resolved on Citadel’s side.