AlexDGr8r / MeteorsMod

Falling Meteors Mod for Minecraft
http://www.minecraftforum.net/topic/989113-147sspsmpfalling-meteors-modv292/
Other
8 stars 20 forks source link

NullPointer Exception net.meteor.common.entity.EntityMeteor.func_70071_h_(EntityMeteor.java:82) rendering World unplayable #1

Closed BonsaiDen closed 11 years ago

BonsaiDen commented 11 years ago

Hey there,

thought I rather open the issue here than post something on the Forums :)

Just had a meteor coming down, a few seconds later the game froze and crashed. Now, trying to load the world also results in a freeze followed by a crash.

Unfortunately I don't have any knowledge on how to compile the mod thing so I won't be able to have a deeper look into it.

Still awesome mod, thanks for the hard work!

Crash log below:

      Minecraft has crashed!      
      ----------------------      

Minecraft has stopped running because it encountered a problem; Ticking entity

A full error report has been saved to /home/ivo/.minecraft/crash-reports/crash-2013-04-23_22.13.06-server.txt - Please include a copy of that file (Not this screen!) if you report this crash to anyone; without it, they will not be able to help fix the crash :(

--- BEGIN ERROR REPORT 9ff90c5e --------
Full report at:
/home/ivo/.minecraft/crash-reports/crash-2013-04-23_22.13.06-server.txt
Please show that file to Mojang, NOT just this screen!

Generated 4/23/13 10:13 PM

-- Head --
Stacktrace:
    at net.meteor.common.entity.EntityMeteor.func_70071_h_(EntityMeteor.java:82)
    at net.minecraft.world.World.func_72866_a(World.java:2336)
    at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:717)
    at net.minecraft.world.World.func_72870_g(World.java:2298)

-- Entity being ticked --
Details:
    Entity Type: Meteor (net.meteor.common.entity.EntityMeteor)
    Entity ID: 19
    Entity Name: entity.Meteor.name
    Entity's Exact location: 169.00, 138.47, -6.00
    Entity's Block location: World: (169,138,-6), Chunk: (at 9,8,10 in 10,-1; contains blocks 160,0,-16 to 175,255,-1), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
    Entity's Momentum: 0.00, -1.69, 0.00
Stacktrace:
    at net.minecraft.world.World.func_72939_s(World.java:2144)
    at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:546)

-- Affected level --
Details:
    Level name: Autumn
    All players: 1 total; [EntityPlayerMP['BonsaiDen'/93, l='Autumn', x=224.39, y=63.75, z=135.30]]
    Chunk stats: ServerChunkCache: 733 Drop: 0
    Level seed: 7511648511087007575
    Level generator: ID 00 - default, ver 1. Features enabled: true
    Level generator options: 
    Level spawn location: World: (193,64,27), Chunk: (at 1,4,11 in 12,1; contains blocks 192,0,16 to 207,255,31), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
    Level time: 318842 game time, 430689 day time
    Level dimension: 0
    Level storage version: 0x04ABD - Anvil
    Level weather: Rain time: 126415 (now: false), thunder time: 88999 (now: false)
    Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
Stacktrace:
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:651)
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:570)
    at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:171)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:468)
    at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:573)

-- System Details --
Details:
    Minecraft Version: 1.5.1
    Operating System: Linux (i386) version 2.6.32-33-generic-pae
    Java Version: 1.6.0_24, Sun Microsystems Inc.
    Java VM Version: OpenJDK Server VM (mixed mode), Sun Microsystems Inc.
    Memory: 805245176 bytes (767 MB) / 994770944 bytes (948 MB) up to 994770944 bytes (948 MB)
    JVM Flags: 2 total; -Xmx1024M -Xms1024M
    AABB Pool Size: 1138 (63728 bytes; 0 MB) allocated, 170 (9520 bytes; 0 MB) used
    Suspicious classes: FML and Forge are installed
    IntCache: cache: 0, tcache: 0, allocated: 1, tallocated: 63
    FML: MCP v7.44 FML v5.1.21.652 Minecraft Forge 7.7.1.652 Optifine OptiFine_1.5.1_HD_U_B3 24 mods loaded, 24 mods active
    mcp [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    FML [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    Forge [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    mod_GuiApiBasicExample [mod_GuiApiBasicExample] (GuiAPI-0.15.5-1.5.1.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    mod_GuiApiIngameMessageExample [mod_GuiApiIngameMessageExample] (GuiAPI-0.15.5-1.5.1.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    mod_GuiApiIntermediateExample [mod_GuiApiIntermediateExample] (GuiAPI-0.15.5-1.5.1.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    mod_GuiApiItemTickExample [mod_GuiApiItemTickExample] (GuiAPI-0.15.5-1.5.1.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    mod_GuiApiTWLExamples [mod_GuiApiTWLExamples] (GuiAPI-0.15.5-1.5.1.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    GuiAPI [GuiAPI] (GuiAPI-0.15.5-1.5.1.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    CustomSpawner [DrZhark's CustomSpawner] (CustomMobSpawner 1.12.2.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    MoCreatures [DrZhark's Mo'Creatures Mod] (DrZharks MoCreatures Mod v5.0.8.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    ExtrabiomesXL [ExtrabiomesXL] (ExtrabiomesXL-universal-1.5.1-3.12.2.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    Meteors [Falling Meteors] (Meteors Mod V2.10.1.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    AIBlock [AIBlock] (Weather v1.41 Mod for MC v1.5.1.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    ExtendedRenderer [Extended Renderer] (Weather v1.41 Mod for MC v1.5.1.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    WeatherMod [Weather and Tornadoes] (Weather v1.41 Mod for MC v1.5.1.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    BuildCraft|Core [BuildCraft] (buildcraft-A-3.5.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    BuildCraft|Builders [BC Builders] (buildcraft-A-3.5.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    BuildCraft|Energy [BC Energy] (buildcraft-A-3.5.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    BuildCraft|Factory [BC Factory] (buildcraft-A-3.5.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    BuildCraft|Transport [BC Transport] (buildcraft-A-3.5.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    BuildCraft|Silicon [BC Silicon] (buildcraft-A-3.5.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    mod_MAtmos [mod_MAtmos] (matmos_packaged.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    Mystcraft [Mystcraft] (mystcraft-uni-1.5.1-0.10.2.00.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    Profiler Position: N/A (disabled)
    Vec3 Pool Size: 901 (50456 bytes; 0 MB) allocated, 190 (10640 bytes; 0 MB) used
    Player Count: 1 / 8; [EntityPlayerMP['BonsaiDen'/93, l='Autumn', x=224.39, y=63.75, z=135.30]]
    Type: Integrated Server (map_client.txt)
    Is Modded: Definitely; Client brand changed to 'fml,forge'

Java.lang.NullPointerException
    at net.meteor.common.entity.EntityMeteor.func_70071_h_(EntityMeteor.java:82)
    at net.minecraft.world.World.func_72866_a(World.java:2336)
    at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:717)
    at net.minecraft.world.World.func_72870_g(World.java:2298)
    at net.minecraft.world.World.func_72939_s(World.java:2144)
    at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:546)
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:651)
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:570)
    at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:171)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:468)
    at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:573)
--- END ERROR REPORT 94656a0b ----------
AlexDGr8r commented 11 years ago

Ok thanks for letting me know. I was getting worried that there were no bug reports coming in. I didn't think this update was going to be THAT perfect. lol I'll take a look at it back when I'm home.

BonsaiDen commented 11 years ago

I was able to set up the MCP dev enviroment and debug the issue myself, seems to be a race condition of sorts.

MeteorInProtectedZone returns true in the onUpdate() method but for some reason it returns false inside of getSafeChunkCoords() so the list returned is null. Resulting in the exception at hand.

I guess one just do:

        List safeCoords = MeteorsMod.proxy.meteorHandler.getSafeChunkCoords((int)this.posX, (int)this.posZ);

        // Race conidition "fix"
        if (safeCoords == null) {
            return;
        }

Or always return a (empty) list from getSafeChunkCoords

AlexDGr8r commented 11 years ago

I just made getSafeChunkCoords return an empty list. That will still keep the for loop running the way it should and should be no conflicts. Will include in the bugfix update this weekend. Thanks for letting me know about this.