1.6 NPE on first load of old world
Flow86 opened this issue ยท 3 comments
Hi, I get this exception on "converting" an old 1.5.2 map:
NFO] [STDERR] java.lang.NullPointerException
2013-09-17 09:13:51 [INFO] [STDERR] at logisticspipes.pipes.basic.CoreRoutedPipe.getX(CoreRoutedPipe.java:1251)
2013-09-17 09:13:51 [INFO] [STDERR] at logisticspipes.modules.ModuleAdvancedExtractor.getX(ModuleAdvancedExtractor.java:264)
2013-09-17 09:13:51 [INFO] [STDERR] at logisticspipes.modules.ModuleAdvancedExtractor.setItemsIncluded(ModuleAdvancedExtractor.java:242)
2013-09-17 09:13:51 [INFO] [STDERR] at logisticspipes.modules.ModuleAdvancedExtractor.readFromNBT(ModuleAdvancedExtractor.java:99)
2013-09-17 09:13:51 [INFO] [STDERR] at logisticspipes.logisticspipes.ChassiModule.readFromNBT(ChassiModule.java:94)
2013-09-17 09:13:51 [INFO] [STDERR] at logisticspipes.pipes.PipeLogisticsChassi.readFromNBT(PipeLogisticsChassi.java:324)
2013-09-17 09:13:51 [INFO] [STDERR] at buildcraft.transport.TileGenericPipe.func_70307_a(TileGenericPipe.java:118)
2013-09-17 09:13:51 [INFO] [STDERR] at logisticspipes.pipes.basic.LogisticsTileGenericPipe.func_70307_a(LogisticsTileGenericPipe.java:456)
2013-09-17 09:13:51 [INFO] [STDERR] at net.minecraft.tileentity.TileEntity.func_70317_c(TileEntity.java:152)
2013-09-17 09:13:51 [INFO] [STDERR] at net.minecraft.world.chunk.storage.AnvilChunkLoader.func_75823_a(AnvilChunkLoader.java:440)
2013-09-17 09:13:51 [INFO] [STDERR] at net.minecraft.world.chunk.storage.AnvilChunkLoader.func_75822_a(AnvilChunkLoader.java:103)
2013-09-17 09:13:51 [INFO] [STDERR] at net.minecraft.world.chunk.storage.AnvilChunkLoader.func_75815_a(AnvilChunkLoader.java:83)
2013-09-17 09:13:51 [INFO] [STDERR] at net.minecraft.world.gen.ChunkProviderServer.func_73239_e(ChunkProviderServer.java:182)
2013-09-17 09:13:51 [INFO] [STDERR] at net.minecraft.world.gen.ChunkProviderServer.func_73158_c(ChunkProviderServer.java:118)
2013-09-17 09:13:51 [INFO] [STDERR] at net.minecraft.server.MinecraftServer.func_71222_d(MinecraftServer.java:292)
2013-09-17 09:13:51 [INFO] [STDERR] at net.minecraft.server.MinecraftServer.func_71247_a(MinecraftServer.java:262)
2013-09-17 09:13:51 [INFO] [STDERR] at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:186)
2013-09-17 09:13:51 [INFO] [STDERR] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:443)
2013-09-17 09:13:51 [INFO] [STDERR] at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:582)
perhaps thats some corrupted nbt or something, but I think perhaps that could be fixed
hmm but no one's looking at the pipe (since I'm the only player and hadnt hud-glasses on)
That's the missing check. The change packet is generated and then the server send it to an empty list of players. But to generate the packet it trys to get the coordinates and they doesn't exist at that point of loading. In fact at that point of loading the player list is always empty. So that check needs to be added. There are probably some more positions where this check is missing.
From what i can tell while looking at the stack trace it looks like we try to access the modules coordinates while we havn't initialised those. Probably for sending chanes to all players that are looking at the pipe for the hud. That line would then be missing an isempty check for the player list. Probably not a converting bug. Havn't looked at the code through.