TVPT / VoxelPort

Our schedule-based transportation system!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VoxelPort Error When Attempting to Travel

pythros opened this issue · comments

This worked previously in the 1.3 CraftBukkit builds, but now it doesn't. When trying to warp/port from world A to B, I get the following error and the player does not get ported.

2013-01-17 10:29:03 [WARNING] [VoxelPort] Task #666 for VoxelPort v2.049 generated an exception
java.lang.NullPointerException
at org.bukkit.craftbukkit.v1_4_6.entity.CraftPlayer.teleport(CraftPlayer.java:382)
at com.thevoxelbox.voxelport.NewPort$MoveEventSucks.run(NewPort.java:68)
at org.bukkit.craftbukkit.v1_4_6.scheduler.CraftTask.run(CraftTask.java:53)
at org.bukkit.craftbukkit.v1_4_6.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345)
at net.minecraft.server.v1_4_6.MinecraftServer.r(MinecraftServer.java:530)
at net.minecraft.server.v1_4_6.DedicatedServer.r(DedicatedServer.java:224)
at net.minecraft.server.v1_4_6.MinecraftServer.q(MinecraftServer.java:494)
at net.minecraft.server.v1_4_6.MinecraftServer.run(MinecraftServer.java:427)
at net.minecraft.server.v1_4_6.ThreadServerApplication.run(SourceFile:849)

All other ports work fine. Just not this specific port. I can delete and recreate the port and it will work as designed until the server restarts. I'm on CB 1.4.6-R0.3 and did update VP2 to 2.049 (http://jenkins.thevoxelbox.com/job/VoxelPort/5/) to troubleshoot.

Any help would be appreciated. Thanks!

This has something to do with the world the player is teleporting to. It looks like the teleport command is issued to a Location object that has a position, but a null World reference. Unfortunately, the entire point of the MoveEventSucks class is to decouple the actual teleport operation from the call stack of the code that decides to trigger it, so this trace doesn't let me diagnose more in-depth than that.

Try turning off instaPort and seeing if the problem recurs. If so, post that error, and we'll be able to diagnose further.

We're seeing a similar issue where any VoxelPorts that a) link between our main world to another world or b) link from one location to another in a non-main world break on a restart. This is happening with instaport and dispatch ports with Multiverse as our world manager. Ports all within the main world do not break.

10:29:41 PM CONSOLE: [WARNING] [VoxelPort] Error occured in the PortTick Thread
10:29:41 PM CONSOLE: [SEVERE] java.lang.NullPointerException
10:29:41 PM CONSOLE: [SEVERE] at org.bukkit.craftbukkit.v1_5_R2.entity.CraftPlayer.teleport(CraftPlayer.java:384)
10:29:41 PM CONSOLE: [SEVERE] at com.thevoxelbox.voxelport.NewPort.departPlayer(NewPort.java:321)
10:29:41 PM CONSOLE: [SEVERE] at com.thevoxelbox.voxelport.PortTick.run(PortTick.java:75)
10:29:41 PM CONSOLE: [SEVERE] at org.bukkit.craftbukkit.v1_5_R2.scheduler.CraftTask.run(CraftTask.java:53)
10:29:41 PM CONSOLE: [SEVERE] at org.bukkit.craftbukkit.v1_5_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345)
10:29:41 PM CONSOLE: [SEVERE] at net.minecraft.server.v1_5_R2.MinecraftServer.r(MinecraftServer.java:512)
10:29:41 PM CONSOLE: [SEVERE] at net.minecraft.server.v1_5_R2.DedicatedServer.r(DedicatedServer.java:225)
10:29:41 PM CONSOLE: [SEVERE] at net.minecraft.server.v1_5_R2.MinecraftServer.q(MinecraftServer.java:476)
10:29:41 PM CONSOLE: [SEVERE] at net.minecraft.server.v1_5_R2.MinecraftServer.run(MinecraftServer.java:409)
10:29:41 PM CONSOLE: [SEVERE] at net.minecraft.server.v1_5_R2.ThreadServerApplication.run(SourceFile:573)

Possibly of note is that in these ports, if we try to (re)set the arrival point (/vp arrival) we receive a NullPointerException message.

Is the target world lazy-loaded? Does the port work if you manually tp to the world first?

No, the ports do not work even if you are in the non-main worlds. As I mentioned, this is impacting not just ports between worlds, but ports within any non-main world.

Your error is slightly different, and more useful, than pythros's original one. Can you tell us exactly which version of VoxelPort you're running?

Also, try turning on instaPort and seeing if that changes anything (it will cause teleports to be dispatched in a different way).

We are running version 2.049. If I try and change one to instaport, I get a message that says, "Invalid input! You entered something incorrectly. java.lang.NullPointerException". There's nothing in the logs in terms of a stacktrace and this is the same error I get if I try to update the destination or the arrival point.

Some of our other portals that are breaking are instaports though. Trying one of them gives me this:

2013-04-16 07:59:19 [SEVERE] Could not pass event PlayerTeleportEvent to Multiverse-Core v2.5-b662 org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462)
at org.bukkit.craftbukkit.v1_5_R2.entity.CraftPlayer.teleport(CraftPlayer.java:371)
at com.thevoxelbox.voxelport.NewPort$MoveEventSucks.run(NewPort.java:68)
at org.bukkit.craftbukkit.v1_5_R2.scheduler.CraftTask.run(CraftTask.java:53)
at org.bukkit.craftbukkit.v1_5_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345)
at net.minecraft.server.v1_5_R2.MinecraftServer.r(MinecraftServer.java:512)
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)
Caused by: java.lang.NullPointerException
at com.onarandombox.MultiverseCore.listeners.MVPlayerListener.playerTeleport(MVPlayerListener.java:178)
at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425)
... 12 more
2013-04-16 07:59:19 [WARNING] [VoxelPort] Task #77749 for VoxelPort v2.049 generated an exception
java.lang.NullPointerException
at org.bukkit.craftbukkit.v1_5_R2.entity.CraftPlayer.teleport(CraftPlayer.java:384)
at com.thevoxelbox.voxelport.NewPort$MoveEventSucks.run(NewPort.java:68)
at org.bukkit.craftbukkit.v1_5_R2.scheduler.CraftTask.run(CraftTask.java:53)
at org.bukkit.craftbukkit.v1_5_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345)
at net.minecraft.server.v1_5_R2.MinecraftServer.r(MinecraftServer.java:512)
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)

We have also noticed that any ports from a non-main world to the main world do not break.

My initial theory was that something was getting lost on the restarts related to which world the non-main world ports are in. I haven't delved in to the VP code to know whether that could be possibly true or not. Given that only non-main world ports are having the issue (for main world ports going to non-main world ones, I'm assuming the issue is with the latter), there definitely seems to be an issue related to multiple worlds.

Is there any way to read the contents of the port files to see if something isn't being persisted properly?

Sure. Just grab a hex file editor. I don't think java encrypts the data in any way. So it should be relatively easy to read.
Anyway, somebody who is familiar with VoxelPort code should look into the multi world issue.

Looking at the file for a port that has the problem vs on that doesn't, there definitely seems to be a good deal of information missing. Stepping through the NewPort.readData() method (I created a quick little standalone class to debug it locally), it looks like it only finds the data for the Zone, then starts to read in the data for the arrival location but fails due to EOF.