xWarp

37k Downloads

Exception on warp and info

kaipr opened this issue · 9 comments

commented

My users randomly seem to get bugged warps, warping to it shows this exception:

[SEVERE] null
org.bukkit.command.CommandException: Unhandled exception executing command 'warp' in plugin xWarp v2.10.1
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:85)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:278)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:682)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:645)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:639)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
        at net.minecraft.server.NetworkManager.a(NetworkManager.java:196)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:372)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:287)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
Caused by: java.lang.NullPointerException

Using /warp info on it causes this:

[SEVERE] null
org.bukkit.command.CommandException: Unhandled exception executing command 'warp' in plugin xWarp v2.10.1
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:85)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:278)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:682)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:645)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:639)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
        at net.minecraft.server.NetworkManager.a(NetworkManager.java:196)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:372)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:287)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
Caused by: java.lang.NullPointerException
        at org.bukkit.Location.getBlock(Location.java:73)
        at me.taylorkelly.mywarp.Warp.isSave(Warp.java:144)
        at de.xzise.xwarp.commands.InfoCommand.executeEdit(InfoCommand.java:41)
        at de.xzise.xwarp.commands.WarpCommand.internalExecute(WarpCommand.java:50)
        at de.xzise.xwarp.commands.SubCommand.execute(SubCommand.java:47)
        at de.xzise.xwarp.CommandMap.executeCommand(CommandMap.java:112)
        at me.taylorkelly.mywarp.MyWarp.onCommand(MyWarp.java:159)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 12 more

Using xWarp 2.11 and CB 766

commented

Hello,
first: Thanks for the post here.
second: For the first error, do you give the lines below the “Cause by…” like in the second error?
third: As a tip: use <pre>text</pre> to mark the error lines as code.

So now to the bug: The first one is fairly impossible to fix, because I don't know the “cause”. The second one is strange, but here Java gave me a hint and I will try to fix this.

Fabian

commented

Okay, maybe I fixed your problem. I couldn't reproduce it, but if I'm correct, it happens only to warps which are not in the default world. Maybe not all. The main problem is, when a world get's loaded after xWarp is loaded.

Because of this I added a system which gets triggered if a world is loaded. Then it checks all warps, and if there is a warp in this new world it should update the location. But it seems that I messed up this thing. I uploaded a untested beta with the fix (2.11.1 b0 update: replaced with 2.11.1 b1). Would be nice, if the problem is gone in this build.

Fabian

commented
  • Set a warp in main and another world
  • Restarted server and warped from another world to main -> works with all versions
  • Restarted server and warped from main to another world
    • 2.11.0 -> Exception
    • 2.11.1 b0/b1 -> Working, but teleporting too far down (58 instead of 66) -> suffocate

Some log:

18:23:22 [INFO] [xWarp]: 76 warps loaded
18:23:22 [WARNING] [xWarp]: 10 invalid warps found.
...
18:23:23 [INFO] [MultiVerse] Loading World & Settings - 'mine3' - NORMAL
...
18:23:23 [INFO] [xWarp]: Loaded world 'mine3' and updated 9 warps.
...
18:23:43 [INFO] Loaded world: mine3

The "loaded world" happened just in the moment as I warped to it, not earlier. Seems like MultiVerse initializes the world on startup, but doesn't really load it until it's really needed by a player?

Ps: The invalid warps are probably from old mine worlds (I reset mining worlds every 3-4 weeks and rename them).

commented

Hello,

thanks for the quick update, will try the beta right now. I have no clue why the first Exception is "incomplete", but thats exactly how it showed up in console. As that stack is the same as the second one, it's probably the same code which caused it as the second one.

Kai

commented

I uploaded a second update. This will inform you, that xWarp updated a amount of warps, because a world was loaded. If this message appears, check if the warps pointing to the world which is called there are working. They should produce the error if you use the 2.11.0 version.

Fabian

PS: And nice for the <pre>.

commented

Okay weird. Could you check with warp info <warpname> (also in console possible to copy & paste) the position? Is the y value 58 or 66?

And is it for all warps 8 blocks to low? And what does warp info say directly after creating?

Fabian

commented
19:00:22 [INFO] Warp info: mine
19:00:22 [INFO] The location is not save!
19:00:22 [INFO] Loaded world: mine3
19:00:22 [INFO] Creator: Sevenos (Group: Owner)
19:00:22 [INFO] Owner: Sevenos (Group: Owner)
19:00:22 [INFO] Visibility: Private
19:00:22 [INFO] Price: Gratis
19:00:22 [INFO] Invitees: None
19:00:22 [INFO] Editors: None
19:00:22 [INFO] Location: World = mine3, x = -1, y = 64, z = -62

One other warp was 5 off and they all seem to work after the world is loaded.

Kai

commented

Okay strange. This is now y = 64? I will make some tests on my server, if I could see anything. Maybe it is useful, if you could send me your warps file (warps.db or hmod.txt).

Fabian

PS: By the way you have only one invalid warp, because 9 invalid warps get valid, because they are in world mine3.

commented

Okay is fixed with 2.11.1.