Closed mibby closed 10 years ago
With uncrafter, same error. Disconnects player with internal server error.
[23:19:44] [Server thread/WARN]: Failed to handle packet for /IP:PORT
java.lang.NullPointerException
at net.minecraft.server.v1_7_R3.Container.a(Container.java:529) ~[spigot.jar:git-Spigot-1449]
at net.minecraft.server.v1_7_R3.ContainerChest.b(ContainerChest.java:82) ~[spigot.jar:git-Spigot-1449]
at net.minecraft.server.v1_7_R3.Container.clickItem(Container.java:248) ~[spigot.jar:git-Spigot-1449]
at net.drgnome.virtualpack.components.VContainer.clickItem(VContainer.java:27) ~[?:?]
at net.minecraft.server.v1_7_R3.PlayerConnection.a(PlayerConnection.java:1408) ~[spigot.jar:git-Spigot-1449]
at net.minecraft.server.v1_7_R3.PacketPlayInWindowClick.a(SourceFile:32) ~[spigot.jar:git-Spigot-1449]
at net.minecraft.server.v1_7_R3.PacketPlayInWindowClick.handle(SourceFile:10) ~[spigot.jar:git-Spigot-1449]
at net.minecraft.server.v1_7_R3.NetworkManager.a(NetworkManager.java:176) ~[spigot.jar:git-Spigot-1449]
at net.minecraft.server.v1_7_R3.ServerConnection.c(ServerConnection.java:77) [spigot.jar:git-Spigot-1449]
at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:713) [spigot.jar:git-Spigot-1449]
at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:283) [spigot.jar:git-Spigot-1449]
at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:576) [spigot.jar:git-Spigot-1449]
at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:482) [spigot.jar:git-Spigot-1449]
at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1449]
[23:19:44] [Server thread/INFO]: mibby lost connection: Internal server error
This is spigot's fault and does not happen with CraftBukkit.
Looking at line Container.java, line 529 in Spigot where the error happens:
ItemStack itemstack1 = slot.getItem();
if (itemstack1 == null)
{
slot.set(itemstack.cloneItemStack());
slot.f();
itemstack.count -= slot.getItem().count; // If itemstack1 == null, then slot.getItem() == null. Always.
Looking at the same passage in CraftBukkit:
ItemStack itemstack1 = slot.getItem();
if (itemstack1 == null)
{
slot.set(itemstack.cloneItemStack());
slot.f();
itemstack.count = 0; // No object, no NullPointerException
You should tell md_5 if this isn't fixed the the newer spigot builds already.
Still occurs with latest spigot build, 1449. I reported it to spigot's IRC first and was informed by multiple people it was a plugin error. :/
@md-5 Thoughts?
@thinkofdeath
@Siguza ?
Ah derp, I was looking at an old CB version, sorry. -.- Gonna debug.
Ok, I finally found it. Dev build 101 fixes the Uncrafter, Trash and Materializer. I wasn't able to produce the bug on anything else, does it really occur with the Anvil (and others)?
And sorry everyone for the trouble. :/
I had someone report they were kicked when shift clicking an item in the virtual anvil. I'll update and test all virtual containers myself. Will report back soon.
@Siguza
All seems to be functioning fine now without crashing the client. However, I noticed an item 'shadow' bug.
Virtual anvil. Item in inventory.
Shift click item into anvil. Creates a duplicate item.
Shift click the duplicate item into anvil, item disappears. Item also disappears when moved around.
Should be fixed in build 102.
@Siguza
Players are kicked from the server when they shift click an item into a virtual container. Anvil, uncrafter, trash bin, etc. They can manually drag the item into the slots, but shift clicking kicks them from the server with the following error output in console.
VirtualChest dev build 100. Minecraft 1.7.9 (latest bukkit upstream)