Incompatability (crash) with Mystcraft 1.12.2-0.13.7.02
ishani opened this issue ยท 8 comments
I've tracked a crash down to - as far as I can tell - an issue with Dynamic Trees when Mystcraft is warping the player to new dimensions.
Removing DT allows the warp to work. Otherwise, we have a crash where an array is accessed out-of-bounds (BiomeDataBase.java:31).
I would try and add the Mystcraft dimensions to the DT blacklist, but this doesn't seem to make any difference - or perhaps I'm adding the wrong IDs? Maybe can have a dimension whitelist instead - or some logging when checking against the blacklist, so I can trace to see what it's thinking...
net.minecraft.util.ReportedException: Exception ticking world
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:762) ~[MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668) ~[MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:185) ~[chd.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_51]
Caused by: java.lang.RuntimeException: Biome [biomesoplenty:dead_forest] threw an error while populating chunk.
at com.xcompwiz.mystcraft.world.ChunkProviderMyst.func_185931_b(ChunkProviderMyst.java:144) ~[ChunkProviderMyst.class:?]
at net.minecraft.world.chunk.Chunk.func_186034_a(Chunk.java:1019) ~[axw.class:?]
at net.minecraft.world.chunk.Chunk.func_186030_a(Chunk.java:990) ~[axw.class:?]
at net.minecraft.world.gen.ChunkProviderServer.func_186025_d(ChunkProviderServer.java:157) ~[on.class:?]
at com.xcompwiz.mystcraft.world.AgeController.expandChunkProfile(AgeController.java:348) ~[AgeController.class:?]
at com.xcompwiz.mystcraft.world.AgeController.updateProfiledInstability(AgeController.java:323) ~[AgeController.class:?]
at com.xcompwiz.mystcraft.world.AgeController.getInstabilityScore(AgeController.java:297) ~[AgeController.class:?]
at com.xcompwiz.mystcraft.instability.InstabilityController.validate(InstabilityController.java:84) ~[InstabilityController.class:?]
at com.xcompwiz.mystcraft.instability.InstabilityController.tick(InstabilityController.java:143) ~[InstabilityController.class:?]
at com.xcompwiz.mystcraft.world.AgeController.tickBlocksAndAmbiance(AgeController.java:599) ~[AgeController.class:?]
at com.xcompwiz.mystcraft.world.WorldProviderMyst.canDoLightning(WorldProviderMyst.java:322) ~[WorldProviderMyst.class:?]
at net.minecraft.world.WorldServer.func_147456_g(WorldServer.java:403) ~[oo.class:?]
at net.minecraft.world.WorldServer.func_72835_b(WorldServer.java:225) ~[oo.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:756) ~[MinecraftServer.class:?]
... 4 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at com.ferreusveritas.dynamictrees.worldgen.BiomeDataBase.getEntry(BiomeDataBase.java:31) ~[BiomeDataBase.class:?]
at com.ferreusveritas.dynamictrees.worldgen.TreeGenCancelEventHandler.onEvent(TreeGenCancelEventHandler.java:29) ~[TreeGenCancelEventHandler.class:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_502_TreeGenCancelEventHandler_onEvent_Decorate.invoke(.dynamic) ~[?:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?]
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) ~[EventBus.class:?]
at net.minecraftforge.event.terraingen.TerrainGen.decorate(TerrainGen.java:88) ~[TerrainGen.class:?]
at net.minecraft.world.biome.BiomeDecorator.func_150513_a(BiomeDecorator.java:130) ~[ank.class:?]
at net.minecraft.world.biome.BiomeDecorator.func_180292_a(BiomeDecorator.java:88) ~[ank.class:?]
at net.minecraft.world.biome.Biome.func_180624_a(Biome.java:225) ~[anh.class:?]
at com.xcompwiz.mystcraft.world.biome.BiomeWrapperMyst.func_180624_a(BiomeWrapperMyst.java:169) ~[BiomeWrapperMyst.class:?]
at com.xcompwiz.mystcraft.world.ChunkProviderMyst.func_185931_b(ChunkProviderMyst.java:142) ~[ChunkProviderMyst.class:?]
at net.minecraft.world.chunk.Chunk.func_186034_a(Chunk.java:1019) ~[axw.class:?]
at net.minecraft.world.chunk.Chunk.func_186030_a(Chunk.java:990) ~[axw.class:?]
at net.minecraft.world.gen.ChunkProviderServer.func_186025_d(ChunkProviderServer.java:157) ~[on.class:?]
at com.xcompwiz.mystcraft.world.AgeController.expandChunkProfile(AgeController.java:348) ~[AgeController.class:?]
at com.xcompwiz.mystcraft.world.AgeController.updateProfiledInstability(AgeController.java:323) ~[AgeController.class:?]
at com.xcompwiz.mystcraft.world.AgeController.getInstabilityScore(AgeController.java:297) ~[AgeController.class:?]
at com.xcompwiz.mystcraft.instability.InstabilityController.validate(InstabilityController.java:84) ~[InstabilityController.class:?]
at com.xcompwiz.mystcraft.instability.InstabilityController.tick(InstabilityController.java:143) ~[InstabilityController.class:?]
at com.xcompwiz.mystcraft.world.AgeController.tickBlocksAndAmbiance(AgeController.java:599) ~[AgeController.class:?]
at com.xcompwiz.mystcraft.world.WorldProviderMyst.canDoLightning(WorldProviderMyst.java:322) ~[WorldProviderMyst.class:?]
at net.minecraft.world.WorldServer.func_147456_g(WorldServer.java:403) ~[oo.class:?]
at net.minecraft.world.WorldServer.func_72835_b(WorldServer.java:225) ~[oo.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:756) ~[MinecraftServer.class:?]
... 4 more```
Yes. BiomeDataBase.java, line ~32. biomeId
comes in as -1 when MC dimensions are building, so that table[] access explodes.
I've never seen a Biome id of -1. Is that common practice? I can add the code to reinforce the check but it seems strange to ever be using -1.
No idea, I'm afraid - I'm not familiar with the MC code, I'm just poking at specific errors on my server :)
I would think a check on dodgy values is probably recommended though...
This server is using BOP, Twilight Forest and a handful of other mods, perhaps those also make a difference. Happy to provide the set and an example save if it would be useful.
Biome -1 issue with Mystcraft has gone back for years, usually associated on the dimension first being created if I recall. Sometimes it corrupted worlds, or crashed every time the player reconnected to a server or loaded the world. Was easy to delete the player.dat and continue on. I can't recall if it was ever fixed in 1.7.10 but there were a few workarounds out there.
FWIW if I simply enforce the 0..255 assumption in that code with
if (biomeId < 0 || biomeId > 255 )
return BADENTRY;
.. things are back to working. Although I'm not clear on what knock-ons that might have.
Is this a fix we can implement in config, or do I need to wait for the next release to test it?