OpenBlocks

OpenBlocks

56M Downloads

Elevator Block - NPE on Jump

Iomega0318 opened this issue · 15 comments

commented

I can use shift to go down an elevator but getting this using the latest MCPC+ for 1.6.4 when I try to jump up, no crash just an NPE. Also a note on this, I have one set up within about 10 blocks of each other that work fine, the set up causing the NPE is 19 blocks away from each other which is within the 20 block default.

2:25:44 AM java.lang.NullPointerException
2:25:45 AM at openblocks.common.tileentity.TileEntityElevator.isPassable(TileEntityElevator.java:21)
2:25:45 AM at openblocks.common.tileentity.TileEntityElevator.findLevel(TileEntityElevator.java:45)
2:25:45 AM at openblocks.common.tileentity.TileEntityElevator.onJump(TileEntityElevator.java:81)
2:25:45 AM at openblocks.common.tileentity.TileEntityElevator.onEvent(TileEntityElevator.java:101)
2:25:45 AM at openblocks.common.TileEntityEventHandler.onTileEntityEvent(TileEntityEventHandler.java:14)
2:25:45 AM at net.minecraftforge.event.ASMEventHandler_161_TileEntityEventHandler_onTileEntityEvent_TileEntityMessageEventPacket.invoke(.dynamic)
2:25:45 AM at net.minecraftforge.event.ASMEventHandler.invoke(ASMEventHandler.java:39)
2:25:45 AM at net.minecraftforge.event.EventBus.post(EventBus.java:108)
2:25:45 AM at openblocks.network.PacketHandler.onPacketData(PacketHandler.java:42)
2:25:46 AM at cpw.mods.fml.common.network.NetworkRegistry.handlePacket(NetworkRegistry.java:270)
2:25:46 AM at cpw.mods.fml.common.network.NetworkRegistry.handleCustomPacket(NetworkRegistry.java:259)
2:25:46 AM at cpw.mods.fml.common.network.FMLNetworkHandler.handlePacket250Packet(FMLNetworkHandler.java:85)
2:25:46 AM at net.minecraft.network.NetServerHandler.func_72501_a(NetServerHandler.java:2447)
2:25:46 AM at net.minecraft.network.packet.Packet250CustomPayload.func_73279_a(Packet250CustomPayload.java:70)
2:25:46 AM at net.minecraft.network.TcpConnection.func_74428_b(TcpConnection.java:470)
2:25:46 AM at net.minecraft.network.NetServerHandler.func_72570_d(NetServerHandler.java:233)
2:25:46 AM at net.minecraft.network.NetworkListenThread.func_71747_b(NetworkListenThread.java:54)
2:25:46 AM at net.minecraft.server.dedicated.DedicatedServerListenThread.func_71747_b(DedicatedServerListenThread.java:34)
2:25:46 AM at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:926)
2:25:46 AM at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:330)
2:25:47 AM at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:793)
2:25:47 AM at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:675)
2:25:47 AM at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)

commented

We don't support MCPC+ because it changes so much code that it makes it almost impossible to debug.
Are you able to copy your world temporarily over to a non-MCPC+ server and see if the bug is still there? If it is, we'll look at it right away.

If you can provide any information about this, such as the blocks that exist between the two elevators, that would be great. But as this is likely to be something caused by MCPC+, I cannot ensure that we can fix it.

commented

Copied my world over to my Laptop and ran the same scenario, used the same mods minus Bukkit and Plugins, got the same NPE:

