PorkStudios / Pork2b2tBot

A minecraft bot thing, also works as a proxy!
https://www.daporkchop.net/pork2b2tbot
Other
46 stars 16 forks source link

Error: java.lang.ArrayIndexOutOfBoundsException #32

Closed Rightys closed 4 years ago

Rightys commented 4 years ago

When i start my bot on a linux vps this error pops up

[13/03/2020 08:13:06] [INFO] Loading config... [13/03/2020 08:13:06] [INFO] Config loaded. [13/03/2020 08:13:06] [INFO] Starting Pork2b2tBot v0.2.5... [13/03/2020 08:13:06] [Auth] [INFO] Logging in... [13/03/2020 08:13:07] [Auth] [SUCCESS] Logged in. [13/03/2020 08:13:07] [Auth] [INFO] Logging in... [13/03/2020 08:13:07] [Auth] [SUCCESS] Logged in. [13/03/2020 08:13:07] [Client] [INFO] Connecting to 91.218.64.202:25565... [13/03/2020 08:13:08] [Client] [SUCCESS] Connected to /91.218.64.202:25565! [13/03/2020 08:13:08] [INFO] Saving config... [13/03/2020 08:13:08] [INFO] Config saved. [13/03/2020 08:13:08] [Chat] [INFO]
[13/03/2020 08:13:08] [Chat] [INFO]
[13/03/2020 08:13:08] [Chat] [INFO] Keine Effekte ausgewählt [13/03/2020 08:13:08] [Chat] [INFO] §b§nKlicke hier um das Menu aufzumachen. [13/03/2020 08:13:08] [Chat] [INFO]
[13/03/2020 08:13:08] [Client] [ALERT] **** [13/03/2020 08:13:08] [Client] [ALERT] [13/03/2020 08:13:08] [Client] [ALERT] java.lang.ArrayIndexOutOfBoundsException [13/03/2020 08:13:08] [Client] [ALERT] at java.lang.System.arraycopy(Native Method) [13/03/2020 08:13:08] [Client] [ALERT] at net.daporkchop.toobeetooteebot.client.handler.incoming.SetWindowItemsHandler.apply(SetWindowItemsHandler.java:35) [13/03/2020 08:13:08] [Client] [ALERT] at net.daporkchop.toobeetooteebot.client.handler.incoming.SetWindowItemsHandler.apply(SetWindowItemsHandler.java:30) [13/03/2020 08:13:08] [Client] [ALERT] at net.daporkchop.toobeetooteebot.util.handler.HandlerRegistry.handleInbound(HandlerRegistry.java:61) [13/03/2020 08:13:08] [Client] [ALERT] at net.daporkchop.toobeetooteebot.client.ClientListener.packetReceived(ClientListener.java:52) [13/03/2020 08:13:08] [Client] [ALERT] at com.github.steveice10.packetlib.event.session.PacketReceivedEvent.call(PacketReceivedEvent.java:51) [13/03/2020 08:13:08] [Client] [ALERT] at com.github.steveice10.packetlib.tcp.TcpSession.callEvent(TcpSession.java:143) [13/03/2020 08:13:08] [Client] [ALERT] at com.github.steveice10.packetlib.tcp.TcpSession$3.run(TcpSession.java:343) [13/03/2020 08:13:08] [Client] [ALERT] at java.lang.Thread.run(Thread.java:748) [13/03/2020 08:13:08] [Client] [ALERT] [13/03/2020 08:13:08] [Client] [ALERT] **** [13/03/2020 08:13:08] [Client] [INFO] Disconnecting from server... [13/03/2020 08:13:08] [Client] [ALERT] **** [13/03/2020 08:13:08] [Client] [ALERT] [13/03/2020 08:13:08] [Client] [ALERT] java.lang.ArrayIndexOutOfBoundsException [13/03/2020 08:13:08] [Client] [ALERT] at java.lang.System.arraycopy(Native Method) [13/03/2020 08:13:08] [Client] [ALERT] at net.daporkchop.toobeetooteebot.client.handler.incoming.SetWindowItemsHandler.apply(SetWindowItemsHandler.java:35) [13/03/2020 08:13:08] [Client] [ALERT] at net.daporkchop.toobeetooteebot.client.handler.incoming.SetWindowItemsHandler.apply(SetWindowItemsHandler.java:30) [13/03/2020 08:13:08] [Client] [ALERT] at net.daporkchop.toobeetooteebot.util.handler.HandlerRegistry.handleInbound(HandlerRegistry.java:61) [13/03/2020 08:13:08] [Client] [ALERT] at net.daporkchop.toobeetooteebot.client.ClientListener.packetReceived(ClientListener.java:52) [13/03/2020 08:13:08] [Client] [ALERT] at com.github.steveice10.packetlib.event.session.PacketReceivedEvent.call(PacketReceivedEvent.java:51) [13/03/2020 08:13:08] [Client] [ALERT] at com.github.steveice10.packetlib.tcp.TcpSession.callEvent(TcpSession.java:143) [13/03/2020 08:13:08] [Client] [ALERT] at com.github.steveice10.packetlib.tcp.TcpSession$3.run(TcpSession.java:343) [13/03/2020 08:13:08] [Client] [ALERT] at java.lang.Thread.run(Thread.java:748) [13/03/2020 08:13:08] [Client] [ALERT] [13/03/2020 08:13:08] [Client] [ALERT] **** [13/03/2020 08:13:08] [ALERT] **** [13/03/2020 08:13:08] [ALERT] [13/03/2020 08:13:08] [ALERT] java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException [13/03/2020 08:13:08] [ALERT] at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) [13/03/2020 08:13:08] [ALERT] at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895) [13/03/2020 08:13:08] [ALERT] at net.daporkchop.toobeetooteebot.client.PorkClientSession.getDisconnectReason(PorkClientSession.java:52) [13/03/2020 08:13:08] [ALERT] at net.daporkchop.toobeetooteebot.Bot.start(Bot.java:198) [13/03/2020 08:13:08] [ALERT] at net.daporkchop.toobeetooteebot.Bot.main(Bot.java:97) [13/03/2020 08:13:08] [ALERT] Caused by: java.lang.ArrayIndexOutOfBoundsException [13/03/2020 08:13:08] [ALERT] at java.lang.System.arraycopy(Native Method) [13/03/2020 08:13:08] [ALERT] at net.daporkchop.toobeetooteebot.client.handler.incoming.SetWindowItemsHandler.apply(SetWindowItemsHandler.java:35) [13/03/2020 08:13:08] [ALERT] at net.daporkchop.toobeetooteebot.client.handler.incoming.SetWindowItemsHandler.apply(SetWindowItemsHandler.java:30) [13/03/2020 08:13:08] [ALERT] at net.daporkchop.toobeetooteebot.util.handler.HandlerRegistry.handleInbound(HandlerRegistry.java:61) [13/03/2020 08:13:08] [ALERT] at net.daporkchop.toobeetooteebot.client.ClientListener.packetReceived(ClientListener.java:52) [13/03/2020 08:13:08] [ALERT] at com.github.steveice10.packetlib.event.session.PacketReceivedEvent.call(PacketReceivedEvent.java:51) [13/03/2020 08:13:08] [ALERT] at com.github.steveice10.packetlib.tcp.TcpSession.callEvent(TcpSession.java:143) [13/03/2020 08:13:08] [ALERT] at com.github.steveice10.packetlib.tcp.TcpSession$3.run(TcpSession.java:343) [13/03/2020 08:13:08] [ALERT] at java.lang.Thread.run(Thread.java:748) [13/03/2020 08:13:08] [ALERT] [13/03/2020 08:13:08] [ALERT] ****

DaMatrix commented 4 years ago

Huh, seems like the server is sending invalid inventory updates. I'll look into adding some sort of additional handling for that.