YatopiaMC / Yatopia

The Most Powerful and Feature Rich Minecraft Server Software!
https://yatopiamc.org/
464 stars 79 forks source link

GlueList bug #270

Closed metabrixkt closed 4 years ago

metabrixkt commented 4 years ago

Expected behavior Everything works fine, including WorldGuard.

Observed behavior I get errors in console from the WorldGuard, yatopia's gluelist is present in stacktrace. Logs:

[20:08:24] [Server thread/ERROR]: Could not pass event InventoryClickEvent to WorldGuard v7.0.4-beta1;bc551da
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: -1
        at net.yatopia.server.list.GlueList.rangeCheck(GlueList.java:618) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.yatopia.server.list.GlueList.get(GlueList.java:361) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.NonNullList.get(NonNullList.java:51) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.PlayerInventory.getItem(PlayerInventory.java:541) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at org.bukkit.craftbukkit.v1_16_R2.inventory.CraftInventory.getItem(CraftInventory.java:49) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at com.sk89q.worldguard.bukkit.listener.BlacklistListener.checkEquipped(BlacklistListener.java:333) ~[?:?]
        at com.sk89q.worldguard.bukkit.listener.BlacklistListener.onInventoryClick(BlacklistListener.java:292) ~[?:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor94.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.PlayerConnection.a(PlayerConnection.java:2462) ~[?:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.PacketPlayInWindowClick.a(SourceFile:32) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.PacketPlayInWindowClick.a(SourceFile:10) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:43) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.TickTask.run(SourceFile:18) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:150) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:114) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.MinecraftServer.ba(MinecraftServer.java:1201) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.MinecraftServer.executeNext(MinecraftServer.java:1194) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:125) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.MinecraftServer.a(MinecraftServer.java:1269) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.MinecraftServer.w(MinecraftServer.java:1009) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.MinecraftServer.lambda$a$0(MinecraftServer.java:178) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at java.lang.Thread.run(Thread.java:832) [?:?]
[20:08:27] [Server thread/ERROR]: Could not pass event InventoryClickEvent to WorldGuard v7.0.4-beta1;bc551da
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: -1
        at net.yatopia.server.list.GlueList.rangeCheck(GlueList.java:618) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.yatopia.server.list.GlueList.get(GlueList.java:361) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.NonNullList.get(NonNullList.java:51) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.PlayerInventory.getItem(PlayerInventory.java:541) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at org.bukkit.craftbukkit.v1_16_R2.inventory.CraftInventory.getItem(CraftInventory.java:49) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at com.sk89q.worldguard.bukkit.listener.BlacklistListener.checkEquipped(BlacklistListener.java:333) ~[?:?]
        at com.sk89q.worldguard.bukkit.listener.BlacklistListener.onInventoryClick(BlacklistListener.java:292) ~[?:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor94.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.PlayerConnection.a(PlayerConnection.java:2462) ~[?:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.PacketPlayInWindowClick.a(SourceFile:32) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.PacketPlayInWindowClick.a(SourceFile:10) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:43) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.TickTask.run(SourceFile:18) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:150) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:114) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.MinecraftServer.ba(MinecraftServer.java:1201) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.MinecraftServer.executeNext(MinecraftServer.java:1194) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:125) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.MinecraftServer.a(MinecraftServer.java:1269) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.MinecraftServer.w(MinecraftServer.java:1009) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.MinecraftServer.lambda$a$0(MinecraftServer.java:178) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at java.lang.Thread.run(Thread.java:832) [?:?]
[20:08:29] [Server thread/ERROR]: Could not pass event InventoryClickEvent to WorldGuard v7.0.4-beta1;bc551da
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: -1
        at net.yatopia.server.list.GlueList.rangeCheck(GlueList.java:618) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.yatopia.server.list.GlueList.get(GlueList.java:361) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.NonNullList.get(NonNullList.java:51) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.PlayerInventory.getItem(PlayerInventory.java:541) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at org.bukkit.craftbukkit.v1_16_R2.inventory.CraftInventory.getItem(CraftInventory.java:49) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at com.sk89q.worldguard.bukkit.listener.BlacklistListener.checkEquipped(BlacklistListener.java:333) ~[?:?]
        at com.sk89q.worldguard.bukkit.listener.BlacklistListener.onInventoryClick(BlacklistListener.java:292) ~[?:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor94.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.PlayerConnection.a(PlayerConnection.java:2462) ~[?:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.PacketPlayInWindowClick.a(SourceFile:32) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.PacketPlayInWindowClick.a(SourceFile:10) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:43) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.TickTask.run(SourceFile:18) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:150) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:114) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.MinecraftServer.ba(MinecraftServer.java:1201) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.MinecraftServer.executeNext(MinecraftServer.java:1194) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:125) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.MinecraftServer.a(MinecraftServer.java:1269) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.MinecraftServer.w(MinecraftServer.java:1009) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.MinecraftServer.lambda$a$0(MinecraftServer.java:178) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at java.lang.Thread.run(Thread.java:832) [?:?]

Steps to reproduce (if known) I don't know how to reproduce.

Installed plugins

Plugins (22): AntiCreeper, CartographerCrashFix, CoreProtect, EPChat*, EPModule, EveryWorldSpawn*, Geyser-Spigot, GFly, Invsee*, Matrix, MultiWorld*, PacketWrapper*, PermissionsEx*, PlugMan, ProtocolLib, SimpleLay, SkinsRestorer, spark, Undertow, WorldEdit, WorldEditSUI, WorldGuard

Version

[20:17:44 INFO]: This server is running Yatopia version git-Yatopia-"0dd46b6" (MC: 1.16.3) (Implementing API version 1.16.3-R0.1-SNAPSHOT)
[20:17:44 INFO]: Checking version, please wait...
[20:17:44 INFO]: Previous version: git-Yatopia-"ab272cc" (MC: 1.16.3)
[20:17:44 INFO]: You are running the latest version

Timings Idk are they helpful for this bug or not, but here: https://timings.aikar.co/?id=b4bc435593f64d46b3567f9c55201816

duplexsystem commented 4 years ago

Doesn't look like a GlueList Bug as throwing an error when asked for an index of -1 is expected behavior.

metabrixkt commented 4 years ago

@budgidiere It wasn't happening until GlueList was added.

MrIvanPlays commented 4 years ago

try running a non beta version of worldguard.

metabrixkt commented 4 years ago

@MrIvanPlays Issue is still present.

[22:57:02 ERROR]: Could not pass event InventoryClickEvent to WorldGuard v7.0.4+f7ff984
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: -1
        at net.yatopia.server.list.GlueList.rangeCheck(GlueList.java:618) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.yatopia.server.list.GlueList.get(GlueList.java:361) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.NonNullList.get(NonNullList.java:51) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.PlayerInventory.getItem(PlayerInventory.java:541) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at org.bukkit.craftbukkit.v1_16_R2.inventory.CraftInventory.getItem(CraftInventory.java:49) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at com.sk89q.worldguard.bukkit.listener.BlacklistListener.checkEquipped(BlacklistListener.java:333) ~[?:?]
        at com.sk89q.worldguard.bukkit.listener.BlacklistListener.onInventoryClick(BlacklistListener.java:292) ~[?:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor94.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.PlayerConnection.a(PlayerConnection.java:2462) ~[?:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.PacketPlayInWindowClick.a(SourceFile:32) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.PacketPlayInWindowClick.a(SourceFile:10) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:43) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.TickTask.run(SourceFile:18) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:150) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:114) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.MinecraftServer.ba(MinecraftServer.java:1201) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.MinecraftServer.executeNext(MinecraftServer.java:1194) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:125) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.MinecraftServer.a(MinecraftServer.java:1269) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.MinecraftServer.w(MinecraftServer.java:1009) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at net.minecraft.server.v1_16_R2.MinecraftServer.lambda$a$0(MinecraftServer.java:178) ~[yatopia-1.16.3-0dd46b6.jar:git-Yatopia-"0dd46b6"]
        at java.lang.Thread.run(Thread.java:832) [?:?]
MrIvanPlays commented 4 years ago

plugin issue. wasn't able to find anything in our ( and upstreams' ) code about getting an index out of range ( range being >=0 )

toinouH commented 4 years ago

@epserv You can ask the dev to join the Discord if he needs help to resolve the issue, I think one dev will be able to help.