Farm Control

Farm Control

16.3k Downloads

Task #7 for FarmControl v1.3.0 generated an exception

DefinitelyRus opened this issue ยท 2 comments

commented

I am receiving this issue in the console on startup:

[10:35:53 WARN]: [FarmControl] Task #7 for FarmControl v1.3.0 generated an exception
java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 100
	at com.froobworld.farmcontrol.hook.tick.BukkitTickHook.getLastTickTime(BukkitTickHook.java:47) ~[?:?]
	at com.froobworld.farmcontrol.hook.tick.BukkitTickHook.lambda$register$0(BukkitTickHook.java:30) ~[?:?]
	at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
	at com.froobworld.farmcontrol.hook.tick.BukkitTickHook.lambda$register$1(BukkitTickHook.java:30) ~[?:?]
	at org.bukkit.craftbukkit.v1_21_R3.scheduler.CraftTask.run(CraftTask.java:82) ~[spigot-1.21.4.jar:4457-Spigot-73860e0-f0c8dd3]
	at org.bukkit.craftbukkit.v1_21_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:415) ~[spigot-1.21.4.jar:4457-Spigot-73860e0-f0c8dd3]
	at net.minecraft.server.MinecraftServer.c(MinecraftServer.java:1502) ~[spigot-1.21.4.jar:4457-Spigot-73860e0-f0c8dd3]
	at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1391) ~[spigot-1.21.4.jar:4457-Spigot-73860e0-f0c8dd3]
	at net.minecraft.server.MinecraftServer.y(MinecraftServer.java:1093) ~[spigot-1.21.4.jar:4457-Spigot-73860e0-f0c8dd3]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329) ~[spigot-1.21.4.jar:4457-Spigot-73860e0-f0c8dd3]
	at java.base/java.lang.Thread.run(Thread.java:1570) [?:?]

I'm unsure as to what's causing it. Am I missing a dependency? The plugin appears to be present in the command list even when the exception appears in the console.

Running on Spigot v1.21.4 with no other plugins that alter mob behavior.

The server would also crash later on and stop listening to commands entirely--the only way to close was through Task Manager. I wasn't able to copy the error code or take a screenshot of this though. I'll keep the server online with the plugin installed and see if it happens again.

commented

Thanks for reporting the issue - it should be fixed in the latest build downloadable here: https://ci.froobworld.com/job/FarmControl/

commented

Thanks for the fix! I don't see the error anywhere anymore. I'll be monitoring the server for stability.

On a somewhat related note, I checked the logs and found this the day before I installed that patch.

org.bukkit.event.EventException: null
	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-api-1.21.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-api-1.21.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:601) ~[spigot-api-1.21.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:588) ~[spigot-api-1.21.4-R0.1-SNAPSHOT.jar:?]
	at net.minecraft.world.level.chunk.Chunk.unloadCallback(Chunk.java:625) ~[spigot-1.21.4.jar:4457-Spigot-73860e0-f0c8dd3]
	at net.minecraft.server.level.PlayerChunk.lambda$callEventIfUnloading$7(PlayerChunk.java:341) ~[spigot-1.21.4.jar:4457-Spigot-73860e0-f0c8dd3]
	at net.minecraft.server.level.PlayerChunkMap$CallbackExecutor.run(PlayerChunkMap.java:171) ~[spigot-1.21.4.jar:4457-Spigot-73860e0-f0c8dd3]
	at net.minecraft.server.level.PlayerChunk.a(PlayerChunk.java:429) ~[spigot-1.21.4.jar:4457-Spigot-73860e0-f0c8dd3]
	at net.minecraft.server.level.ChunkMapDistance.a(ChunkMapDistance.java:139) ~[spigot-1.21.4.jar:4457-Spigot-73860e0-f0c8dd3]
	at net.minecraft.server.level.ChunkProviderServer.s(ChunkProviderServer.java:304) ~[spigot-1.21.4.jar:4457-Spigot-73860e0-f0c8dd3]
	at net.minecraft.server.level.ChunkProviderServer.c(ChunkProviderServer.java:261) ~[spigot-1.21.4.jar:4457-Spigot-73860e0-f0c8dd3]
	at net.minecraft.server.level.ChunkProviderServer.a(ChunkProviderServer.java:160) ~[spigot-1.21.4.jar:4457-Spigot-73860e0-f0c8dd3]
	at net.minecraft.world.level.World.a(World.java:299) ~[spigot-1.21.4.jar:4457-Spigot-73860e0-f0c8dd3]
	at org.bukkit.craftbukkit.v1_21_R3.CraftWorld.getChunkAt(CraftWorld.java:228) ~[spigot-1.21.4.jar:4457-Spigot-73860e0-f0c8dd3]
	at org.bukkit.craftbukkit.v1_21_R3.CraftChunk.getEntities(CraftChunk.java:127) ~[spigot-1.21.4.jar:4457-Spigot-73860e0-f0c8dd3]
	at com.froobworld.farmcontrol.controller.CompatibilityListener.onChunkUnload(CompatibilityListener.java:66) ~[?:?]
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
	at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
	[EXCEPTION MESSAGE REPEATS ENDLESSLY. LOOKS LIKE RECURSION?]

This repeats seemingly endlessly and might be related to villagers, but I'm not too sure. Might be something worth keeping in mind. :P

EDIT: I have confirmed that this is indeed a recurring issue even after the provided patch. I made a separate issue for it here.