Skip to content

Chest Peeker causes IndexOutOfBoundsException #149

@NineOfGaming

Description

@NineOfGaming

Describe the bug
Chest Peeker sometimes causes an IndexOutOfBoundsException when clicking an item in a gui

To Reproduce
Steps to reproduce the behavior:

  1. Open a chest or menu
  2. Click on an item
  3. Close the chest/menu
  4. Open the chest/menu again
  5. click on an item (same or different one doesnt matter)
  6. Exception

Expected behavior
No exception

Error message
Network Exception Caught
java.lang.IndexOutOfBoundsException: Index 54 out of bounds for length 46
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
at java.base/java.util.Objects.checkIndex(Objects.java:385)
at java.base/java.util.ArrayList.get(ArrayList.java:427)
at knot//net.minecraft.class_2371.get(class_2371.java:44)
at knot//net.minecraft.class_1703.method_7611(class_1703.java:326)
at knot//dev.dfonline.codeclient.dev.overlay.ChestPeeker.onReceivePacket(ChestPeeker.java:123)
at knot//dev.dfonline.codeclient.CodeClient.handlePacket(CodeClient.java:284)
at knot//net.minecraft.class_2535.handler$zhb000$codeclient$handlePacket(class_2535.java:709)
at knot//net.minecraft.class_2535.method_10759(class_2535.java)
at knot//net.minecraft.class_2535.method_10770(class_2535.java:166)
at knot//net.minecraft.class_2535.channelRead0(class_2535.java:58)
at knot//io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
at knot//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:356)
at knot//io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:107)
at knot//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:356)
at knot//io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:107)
at knot//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:356)
at knot//io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
at knot//io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
at knot//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:356)
at knot//io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93)
at knot//gg.essential.cosmetics.IngameEquippedOutfitsUpdateDispatcher$OurChannelHandlerImpl.channelRead(IngameEquippedOutfitsUpdateDispatcher.kt:191)
at knot//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:356)
at knot//io.netty.handler.flow.FlowControlHandler.dequeue(FlowControlHandler.java:201)
at knot//io.netty.handler.flow.FlowControlHandler.channelRead(FlowControlHandler.java:163)
at knot//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:354)
at knot//io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
at knot//io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
at knot//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:356)
at knot//io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
at knot//io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:333)
at knot//io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:455)
at knot//io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
at knot//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:356)
at knot//io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:107)
at knot//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:356)
at knot//io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:293)
at knot//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:354)
at knot//io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1429)
at knot//io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:918)
at knot//io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:168)
at knot//io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.handle(AbstractNioChannel.java:445)
at knot//io.netty.channel.nio.NioIoHandler$DefaultNioRegistration.handle(NioIoHandler.java:388)
at knot//io.netty.channel.nio.NioIoHandler.processSelectedKey(NioIoHandler.java:596)
at knot//io.netty.channel.nio.NioIoHandler.processSelectedKeysOptimized(NioIoHandler.java:571)
at knot//io.netty.channel.nio.NioIoHandler.processSelectedKeys(NioIoHandler.java:512)
at knot//io.netty.channel.nio.NioIoHandler.run(NioIoHandler.java:484)
at knot//io.netty.channel.SingleThreadIoEventLoop.runIo(SingleThreadIoEventLoop.java:225)
at knot//io.netty.channel.SingleThreadIoEventLoop.run(SingleThreadIoEventLoop.java:196)
at knot//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:1193)
at knot//io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at java.base/java.lang.Thread.run(Thread.java:1583)

Checks
Please check all these for more infomation with the bug.

  • I am using the latest version.
  • I have tried disabling various options to see if they cause the issue, such as new ones or ones I have recently enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions