mushroomhostage / exphc

The Experimental Hardcore Post-Apocalyptic Minecraft Server
www.exphc.com
8 stars 5 forks source link

Unable to place items in ender chests (EnderStorage) #44

Closed mushroomhostage closed 12 years ago

mushroomhostage commented 12 years ago

When you try to place an item in an ender chest from the EnderStorage mod, the click is denied and the item returns to your inventory.

mushroomhostage commented 12 years ago
21:15:51 [WARNING] onInventoryClick exception: java.lang.NullPointerException
21:15:51 [SEVERE] java.lang.NullPointerException
21:15:51 [SEVERE]       at com.exphc.QuickBench.QuickBenchListener.onInventoryClick(QuickBench.java:438)
21:15:51 [SEVERE]       at com.exphc.QuickBench.QuickBenchListener.onInventoryClickWrapper(QuickBench.java:424)
21:15:51 [SEVERE]       at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
21:15:51 [SEVERE]       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
21:15:51 [SEVERE]       at java.lang.reflect.Method.invoke(Unknown Source)
21:15:51 [SEVERE]       at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
21:15:51 [SEVERE]       at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
21:15:51 [SEVERE]       at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:459)
21:15:51 [SEVERE]       at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:1185)
21:15:51 [SEVERE]       at net.minecraft.server.Packet102WindowClick.handle(SourceFile:28)
21:15:51 [SEVERE]       at net.minecraft.server.NetworkManager.b(NetworkManager.java:234)
21:15:51 [SEVERE]       at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:121)
21:15:51 [SEVERE]       at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
21:15:51 [SEVERE]       at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:556)
21:15:51 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:453)
21:15:51 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
mushroomhostage commented 12 years ago

The stack trace is from the QuickBench plugin, which listens for inventory events. As a fail-safe, if an exception occurs during any of the event handling, it denies the event, to avoid duping. The NPE is in view.getTitle().equals(), either the view of title is null for EnderStorage chests.

mushroomhostage commented 12 years ago

https://github.com/mushroomhostage/QuickBench/commit/eaa355da8f5aa1a3ee5acc84bbd98d2bb33107da

mushroomhostage commented 12 years ago

And same NPE in Chestpack plugin, but non-destructive, just causes log spam: https://github.com/mushroomhostage/Chestpack/commit/78b7387437d81185ce38398bc1eb86f8aa996863

mushroomhostage commented 12 years ago

Deployed after the crash in https://github.com/mushroomhostage/exphc/issues/42 , working now.