Building Wands

Building Wands

6M Downloads

[1.20.4] Crash after pressing "Orientation" key, IndexOutOfBoundsException

slime-girl opened this issue ยท 0 comments

commented

Using a Creative wand, I was using the Circle tool. Since the default keybind for Orientation is X, which is also used for the Hotbar Activator from vanilla, I went into my settings and Reset the hotbar activator keybind so X only went to Wands.

I pressed X and got a crash. I got readerIndex(17) + length(4) exceeds writerIndex(17).

I can reproduce this.

Traceback

[18:47:43] [Netty Local Client IO #4/ERROR]: Encountered exception while handling in channel with name "wands:state_packet"
java.lang.IndexOutOfBoundsException: readerIndex(17) + length(4) exceeds writerIndex(17): UnpooledByteBufAllocator$InstrumentedUnpooledUnsafeHeapByteBuf(ridx: 17, widx: 17, cap: 17)
	at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1442) ~[netty-buffer-4.1.97.Final.jar:?]
	at io.netty.buffer.AbstractByteBuf.readInt(AbstractByteBuf.java:809) ~[netty-buffer-4.1.97.Final.jar:?]
	at net.minecraft.class_2540.readInt(class_2540.java:1318) ~[client-intermediary.jar:?]
	at net.nicguzzo.wands.client.WandsModClient.lambda$initialize$6(WandsModClient.java:200) ~[BuildingWands-mc1.20.4-2.6.9-release.jar:?]
	at dev.architectury.networking.fabric.NetworkManagerImpl$1.lambda$receive$0(NetworkManagerImpl.java:102) ~[architectury-11.1.17-fabric.jar:?]
	at dev.architectury.networking.transformers.PacketTransformer$1.inbound(PacketTransformer.java:47) ~[architectury-11.1.17-fabric.jar:?]
	at dev.architectury.networking.fabric.NetworkManagerImpl$1.receive(NetworkManagerImpl.java:97) ~[architectury-11.1.17-fabric.jar:?]
	at net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking.lambda$wrapUntyped$0(ClientPlayNetworking.java:374) ~[fabric-networking-api-v1-3.1.8+2e5ac5484f-f085a2cd2ccf2cb1.jar:?]
	at net.fabricmc.fabric.impl.networking.client.ClientPlayNetworkAddon.receive(ClientPlayNetworkAddon.java:77) ~[fabric-networking-api-v1-3.1.8+2e5ac5484f-f085a2cd2ccf2cb1.jar:?]
	at net.fabricmc.fabric.impl.networking.client.ClientPlayNetworkAddon.receive(ClientPlayNetworkAddon.java:42) ~[fabric-networking-api-v1-3.1.8+2e5ac5484f-f085a2cd2ccf2cb1.jar:?]
	at net.fabricmc.fabric.impl.networking.AbstractChanneledNetworkAddon.handle(AbstractChanneledNetworkAddon.java:99) ~[fabric-networking-api-v1-3.1.8+2e5ac5484f-f085a2cd2ccf2cb1.jar:?]
	at net.minecraft.class_8673.handler$zll000$fabric-networking-api-v1$onCustomPayload(class_8673.java:1048) ~[client-intermediary.jar:?]
	at net.minecraft.class_8673.method_52780(class_8673.java) ~[client-intermediary.jar:?]
	at net.minecraft.class_2658.method_53024(class_2658.java:94) ~[client-intermediary.jar:?]
	at net.minecraft.class_2658.method_11054(class_2658.java:32) ~[client-intermediary.jar:?]
	at net.minecraft.class_2535.method_10759(class_2535.java:196) ~[client-intermediary.jar:?]
	at net.minecraft.class_2535.method_10770(class_2535.java:181) ~[client-intermediary.jar:?]
	at net.minecraft.class_2535.channelRead0(class_2535.java:60) ~[client-intermediary.jar:?]
	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99) ~[netty-transport-4.1.97.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.97.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.97.Final.jar:?]
	at io.netty.handler.flow.FlowControlHandler.dequeue(FlowControlHandler.java:202) ~[netty-handler-4.1.97.Final.jar:?]
	at io.netty.handler.flow.FlowControlHandler.channelRead(FlowControlHandler.java:164) ~[netty-handler-4.1.97.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[netty-transport-4.1.97.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.97.Final.jar:?]
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[netty-codec-4.1.97.Final.jar:?]
	at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[netty-codec-4.1.97.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[netty-transport-4.1.97.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.97.Final.jar:?]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.97.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[netty-transport-4.1.97.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:?]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.97.Final.jar:?]
	at io.netty.channel.local.LocalChannel.readInbound(LocalChannel.java:299) ~[netty-transport-4.1.97.Final.jar:?]
	at io.netty.channel.local.LocalChannel.finishPeerRead0(LocalChannel.java:445) ~[netty-transport-4.1.97.Final.jar:?]
	at io.netty.channel.local.LocalChannel.access$400(LocalChannel.java:50) ~[netty-transport-4.1.97.Final.jar:?]
	at io.netty.channel.local.LocalChannel$5.run(LocalChannel.java:403) ~[netty-transport-4.1.97.Final.jar:?]
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[netty-common-4.1.97.Final.jar:?]
	at io.netty.channel.DefaultEventLoop.run(DefaultEventLoop.java:54) ~[netty-transport-4.1.97.Final.jar:?]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.97.Final.jar:?]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.97.Final.jar:?]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]

I can work around this by just changing the orientation in the menu instead of using the key.

Versions

[16:40:22] [main/INFO]: Loading Minecraft 1.20.4 with Fabric Loader 0.16.2

[16:40:22] [main/INFO]: Loading 62 mods:
	- architectury 11.1.17
	- badoptimizations 2.1.4
	- cloth-config 13.0.121
	   \-- cloth-basic-math 0.6.1
	- fabric-api 0.97.1+1.20.4
	   |-- fabric-api-base 0.4.37+78d798af4f
	   |-- fabric-api-lookup-api-v1 1.6.50+82b1bb3e4f
	   |-- fabric-biome-api-v1 13.0.17+78d798af4f
	   |-- fabric-block-api-v1 1.0.17+3e2216cb4f
	   |-- fabric-block-view-api-v2 1.0.5+78d798af4f
	   |-- fabric-blockrenderlayer-v1 1.1.47+78d798af4f
	   |-- fabric-client-tags-api-v1 1.1.8+78d798af4f
	   |-- fabric-command-api-v1 1.2.42+f71b366f4f
	   |-- fabric-command-api-v2 2.2.21+78d798af4f
	   |-- fabric-commands-v0 0.2.59+df3654b34f
	   |-- fabric-containers-v0 0.1.87+df3654b34f
	   |-- fabric-content-registries-v0 5.0.16+78d798af4f
	   |-- fabric-convention-tags-v1 1.5.11+78d798af4f
	   |-- fabric-crash-report-info-v1 0.2.24+78d798af4f
	   |-- fabric-data-attachment-api-v1 1.1.5+b90db5744f
	   |-- fabric-data-generation-api-v1 13.2.5+5c0133444f
	   |-- fabric-dimensions-v1 2.1.63+6605d1a84f
	   |-- fabric-entity-events-v1 1.6.2+09fc25014f
	   |-- fabric-events-interaction-v0 0.7.2+389931eb4f
	   |-- fabric-events-lifecycle-v0 0.2.75+df3654b34f
	   |-- fabric-game-rule-api-v1 1.0.47+78d798af4f
	   |-- fabric-item-api-v1 2.3.0+bcdd12964f
	   |-- fabric-item-group-api-v1 4.0.27+ee30b13a4f
	   |-- fabric-key-binding-api-v1 1.0.42+78d798af4f
	   |-- fabric-keybindings-v0 0.2.40+df3654b34f
	   |-- fabric-lifecycle-events-v1 2.3.1+a67ffb5d4f
	   |-- fabric-loot-api-v2 2.1.10+78d798af4f
	   |-- fabric-message-api-v1 6.0.6+78d798af4f
	   |-- fabric-mining-level-api-v1 2.1.66+78d798af4f
	   |-- fabric-model-loading-api-v1 1.0.9+78d798af4f
	   |-- fabric-models-v0 0.4.8+9386d8a74f
	   |-- fabric-networking-api-v1 3.1.8+2e5ac5484f
	   |-- fabric-object-builder-api-v1 13.1.0+dba1195c4f
	   |-- fabric-particles-v1 1.1.8+78d798af4f
	   |-- fabric-recipe-api-v1 2.0.21+78d798af4f
	   |-- fabric-registry-sync-v0 4.0.20+ee30b13a4f
	   |-- fabric-renderer-api-v1 3.2.5+78d798af4f
	   |-- fabric-renderer-indigo 1.5.6+d331d3144f
	   |-- fabric-renderer-registries-v1 3.2.54+df3654b34f
	   |-- fabric-rendering-data-attachment-v1 0.3.43+73761d2e4f
	   |-- fabric-rendering-fluids-v1 3.1.2+e761c6694f
	   |-- fabric-rendering-v0 1.1.57+df3654b34f
	   |-- fabric-rendering-v1 3.2.1+6fd945a04f
	   |-- fabric-resource-conditions-api-v1 2.3.15+78d798af4f
	   |-- fabric-resource-loader-v0 0.11.21+ee30b13a4f
	   |-- fabric-screen-api-v1 2.0.18+78d798af4f
	   |-- fabric-screen-handler-api-v1 1.3.56+78d798af4f
	   |-- fabric-sound-api-v1 1.0.18+78d798af4f
	   |-- fabric-transfer-api-v1 4.0.12+90f2d7b14f
	   \-- fabric-transitive-access-wideners-v1 5.0.15+78d798af4f
	- fabricloader 0.16.2
	   \-- mixinextras 0.4.1
	- java 17
	- lithium 0.12.1
	- minecraft 1.20.4
	- sodium 0.5.8+mc1.20.4
	- wands 2.6.9-release