Skip to content

Inventory Click cause error #82

@HookWoods

Description

@HookWoods

There is actually a bug when you open your inventory and click on any slot of your inventory it will spam console with this logs

[00:26:59 Error]java.lang.NullPointerException: Cannot invoke "com.loohp.limbo.inventory.Inventory.getSize()" because "this.topInventory" is null
[00:26:59 Error]        at com.loohp.limbo.inventory.InventoryView.getInventory(InventoryView.java:114)
[00:26:59 Error]        at com.loohp.limbo.events.inventory.InventoryClickEvent.<init>(InventoryClickEvent.java:41)
[00:26:59 Error]        at com.loohp.limbo.utils.InventoryClickUtils.handle(InventoryClickUtils.java:307)
[00:26:59 Error]        at com.loohp.limbo.network.ClientConnection.run(ClientConnection.java:785)

Also related to this error sometimes the client is disconnected with this error:

io.netty.handler.codec.DecoderException: Failed to decode packet 'clientbound/minecraft:container_set_slot'
	at Genesis//net.minecraft.network.codec.IdDispatchCodec.decode(SourceFile:41)
	at Genesis//net.minecraft.network.codec.IdDispatchCodec.decode(SourceFile:14)
	at Genesis//net.minecraft.network.PacketDecoder.decode(SourceFile:33)
	at Genesis//io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:530)
	at Genesis//io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:469)
	at Genesis//io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
	at Genesis//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
	at Genesis//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
	at Genesis//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
	at Genesis//io.netty.handler.flow.FlowControlHandler.dequeue(FlowControlHandler.java:202)
	at Genesis//io.netty.handler.flow.FlowControlHandler.channelRead(FlowControlHandler.java:164)
	at Genesis//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
	at Genesis//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
	at Genesis//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
	at Genesis//io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
	at Genesis//io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
	at Genesis//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
	at Genesis//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
	at Genesis//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
	at Genesis//io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
	at Genesis//io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:333)
	at Genesis//io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:455)
	at Genesis//io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
	at Genesis//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
	at Genesis//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
	at Genesis//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
	at Genesis//io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:107)
	at Genesis//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
	at Genesis//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
	at Genesis//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
	at Genesis//io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:289)
	at Genesis//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
	at Genesis//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
	at Genesis//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
	at Genesis//io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1357)
	at Genesis//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
	at Genesis//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
	at Genesis//io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:868)
	at Genesis//io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
	at Genesis//io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:796)
	at Genesis//io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:732)
	at Genesis//io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:658)
	at Genesis//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
	at Genesis//io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:998)
	at Genesis//io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: VarInt too big
	at Genesis//net.minecraft.network.VarInt.read(SourceFile:33)
	at Genesis//net.minecraft.network.FriendlyByteBuf.readContainerId(SourceFile:721)
	at Genesis//net.minecraft.network.FriendlyByteBuf.readContainerId(SourceFile:725)
	at Genesis//net.minecraft.network.protocol.game.ClientboundContainerSetSlotPacket.<init>(SourceFile:25)
	at Genesis//net.minecraft.network.codec.StreamCodec$9.decode(SourceFile:40)
	at Genesis//net.minecraft.network.codec.StreamCodec$12.decode(SourceFile:94)
	at Genesis//net.minecraft.network.codec.StreamCodec$12.decode(SourceFile:90)
	at Genesis//net.minecraft.network.codec.IdDispatchCodec.decode(SourceFile:36)
	... 45 more

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions