Traveler's Backpack

Traveler's Backpack

32M Downloads

Error executing task on Server java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds

alexweber opened this issue ยท 3 comments

commented
  1. ALWAYS PROVIDE INFORMATION ABOUT MODLOADER (Fabric / Forge) AND MOD VERSION (For Example 1.19.2-8.2.10)

Fabric 1.20.1 using backpack 9.1.9

  1. Describe the bug

Server crashes randomly and console log gets littered with this error

Error executing task on Server
java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
        at com.tiviacz.travelersbackpack.common.ServerActions.swapTool(ServerActions.java:99)

Here's the full stack trace:

[Server thread/ERROR]: Error executing task on Server
java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
        at com.tiviacz.travelersbackpack.common.ServerActions.swapTool(ServerActions.java:99) ~[travelers-backpack-1.20.1-9.1.9.jar:?]
        at com.tiviacz.travelersbackpack.init.ModNetwork.lambda$initServer$7(ModNetwork.java:139) ~[travelers-backpack-1.20.1-9.1.9.jar:?]
        at net.minecraft.class_3738.run(class_3738.java:18) ~[server-intermediary.jar:?]
        at net.minecraft.class_1255.method_18859(class_1255.java:156) ~[server-intermediary.jar:?]
        at net.minecraft.class_4093.method_18859(class_4093.java:23) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_24306(MinecraftServer.java:782) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_18859(MinecraftServer.java:164) ~[server-intermediary.jar:?]
        at net.minecraft.class_1255.method_16075(class_1255.java:130) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:764) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:758) ~[server-intermediary.jar:?]
        at net.minecraft.class_1255.method_18857(class_1255.java:139) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:743) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:675) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:265) ~[server-intermediary.jar:?]
        at java.lang.Thread.run(Thread.java:840) ~[?:?]
  1. Write steps to reproduce the bug

Not sure, but something to do with the recent tool changes has caused this, it didn't occur on earlier versions.

  1. What is expected behaviour

Not crashing server :)

  1. Screenshots (If applicable)
commented

Did you update mod on server & client?

commented

Did you update mod on server & client?

Yep. both running same version exactly travelers-backpack-1.20.1-9.1.9.jar

It doesn't happen on every tool switch, but I've noticed that the tools keep getting shuffled around, ie: if you remove one from the top slot after a bit they all get shifted up and the empty slot becomes the bottom one.

I unfortunately can't provide any more info right now as I won't be able to play until the weekend but happy to do whatever to help if possible.

Again, suspicous it has to do with the change Tool slots can be accessed without need to removing latest tool