GC-spigot / AdvancedEnchantments

Superior Custom Enchantments Creator for Minecraft And Spigot platform
153 stars 61 forks source link

Could not pass event BlockBreakEvent. #3924

Closed RgmauosTube closed 9 months ago

RgmauosTube commented 9 months ago

Describe the bug

My server has been facing this error for some time and I don't know how to solve it!

Server 1.19.4 - Purpur/Pupperfish

Performance error when error occurs.

How to reproduce

[13:01:03] [Server thread/ERROR]: Could not pass event BlockBreakEvent to AdvancedEnchantments v9.6.0 java.util.ConcurrentModificationException: null at java.util.HashMap$HashIterator.nextNode(HashMap.java:1597) ~[?:?] at java.util.HashMap$EntryIterator.next(HashMap.java:1630) ~[?:?] at java.util.HashMap$EntryIterator.next(HashMap.java:1628) ~[?:?] at net.advancedplugins.ae.impl.effects.effects.actions.handlers.DropsHandler.handle(DropsHandler.java:157) ~[AdvancedEnchantments-9.6.0.jar:?] at net.advancedplugins.ae.impl.effects.effects.actions.ActionExecutionBuilder.buildAndExecute(ActionExecutionBuilder.java:83) ~[AdvancedEnchantments-9.6.0.jar:?] at net.advancedplugins.ae.impl.effects.effects.mechanics.triggers.internal.MiningTrigger.onBlockBreak(MiningTrigger.java:128) ~[AdvancedEnchantments-9.6.0.jar:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor923.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:?] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:git-Purpur-1985] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[purpur-1.19.4.jar:git-Purpur-1985] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[purpur-1.19.4.jar:git-Purpur-1985] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:617) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:?] at net.minecraft.server.level.ServerPlayerGameMode.destroyBlock(ServerPlayerGameMode.java:377) ~[?:?] at net.minecraft.server.level.ServerPlayerGameMode.destroyAndAck(ServerPlayerGameMode.java:336) ~[?:?] at net.minecraft.server.level.ServerPlayerGameMode.handleBlockBreakAction(ServerPlayerGameMode.java:274) ~[?:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.handlePlayerAction(ServerGamePacketListenerImpl.java:1953) ~[?:?] at net.minecraft.network.protocol.game.ServerboundPlayerActionPacket.handle(ServerboundPlayerActionPacket.java:42) ~[?:?] at net.minecraft.network.protocol.game.ServerboundPlayerActionPacket.a(ServerboundPlayerActionPacket.java:15) ~[?:?] at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:51) ~[?:?] at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.19.4.jar:git-Purpur-1985] at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?] at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1369) ~[purpur-1.19.4.jar:git-Purpur-1985] at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[purpur-1.19.4.jar:git-Purpur-1985] at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?] at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1346) ~[purpur-1.19.4.jar:git-Purpur-1985] at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1339) ~[purpur-1.19.4.jar:git-Purpur-1985] at net.minecraft.util.thread.BlockableEventLoop.runAllTasks(BlockableEventLoop.java:114) ~[?:?] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1455) ~[purpur-1.19.4.jar:git-Purpur-1985] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1195) ~[purpur-1.19.4.jar:git-Purpur-1985] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:325) ~[purpur-1.19.4.jar:git-Purpur-1985] at java.lang.Thread.run(Thread.java:840) ~[?:?]

Screenshots / Videos

No response

"/ae plinfo" link

https://paste.md-5.net/yegolapowe

Server Log

No response

ThomasWega commented 9 months ago

When does this happen? What enchantments do you have on? We need more info to work with

RgmauosTube commented 9 months ago

This happened when we turned on the server and it closed. But now, the same error occurs but instead of closing, it just increases the amount of RAM the server uses. I don't know which enchantment they use when this error occurs since I have a public smp server. All enchantments are activated with the exception of "wings"! Only enchantment packs 1 and 2 are downloaded.

ThomasWega commented 9 months ago

I cannot do anything with this little info. I will unfortunately have to close this now, but please create a new issue when you are able to isolate this issue and know which enchantment causes it. Unless we know this, there is nothing we can do. Thank you

ThomasWega commented 9 months ago

Was also able to replicate it.

Used a pickaxe with efficiency 10, smelting, telepathy and trench

Reopening this

