Spectator Bug
HolyPacket opened this issue · 2 comments
Go to the Spectator gamemode and click next to the inventory and it throws this error
java.lang.IndexOutOfBoundsException
at java.base/java.nio.Buffer.checkIndex(Buffer.java:749)
at java.base/java.nio.DirectByteBuffer.getLong(DirectByteBuffer.java:792)
at net.minestom.server.network.NetworkBufferTypes.lambda$static$11(NetworkBufferTypes.java:92)
at net.minestom.server.network.NetworkBuffer.read(NetworkBuffer.java:119)
at net.minestom.server.network.NetworkBufferTypes.lambda$static$31(NetworkBufferTypes.java:303)
at net.minestom.server.network.NetworkBuffer.read(NetworkBuffer.java:119)
at net.minestom.server.crypto.ChatSession.(ChatSession.java:10)
at net.minestom.server.network.packet.client.play.ClientChatSessionUpdatePacket.(ClientChatSessionUpdatePacket.java:10)
at net.minestom.server.network.packet.client.ClientPacketsHandler.create(ClientPacketsHandler.java:35)
at net.minestom.server.network.PacketProcessor.create(PacketProcessor.java:32)
at net.minestom.server.network.PacketProcessor.process(PacketProcessor.java:45)
at net.minestom.server.network.player.PlayerSocketConnection.lambda$processPackets$0(PlayerSocketConnection.java:109)
at net.minestom.server.utils.PacketUtils.readPackets(PacketUtils.java:230)
at net.minestom.server.network.player.PlayerSocketConnection.processPackets(PlayerSocketConnection.java:103)
at net.minestom.server.network.socket.Worker.lambda$run$0(Worker.java:79)
at java.base/sun.nio.ch.SelectorImpl.processReadyEvents(SelectorImpl.java:294)
at java.base/sun.nio.ch.WEPollSelectorImpl.processEvents(WEPollSelectorImpl.java:180)
at java.base/sun.nio.ch.WEPollSelectorImpl.doSelect(WEPollSelectorImpl.java:116)
at java.base/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:129)
at java.base/sun.nio.ch.SelectorImpl.select(SelectorImpl.java:161)
at net.minestom.server.network.socket.Worker.run(Worker.java:59)
[Ms-worker-1] [17:30:38] (PlayerSocketConnection.lambda$processPackets$0) - WARN - WARNING: Packet 0x20 not fully read (java.nio.DirectByteBuffer[pos=1 lim=5 cap=5]) null
Your stacktrace is not really related to the spectator mode. At the moment there is an issue with the ChatSession
I suspect that I have found the problem. I will test the fix which will take some time.