FastCraft

FastCraft

138k Downloads

Could not pass event CraftItemEvent to ProRecipes v1.8.5

Joapple opened this issue ยท 7 comments

commented

Description

Not sure if it's this plugin's fault or ProRecipe, but it was an issue before and it was this plugin's fault, if it's not the case, i'll post to ProRecipes thanks!

Debug Output

Show **/fcadmin debug** output

Versions:
  FastCraft+ v0.26.3
  git-TacoSpigot-"0934e8b" (MC: 1.10.2)
  1.10.2-R0.1-SNAPSHOT
  Java 1.8.0_66
**sorry not posting my whole plugin list on github, if it's still needed, i'll send private, but i would like to not give it**

Stack Trace

Show stack trace

[10:54:32 ERROR]: Could not pass event CraftItemEvent to ProRecipes v1.8.5
org.bukkit.event.EventException
at org.bukkit.plugin.EventExecutor$1.execute(EventExecutor.java:46) ~[patched.jar:git-TacoSpigot-"0934e8b"]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[patched.jar:git-TacoSpigot-"0934e8b"]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched.jar:git-TacoSpigot-"0934e8b"]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:517) [patched.jar:git-TacoSpigot-"0934e8b"]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:502) [patched.jar:git-TacoSpigot-"0934e8b"]
at co.kepler.fastcraftplus.util.RecipeUtil.callCraftItemEvent(RecipeUtil.java:232) [FastCraftPlus.jar:?]
at co.kepler.fastcraftplus.recipes.FastRecipe.craft(FastRecipe.java:219) [FastCraftPlus.jar:?]
at co.kepler.fastcraftplus.craftgui.buttons.GUIButtonRecipe.onClick(GUIButtonRecipe.java:115) [FastCraftPlus.jar:?]
at co.kepler.fastcraftplus.api.gui.GUI$GUIListener.onInventoryClick(GUI.java:205) [FastCraftPlus.jar:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor1448.execute(Unknown Source) [?:?]
at org.bukkit.plugin.EventExecutor$1.execute(EventExecutor.java:44) [patched.jar:git-TacoSpigot-"0934e8b"]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) [patched.jar:git-TacoSpigot-"0934e8b"]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [patched.jar:git-TacoSpigot-"0934e8b"]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:517) [patched.jar:git-TacoSpigot-"0934e8b"]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:502) [patched.jar:git-TacoSpigot-"0934e8b"]
at net.minecraft.server.v1_10_R1.PlayerConnection.a(PlayerConnection.java:1911) [patched.jar:git-TacoSpigot-"0934e8b"]
at net.minecraft.server.v1_10_R1.PacketPlayInWindowClick.a(SourceFile:33) [patched.jar:git-TacoSpigot-"0934e8b"]
at net.minecraft.server.v1_10_R1.PacketPlayInWindowClick.a(SourceFile:10) [patched.jar:git-TacoSpigot-"0934e8b"]
at net.minecraft.server.v1_10_R1.PlayerConnectionUtils$1.run(SourceFile:13) [patched.jar:git-TacoSpigot-"0934e8b"]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_66]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_66]
at net.minecraft.server.v1_10_R1.SystemUtils.a(SourceFile:45) [patched.jar:git-TacoSpigot-"0934e8b"]
at net.minecraft.server.v1_10_R1.MinecraftServer.D(MinecraftServer.java:808) [patched.jar:git-TacoSpigot-"0934e8b"]
at net.minecraft.server.v1_10_R1.DedicatedServer.D(DedicatedServer.java:404) [patched.jar:git-TacoSpigot-"0934e8b"]
at net.minecraft.server.v1_10_R1.MinecraftServer.C(MinecraftServer.java:740) [patched.jar:git-TacoSpigot-"0934e8b"]
at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:639) [patched.jar:git-TacoSpigot-"0934e8b"]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_66]
Caused by: java.lang.NullPointerException
at mc.mcgrizzz.prorecipes.bg.b(Recipes.java:1746) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor749.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor$1.execute(EventExecutor.java:44) ~[patched.jar:git-TacoSpigot-"0934e8b"]
... 26 more

commented

https://github.com/mcgrizzz/ProRecipes/blob/development/src/mc/mcgrizzz/prorecipes/Recipes.java#L1746
It's hard to tell if this is the line of code that's causing the error, since the plugin is obfuscated, making the names incorrect, and possibly making the line numbers inaccurate in the stack trace.

This looks like something I can fix on my end.

To help me reproduce the issue, what kind of recipe were you crafting? (shaped/shapeless/etc.)
If there are any other details you think might be useful, feel free to share.

commented

