CraftBook 3

CraftBook 3

139k Downloads

NPE with glass / glass pane on a pipe sign

LadyCailinBot opened this issue ยท 9 comments

commented

CRAFTBOOK-3326 - Reported by Enatras

When trying to transport a carpet though a pipe, the following error occured:

[Server thread/ERROR]: Could not pass event SourcedBlockRedstoneEvent to CraftBook v3.9-SNAPSHOT-jenkins-CraftBook-154
org.bukkit.event.EventException
at org.bukkit.plugin.EventExecutor$1.execute(EventExecutor.java:46) ~[patched_1.11.2.jar:git-Paper-1104]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[patched_1.11.2.jar:git-Paper-1104]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched_1.11.2.jar:git-Paper-1104]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:517) ~[patched_1.11.2.jar:git-Paper-1104]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:502) ~[patched_1.11.2.jar:git-Paper-1104]
at com.sk89q.craftbook.bukkit.MechanicListenerAdapter.handleDirectWireInput(MechanicListenerAdapter.java:344) ~[?:?]
at com.sk89q.craftbook.bukkit.MechanicListenerAdapter.handleRedstoneForBlock(MechanicListenerAdapter.java:313) ~[?:?]
at com.sk89q.craftbook.bukkit.MechanicListenerAdapter.onBlockRedstoneChange(MechanicListenerAdapter.java:190) ~[?:?]
at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:35) ~[patched_1.11.2.jar:git-Paper-1104]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[patched_1.11.2.jar:git-Paper-1104]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched_1.11.2.jar:git-Paper-1104]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:517) ~[patched_1.11.2.jar:git-Paper-1104]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:502) ~[patched_1.11.2.jar:git-Paper-1104]
at org.bukkit.craftbukkit.v1_11_R1.event.CraftEventFactory.callRedstoneChange(CraftEventFactory.java:842) ~[patched_1.11.2.jar:git-Paper-1104]
at net.minecraft.server.v1_11_R1.TileEntityChest.closeContainer(TileEntityChest.java:378) ~[patched_1.11.2.jar:git-Paper-1104]
at net.minecraft.server.v1_11_R1.InventoryLargeChest.closeContainer(InventoryLargeChest.java:145) ~[patched_1.11.2.jar:git-Paper-1104]
at net.minecraft.server.v1_11_R1.ContainerChest.b(ContainerChest.java:101) ~[patched_1.11.2.jar:git-Paper-1104]
at net.minecraft.server.v1_11_R1.EntityPlayer.s(EntityPlayer.java:909) ~[patched_1.11.2.jar:git-Paper-1104]
at net.minecraft.server.v1_11_R1.PlayerConnection.a(PlayerConnection.java:1680) ~[patched_1.11.2.jar:git-Paper-1104]
at net.minecraft.server.v1_11_R1.PacketPlayInCloseWindow.a(PacketPlayInCloseWindow.java:18) ~[patched_1.11.2.jar:git-Paper-1104]
at net.minecraft.server.v1_11_R1.PacketPlayInCloseWindow.a(PacketPlayInCloseWindow.java:5) ~[patched_1.11.2.jar:git-Paper-1104]
at net.minecraft.server.v1_11_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:14) ~[patched_1.11.2.jar:git-Paper-1104]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_72-internal]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_72-internal]
at net.minecraft.server.v1_11_R1.SystemUtils.a(SourceFile:46) [patched_1.11.2.jar:git-Paper-1104]
at net.minecraft.server.v1_11_R1.MinecraftServer.D(MinecraftServer.java:839) [patched_1.11.2.jar:git-Paper-1104]
at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:403) [patched_1.11.2.jar:git-Paper-1104]
at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:763) [patched_1.11.2.jar:git-Paper-1104]
at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:661) [patched_1.11.2.jar:git-Paper-1104]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_72-internal]

Caused by: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NullPointerException
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201) ~[patched_1.11.2.jar:git-Paper-1104]
at com.google.common.cache.LocalCache.get(LocalCache.java:3934) ~[patched_1.11.2.jar:git-Paper-1104]
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938) ~[patched_1.11.2.jar:git-Paper-1104]
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821) ~[patched_1.11.2.jar:git-Paper-1104]
at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4827) ~[patched_1.11.2.jar:git-Paper-1104]
at com.sk89q.craftbook.util.ItemSyntax.getItem(ItemSyntax.java:283) ~[?:?]
at com.sk89q.craftbook.mechanics.pipe.Pipes.searchNearbyPipes(Pipes.java:213) ~[?:?]
at com.sk89q.craftbook.mechanics.pipe.Pipes.searchNearbyPipes(Pipes.java:197) ~[?:?]
at com.sk89q.craftbook.mechanics.pipe.Pipes.searchNearbyPipes(Pipes.java:197) ~[?:?]
at com.sk89q.craftbook.mechanics.pipe.Pipes.searchNearbyPipes(Pipes.java:197) ~[?:?]

commented

Comment by me4502

Thanks

commented

Comment by Enatras

Ok, it has nothing to do with a carpet, I'm gonna test some things. Something with a glass-holder chest seems to be broken...

commented

Comment by Enatras

Ok, it happend on a [Pipe] sign using the following items:

[Pipe]
20:0;102:0;374

Changing it to 20:0;102;374 did fix this. Strange fact: On another pipe sign, 102:0 works.

commented

Comment by Enatras

Also happens on a sighn with:

[Pipe]
95:4;160:4

That doesn't make any sense... this ids are correct...
Using the ids in a single way is possible, together -> NPE... O.o

commented

Comment by me4502

Hi,

Is that the entire error? It doesn't seem possible - as that is occurring at getUnchecked, which is guaranteed not to cause a NullPointerException.

commented

Comment by Enatras

Sorry, here are some more informations:

Steps to reproduce:
http://imgur.com/a/99Lsd

And the complete stack trace:
https://pastebin.com/ucQ3b9h2

Error occurs when putting any item into the start chest (redstone chest)

commented

Comment by me4502

So firstly, that isn't how you specify multiple filters. It should be comma separated.

I'll fix it erroring when invalid enchantments are specified, however.

commented

Comment by Enatras

Facepalm, it is that simple...

Anyway, thanks again and yeah, this should be catched, because all items in the start chest are lost when this error occurs.

Thanks!

commented

Comment by Enatras

Verified and fixed. Safe to close :)