[23:23:17 ERROR]: Could not pass event BlockBreakEvent to AdvancedEnchantments v9.6.6
java.util.ConcurrentModificationException: null
        at java.util.HashMap$HashIterator.nextNode(HashMap.java:1597) ~[?:?]
        at java.util.HashMap$EntryIterator.next(HashMap.java:1630) ~[?:?]
        at java.util.HashMap$EntryIterator.next(HashMap.java:1628) ~[?:?]
        at net.advancedplugins.ae.impl.effects.effects.actions.handlers.DropsHandler.handle(DropsHandler.java:159) ~[AdvancedEnchantments-9.6.6.jar:?]
        at net.advancedplugins.ae.impl.effects.effects.actions.ActionExecutionBuilder.buildAndExecute(ActionExecutionBuilder.java:83) ~[AdvancedEnchantments-9.6.6.jar:?]
        at net.advancedplugins.ae.impl.effects.effects.mechanics.triggers.internal.MiningTrigger.onBlockBreak(MiningTrigger.java:128) ~[AdvancedEnchantments-9.6.6.jar:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor431.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:git-Paper-196]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.1.jar:git-Paper-196]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[paper-1.20.1.jar:git-Paper-196]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at net.minecraft.server.level.ServerPlayerGameMode.destroyBlock(ServerPlayerGameMode.java:378) ~[?:?]
        at net.minecraft.server.level.ServerPlayerGameMode.destroyAndAck(ServerPlayerGameMode.java:337) ~[?:?]
        at net.minecraft.server.level.ServerPlayerGameMode.handleBlockBreakAction(ServerPlayerGameMode.java:275) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handlePlayerAction(ServerGamePacketListenerImpl.java:1927) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundPlayerActionPacket.handle(ServerboundPlayerActionPacket.java:42) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundPlayerActionPacket.a(ServerboundPlayerActionPacket.java:15) ~[?:?]
        at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:51) ~[?:?]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1338) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1315) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1308) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.util.thread.BlockableEventLoop.runAllTasks(BlockableEventLoop.java:114) ~[?:?]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1424) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1170) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.20.1.jar:git-Paper-196]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

Note that it seems to happen pretty randomly when just mining. Will investigate this further

BTNGaming commented 9 months ago

Has there been any progress on this? Found out the Telepathy is the one thing we have in common here.

I have the same issue, and when you mentioned the enchantments, i found that Telepathy is the one causing it.

ThomasWega commented 9 months ago

Working on a solution. Also came across this when mining itemsadder custom blocks, so putting it out here to fix this as well

[11:58:47 WARN]: [AdvancedEnchantments] Task #3502 for AdvancedEnchantments v9.6.12 generated an exception
java.lang.NullPointerException: Cannot invoke "dev.lone.itemsadder.api.CustomBlock.getLoot(org.bukkit.inventory.ItemStack, boolean)" because "customBlock" is null
        at net.advancedplugins.ae.impl.utils.hooks.plugins.ItemsAdderHook.lambda$onCustomBlockBreak$0(ItemsAdderHook.java:103) ~[AdvancedEnchantments-9.6.12.jar:?]
        at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.20.1.jar:git-Paper-196]
        at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:480) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1479) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:446) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1393) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1170) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.20.1.jar:git-Paper-196]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
ThomasWega commented 9 months ago

Was also able to replicate it.

Used a pickaxe with efficiency 10, smelting, telepathy and trench

Reopening this

[23:23:17 ERROR]: Could not pass event BlockBreakEvent to AdvancedEnchantments v9.6.6
java.util.ConcurrentModificationException: null
        at java.util.HashMap$HashIterator.nextNode(HashMap.java:1597) ~[?:?]
        at java.util.HashMap$EntryIterator.next(HashMap.java:1630) ~[?:?]
        at java.util.HashMap$EntryIterator.next(HashMap.java:1628) ~[?:?]
        at net.advancedplugins.ae.impl.effects.effects.actions.handlers.DropsHandler.handle(DropsHandler.java:159) ~[AdvancedEnchantments-9.6.6.jar:?]
        at net.advancedplugins.ae.impl.effects.effects.actions.ActionExecutionBuilder.buildAndExecute(ActionExecutionBuilder.java:83) ~[AdvancedEnchantments-9.6.6.jar:?]
        at net.advancedplugins.ae.impl.effects.effects.mechanics.triggers.internal.MiningTrigger.onBlockBreak(MiningTrigger.java:128) ~[AdvancedEnchantments-9.6.6.jar:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor431.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:git-Paper-196]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.1.jar:git-Paper-196]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[paper-1.20.1.jar:git-Paper-196]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at net.minecraft.server.level.ServerPlayerGameMode.destroyBlock(ServerPlayerGameMode.java:378) ~[?:?]
        at net.minecraft.server.level.ServerPlayerGameMode.destroyAndAck(ServerPlayerGameMode.java:337) ~[?:?]
        at net.minecraft.server.level.ServerPlayerGameMode.handleBlockBreakAction(ServerPlayerGameMode.java:275) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handlePlayerAction(ServerGamePacketListenerImpl.java:1927) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundPlayerActionPacket.handle(ServerboundPlayerActionPacket.java:42) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundPlayerActionPacket.a(ServerboundPlayerActionPacket.java:15) ~[?:?]
        at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:51) ~[?:?]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1338) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1315) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1308) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.util.thread.BlockableEventLoop.runAllTasks(BlockableEventLoop.java:114) ~[?:?]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1424) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1170) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.20.1.jar:git-Paper-196]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

Note that it seems to happen pretty randomly when just mining. Will investigate this further

managed to fix this

ThomasWega commented 9 months ago

Everything should be fixed next version.