Some kind of chunk error?!

Discussion in 'Bukkit Help' started by XeonProductions, Feb 27, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    XeonProductions

    I'm not sure what this means but the server logs keep getting HUGE (6 GB in 2 days) with these types of errors. It looks like a vanillacraft problem judging by the trace, currently using CB 445.

    Code:
    22:06:43 [INFO] Chunk (-10, -97) stored at  (-11, -98)
    
    22:06:43 [SEVERE] java.lang.Throwable
    
    22:06:43 [SEVERE]       at net.minecraft.server.LongHashtable.get(LongHashtable.java:31)
    
    22:06:43 [SEVERE]       at net.minecraft.server.ChunkProviderServer.b(ChunkProviderServer.java:107)
    
    22:06:43 [SEVERE]       at net.minecraft.server.World.c(World.java:202)
    
    22:06:43 [SEVERE]       at net.minecraft.server.World.getTypeId(World.java:145)
    
    22:06:43 [SEVERE]       at net.minecraft.server.World.a(World.java:1154)
    
    22:06:43 [SEVERE]       at net.minecraft.server.Entity.g_(Entity.java:619)
    
    22:06:43 [SEVERE]       at net.minecraft.server.EntityLiving.b(EntityLiving.java:507)
    
    22:06:43 [SEVERE]       at net.minecraft.server.EntityLiving.q(EntityLiving.java:667)
    
    22:06:43 [SEVERE]       at net.minecraft.server.EntityMonster.q(EntityMonster.java:30)
    
    22:06:43 [SEVERE]       at net.minecraft.server.EntityLiving.f_(EntityLiving.java:230)
    
    22:06:43 [SEVERE]       at net.minecraft.server.EntityMonster.f_(EntityMonster.java:34)
    
    22:06:43 [SEVERE]       at net.minecraft.server.World.a(World.java:1011)
    
    22:06:43 [SEVERE]       at net.minecraft.server.WorldServer.a(WorldServer.java:53)
    
    22:06:43 [SEVERE]       at net.minecraft.server.World.f(World.java:993)
    
    22:06:43 [SEVERE]       at net.minecraft.server.World.d(World.java:970)
    
    22:06:43 [SEVERE]       at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:346)
    
    22:06:43 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:264)
    
    22:06:43 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    --- merged: Feb 28, 2011 3:30 AM ---
    Yeah, upon further investigation it appears that CraftBukkits enhanced Longhashtable is having some serious problems with 1.2 converted maps.
     
  2. Offline

    Tame

  3. Offline

    Kane

    @Grum I'm going keep doing alerts on you when I see threads like this.

    For the rest of you I was able to do this without converting. Nasty bug!
     
  4. Offline

    XeonProductions

    I think I know what is causing this bug, it has to do with chunks that have incorrect X/Y values inside the NBT header, and those values not matching up with where the files are in regards to the new McRegion format.

    To compound the problem, and to explain why the error seems to keep happening over and over again is because the code in vanillacraft is bugged. The server attempts to correct the values in the header, but doesn't properly get the "Level" compound tag. This is all my theory, I could be wrong though because i'm a little sleep deprived.

    Original Code (net/minecraft/server/ChunkRegionLoader.java):
    Code:
    if (!chunk.a(i, j)) {
        System.out.println("Chunk file at " + i + "," + j + " is in the wrong location; relocating. (Expected " + i + ", " + j + ", got " + chunk.j + ", " + chunk.k + ")");
        nbttagcompound.a("xPos", i);
        nbttagcompound.a("zPos", j);
        chunk = ChunkLoader.a(world, nbttagcompound.k("Level"));
    }
    Possible Fix (untested):
    Code:
    if (!chunk.a(i, j)) {
        System.out.println("Chunk file at " + i + "," + j  + " is in the wrong location; relocating. (Expected " + i + ", " + j +  ", got " + chunk.j + ", " + chunk.k + ")");
        NBTTagCompound nbttagcompound1 = nbttagcompound.k("Level");
        nbttagcompound1.a("xPos", i);
        nbttagcompound1.a("zPos", j);
        chunk = ChunkLoader.a(world, nbttagcompound.k("Level"));
    }

    Also as i'm looking over the code, this bug might have been causing other chunks to get overwritten with these chunks that have bad location coordinates in the NBT header. Clearly the code involved in converting the old maps is bugged, or the original maps commonly had bad location coordinates in the headers.

    Either way, the bug fix i've provided should stop this from happening and repair the bad headers.
     
  5. Offline

    inviktus

    Does anyone know if there is a solution that does not involve editing code, to solve this problem?
    I get these errors any time anyone enters those chunks, and it causes a bit of lag.
    Not to mention not being able to read the console due to hundreds of errors spewing from it.
    Hope this gets looked at soon. :\
     
  6. Offline

    Scyfi

    I had this issue myself, it's a bad chunk. How I solved it was by using Worldedit command /chunkinfo to find the bad chunk(in this case it's -11, -89). Then use MCEdit to go in and export the chunk as a schematic, then delete the chunk and then import from the previous schematic. Now in some cases the chunk was all messed up and looked nothing like it was supposed to so I had to copy the chunk from a backup file. Hope that helps.
     
Thread Status:
Not open for further replies.

Share This Page