2013-12-15 18:39:16 [WARNING] [OpenBlocks] Error while handling data on channel OpenBlocks|E from player 'EntityPlayerMP['Iomega0318'/20380, l='Home', x=143.52, y=47.42, z=346.72]'
java.lang.NullPointerException
at openblocks.common.tileentity.TileEntityElevator.isPassable(TileEntityElevator.java:21)
at openblocks.common.tileentity.TileEntityElevator.findLevel(TileEntityElevator.java:45)
at openblocks.common.tileentity.TileEntityElevator.onJump(TileEntityElevator.java:81)
at openblocks.common.tileentity.TileEntityElevator.onEvent(TileEntityElevator.java:101)
at openblocks.common.TileEntityEventHandler.onTileEntityEvent(TileEntityEventHandler.java:14)
at net.minecraftforge.event.ASMEventHandler_210_TileEntityEventHandler_onTileEntityEvent_TileEntityMessageEventPacket.invoke(.dynamic)
at net.minecraftforge.event.ASMEventHandler.invoke(ASMEventHandler.java:39)
at net.minecraftforge.event.EventBus.post(EventBus.java:108)
at openblocks.network.PacketHandler.onPacketData(PacketHandler.java:42)
at cpw.mods.fml.common.network.NetworkRegistry.handlePacket(NetworkRegistry.java:255)
at cpw.mods.fml.common.network.NetworkRegistry.handleCustomPacket(NetworkRegistry.java:245)
at cpw.mods.fml.common.network.FMLNetworkHandler.handlePacket250Packet(FMLNetworkHandler.java:85)
at net.minecraft.network.NetServerHandler.func_72501_a(NetServerHandler.java:1130)
at net.minecraft.network.packet.Packet250CustomPayload.func_73279_a(SourceFile:61)
at net.minecraft.network.MemoryConnection.func_74428_b(MemoryConnection.java:89)
at net.minecraft.network.NetServerHandler.func_72570_d(NetServerHandler.java:141)
at net.minecraft.network.NetworkListenThread.func_71747_b(NetworkListenThread.java:54)
at net.minecraft.server.integrated.IntegratedServerListenThread.func_71747_b(IntegratedServerListenThread.java:109)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:691)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:587)
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:175)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:484)
at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:583)

As for the conditions, I hollowed out a shaft 19 blocks deep and have two elevator blocks.. other than that there is nothing special or unique about my set up.. Let me know if I can provide any other information.

commented

Thanks for your response, any luck on what you thought might be breaking?

On Mon, Dec 16, 2013 at 2:19 PM, Iomega0318 [email protected]:

Testing a theory real quick, I think I might know why it is breaking.


Reply to this email directly or view it on GitHubhttps://github.com//issues/227#issuecomment-30627216
.

commented

Nope, there was something with BoP that I thought might be causing it so I removed it and it still wouldn't work. It is weird though that an elevator from 9 blocks will let me jump up but not 19, I even increased the distance to 32 instead of 20 to see if that would work and nothing.

commented

Ok, I can't reproduce it in any way. Can you post exact information about mod version and minecraft instalation?

commented

OMG... I think I figured it out and I feel extremely stupid now LOL.. I had a torch one block above the elevator on top which threw the error when I tried to jump.. I removed the torch in my world and it worked perfectly.. going to try it on the server now.

EDIT
And indeed that was my problem, NOTE to self don't place torches above elevator blocks

Well I fixed my own error lol, perhaps when it does check instead of spitting out an error it can say that something is blocking the location?

commented

Minecraft 1.6.4 with forge 9.11.1.953, liteloader 1.6.4-01 and OpenBlocks 1.2.2, other than the other 150+ mods I have installed that's pretty much it. The mods I currently have is an exact copy of everything I used in 1.6.2 only upgraded to 1.6.4, other than adding in Thermal Expansion which was the only reason I have upgraded I haven't changed anything. Is there any way to get a more detailed crash report?

commented

From what I imagine, The torch block returns null for collision, as torches can be walked through.
I would have thought someone had already added a null check to this. It would seem not.

commented

@boq I noticed that, I will compile it and let you know how jumping into a torch goes ;-)

commented

It's already compiled by Jenkins
http://openmods.info:8080/

On Wed, Dec 18, 2013 at 10:46 AM, Iomega0318 [email protected]:

@boq https://github.com/boq I noticed that, I will compile it and let
you know how jumping into a torch goes ;-)


Reply to this email directly or view it on GitHubhttps://github.com//issues/227#issuecomment-30794473
.

commented

@nevercast For some reason I can't ever access the site without using a proxy though lol.. But I will try to download it.

EDIT
Awesome, no errors on latest version. Did you remove the light box? I noticed an error for it on startup.

commented

lol well hey I found a bug by accident :-)

commented

There was null check for AABB already. Anyway, since I have no idea which line caused NPE, I cleaned up elevator logic, just because it wasn't very readable code: 08bcf7b.

commented

LightBox has been removed yes.

This was due to a bug that was not easy to fix, something about the way MC handles maps. Also with the full block map item frames in 1.7. It was seen to have little use in the future.

commented

Alright good to know, I did love it though! Since this has been fixed I'm closing this, thank you for your help :-)