It looks like it's actually the line of code before. I'll look further into it.
https://github.com/mcgrizzz/ProRecipes/blob/development/src/mc/mcgrizzz/prorecipes/Recipes.java#L1745

commented

I'm not able to reproduce this. Could you share specifically how you produced this error? (How to make the recipe, etc.)

commented

Sorry for the lack of response in time, all our recipes are made with ProRecipes in game and they are all shapeless, i have over 30 people logged in when it happens, so once i see an error in console i try to ask what recipes players did, but it's hard to get the "broken" recipe :/

Edit: since it's now open source, i can build a jar not obfuscated and load that, so if an error happens again, we'll find the right line ?

commented

Okay now that we have the latest version loaded, not obfuscated, maybe there is something we can do with ProRecipes..

Stack Trace

Show stack trace

[12:34:15] [Server thread/ERROR]: Could not pass event CraftItemEvent to ProRecipes v1.8.6
org.bukkit.event.EventException
	at org.bukkit.plugin.EventExecutor$1.execute(EventExecutor.java:46) ~[patched_1.11.2.jar:git-Paper-1057]
	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[patched_1.11.2.jar:git-Paper-1057]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched_1.11.2.jar:git-Paper-1057]
	at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:517) ~[patched_1.11.2.jar:git-Paper-1057]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:502) ~[patched_1.11.2.jar:git-Paper-1057]
	at co.kepler.fastcraftplus.util.RecipeUtil.callCraftItemEvent(RecipeUtil.java:232) ~[FastCraftPlus.jar:?]
	at co.kepler.fastcraftplus.recipes.FastRecipe.craft(FastRecipe.java:219) ~[FastCraftPlus.jar:?]
	at co.kepler.fastcraftplus.craftgui.buttons.GUIButtonRecipe.onClick(GUIButtonRecipe.java:118) ~[FastCraftPlus.jar:?]
	at co.kepler.fastcraftplus.api.gui.GUI$GUIListener.onInventoryClick(GUI.java:205) ~[FastCraftPlus.jar:?]
	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor1731.execute(Unknown Source) ~[?:?]
	at org.bukkit.plugin.EventExecutor$1.execute(EventExecutor.java:44) ~[patched_1.11.2.jar:git-Paper-1057]
	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[patched_1.11.2.jar:git-Paper-1057]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched_1.11.2.jar:git-Paper-1057]
	at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:517) ~[patched_1.11.2.jar:git-Paper-1057]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:502) ~[patched_1.11.2.jar:git-Paper-1057]
	at net.minecraft.server.v1_11_R1.PlayerConnection.a(PlayerConnection.java:1889) ~[patched_1.11.2.jar:git-Paper-1057]
	at net.minecraft.server.v1_11_R1.PacketPlayInWindowClick.a(SourceFile:33) ~[patched_1.11.2.jar:git-Paper-1057]
	at net.minecraft.server.v1_11_R1.PacketPlayInWindowClick.a(SourceFile:10) ~[patched_1.11.2.jar:git-Paper-1057]
	at net.minecraft.server.v1_11_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:14) ~[patched_1.11.2.jar:git-Paper-1057]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_121]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_121]
	at net.minecraft.server.v1_11_R1.SystemUtils.a(SourceFile:46) [patched_1.11.2.jar:git-Paper-1057]
	at net.minecraft.server.v1_11_R1.MinecraftServer.D(MinecraftServer.java:830) [patched_1.11.2.jar:git-Paper-1057]
	at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:403) [patched_1.11.2.jar:git-Paper-1057]
	at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:754) [patched_1.11.2.jar:git-Paper-1057]
	at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:652) [patched_1.11.2.jar:git-Paper-1057]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
Caused by: java.lang.NullPointerException
	at mc.mcgrizzz.prorecipes.Recipes.afterCraft(Recipes.java:1743) ~[ProRecipes.jar:?]
	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor870.execute(Unknown Source) ~[?:?]
	at org.bukkit.plugin.EventExecutor$1.execute(EventExecutor.java:44) ~[patched_1.11.2.jar:git-Paper-1057]
	... 26 more
commented

https://github.com/mcgrizzz/ProRecipes/blob/master/src/mc/mcgrizzz/prorecipes/Recipes.java#L1743

I'm going to submit a pull request to ProRecipes that may resolve the issue.

I'm currently in the process of re-coding the plugin because there were some fundamental issues that cause problems like these, and I have to re-think a lot of the plugin. I've been pretty busy with schoolwork, so It might be a while until this is complete.

commented

Totally alright i don't think it's actually causing any weird stuff to happen but shows in console from time to time. Thanks a lot for looking into that!