Server crash
Corsicaman opened this issue ยท 15 comments
I get this error a few seconds after I start my server, each time I start it:
2013-05-03 22:43:20 [SEVERE] java.lang.NullPointerException
2013-05-03 22:43:20 [SEVERE] at com.khorn.terraincontrol.generator.ObjectSpawner.placeSnowAndIce(ObjectSpawner.java:87)
2013-05-03 22:43:20 [SEVERE] at com.khorn.terraincontrol.generator.ObjectSpawner.populate(ObjectSpawner.java:60)
2013-05-03 22:43:20 [SEVERE] at com.khorn.terraincontrol.bukkit.TCBlockPopulator.populate(TCBlockPopulator.java:27)
2013-05-03 22:43:20 [SEVERE] at net.minecraft.server.v1_5_R2.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:238)
2013-05-03 22:43:20 [SEVERE] at net.minecraft.server.v1_5_R2.Chunk.a(Chunk.java:788)
2013-05-03 22:43:20 [SEVERE] at org.bukkit.craftbukkit.v1_5_R2.chunkio.ChunkIOProvider.callStage2(ChunkIOProvider.java:61)
2013-05-03 22:43:20 [SEVERE] at org.bukkit.craftbukkit.v1_5_R2.chunkio.ChunkIOProvider.callStage2(ChunkIOProvider.java:13)
2013-05-03 22:43:20 [SEVERE] at org.bukkit.craftbukkit.v1_5_R2.util.AsynchronousExecutor$Task.finish(AsynchronousExecutor.java:179)
2013-05-03 22:43:20 [SEVERE] at org.bukkit.craftbukkit.v1_5_R2.util.AsynchronousExecutor.finishActive(AsynchronousExecutor.java:287)
2013-05-03 22:43:20 [SEVERE] at org.bukkit.craftbukkit.v1_5_R2.chunkio.ChunkIOExecutor.tick(ChunkIOExecutor.java:30)
2013-05-03 22:43:20 [SEVERE] at net.minecraft.server.v1_5_R2.MinecraftServer.r(MinecraftServer.java:519)
2013-05-03 22:43:20 [SEVERE] at net.minecraft.server.v1_5_R2.DedicatedServer.r(DedicatedServer.java:225)
2013-05-03 22:43:20 [SEVERE] at net.minecraft.server.v1_5_R2.MinecraftServer.q(MinecraftServer.java:476)
2013-05-03 22:43:20 [SEVERE] at net.minecraft.server.v1_5_R2.MinecraftServer.run(MinecraftServer.java:409)
2013-05-03 22:43:20 [SEVERE] at net.minecraft.server.v1_5_R2.ThreadServerApplication.run(SourceFile:573)
2013-05-03 22:43:20 [SEVERE] Encountered an unexpected exception NullPointerException
java.lang.NullPointerException
at com.khorn.terraincontrol.generator.ObjectSpawner.placeSnowAndIce(ObjectSpawner.java:87)
at com.khorn.terraincontrol.generator.ObjectSpawner.populate(ObjectSpawner.java:60)
at com.khorn.terraincontrol.bukkit.TCBlockPopulator.populate(TCBlockPopulator.java:27)
at net.minecraft.server.v1_5_R2.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:238)
at net.minecraft.server.v1_5_R2.Chunk.a(Chunk.java:788)
at org.bukkit.craftbukkit.v1_5_R2.chunkio.ChunkIOProvider.callStage2(ChunkIOProvider.java:61)
at org.bukkit.craftbukkit.v1_5_R2.chunkio.ChunkIOProvider.callStage2(ChunkIOProvider.java:13)
at org.bukkit.craftbukkit.v1_5_R2.util.AsynchronousExecutor$Task.finish(AsynchronousExecutor.java:179)
at org.bukkit.craftbukkit.v1_5_R2.util.AsynchronousExecutor.finishActive(AsynchronousExecutor.java:287)
at org.bukkit.craftbukkit.v1_5_R2.chunkio.ChunkIOExecutor.tick(ChunkIOExecutor.java:30)
at net.minecraft.server.v1_5_R2.MinecraftServer.r(MinecraftServer.java:519)
at net.minecraft.server.v1_5_R2.DedicatedServer.r(DedicatedServer.java:225)
at net.minecraft.server.v1_5_R2.MinecraftServer.q(MinecraftServer.java:476)
at net.minecraft.server.v1_5_R2.MinecraftServer.run(MinecraftServer.java:409)
at net.minecraft.server.v1_5_R2.ThreadServerApplication.run(SourceFile:573)
2013-05-03 22:43:20 [SEVERE] This crash report has been saved
It is apparently caused by the generation of a custom biome I just made. I switch the generator from TerrainControl to "Null" and the server stopped crashing. Could you check the file and tell me if there is a problem?
https://mega.co.nz/#!8Zg0zajK!A7BuzwdzR-1EalmiDtHEoR2PLqoYLnORFR_ZomXs4ag
No errors found yet. Could it be because of one of your BO2s/BO3s?
I made a test build, which should hopefully show what causes this error.
https://dl.dropboxusercontent.com/u/23288978/terraincontrol/TerrainControl.jar
I want to release 2.4.12 soon to fix some block place errors. I also want to have this bug fixed. I cannot reproduce this myself, so I really need the test results to fix this. It's no problem if you don't have time, then this issue will be postponed to 2.4.13.
Ok I wanted to prepare all my biomes and see if it fixes it first, but if you need them fast I'll do it today. What am I supposed to do with this build? How will it "show the error"?
I didn't do anything other than adding some better crash reporting. You're just lucky, the error will pop up again sooner or later (unless it was caused by a now fixed CraftBukkit bug). I'll include the debug code in 2.4.12, so that, when the error comes back for someone, I'll be able to fix it.
I don't need it fast. It's just that I want to release 2.4.12 soon. If you post the result in two months, it will be fixed in two months and a few days, and included in the first release after that. ๐
Just run the build, it should show a more descriptive - at least to me - error. Just the error message will change, that's all. (I added some additional null checks, so I can see what is causing the error.)
So I just installed it, and the server doesn't crash anymore! I deleted the old "region" folder of that world to regenerate the world, that's all I did. I'll let that build installed in case it restarts to happen. Good news for you I guess. ;)
Yep, it happened again! Here is the crash report. https://mega.co.nz/#!VdhliZBA!Ub8XrWLDF-6OHfoj-AEagyrLZrAc5OLa1WOsnJReNJs
Thanks. Somehow, the saved biome id in a chunk that still needs to be populated was invalid (removed custom biome?). It should now be fixed; it won't crash anymore, instead it will show:
Unknown biome id ID at x,z (chunk chunkX,chunkZ). Population failed.
Ok but what is "population"? And will you upload this version on the official page soon?
Terrain generation is split into two steps. First the base terrain gets generated (just the shape of the terrain). After the chunks around a chunk have generated their base terrain, it populates the terrain: it adds all trees, ores, flowers, tall grass and snow to the terrain.
If the file works for you, I'll upload it.
As you know, for TC 2.4.12 I added a few null checks to the code which should have fixed this. If you're still getting this error, please leave a message here.