DashieDev / DoggyTalentsNext

The Art of Minecraft Wolf.
GNU Lesser General Public License v3.0
14 stars 4 forks source link

Serious bug on Fabric 1.20.1 that permanently corrupts the server #16 #70

Closed NovaViper closed 7 months ago

NovaViper commented 7 months ago

Hey I and my friend encountered a really serious bug whenever we interact with the dog artifacts menu. Since we just started a new server on Fabric, we got the starting items and clicked on the radio collar icon that's in the menu, and it immediately kicks everyone out of the server with the following error below. And the worse thing is, it's a permanent bug because there's no way to make the dog reset as the moment the owner tries to rejoin, the server kicks them back out with the same error.

[22:24:52] [Netty Epoll Client IO #0/ERROR]: Encountered exception while handling in channel with name "doggytalents:channel"
java.lang.IndexOutOfBoundsException: readerIndex(21) + length(4) exceeds writerIndex(21): UnpooledSlicedByteBuf(ridx: 21, widx: 21, cap: 21/21, unwrapped: PooledUnsafeDirectByteBuf(ridx: 0, widx: 21, cap: 21))
    at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1442) ~[netty-buffer-4.1.82.Final.jar:?]
    at io.netty.buffer.AbstractByteBuf.readInt(AbstractByteBuf.java:809) ~[netty-buffer-4.1.82.Final.jar:?]
    at net.minecraft.class_2540.readInt(class_2540.java:1353) ~[client-intermediary.jar:?]
    at doggytalents.common.network.packet.DogSyncDataPacket.decode(DogSyncDataPacket.java:71) ~[DoggyTalentsNext%5BFabric%5D-1.20.1-1.18.8.jar:?]
    at doggytalents.common.network.packet.DogSyncDataPacket.decode(DogSyncDataPacket.java:15) ~[DoggyTalentsNext%5BFabric%5D-1.20.1-1.18.8.jar:?]
    at doggytalents.forge_imitate.network.ForgeNetworkHandler$PacketCodec.decodeAndConsume(ForgeNetworkHandler.java:67) ~[DoggyTalentsNext%5BFabric%5D-1.20.1-1.18.8.jar:?]
    at doggytalents.forge_imitate.network.ForgeNetworkHandler.onToClientPacket(ForgeNetworkHandler.java:126) ~[DoggyTalentsNext%5BFabric%5D-1.20.1-1.18.8.jar:?]
    at doggytalents.forge_imitate.client.ForgeNetworkHandlerClient.lambda$initClient$0(ForgeNetworkHandlerClient.java:12) ~[DoggyTalentsNext%5BFabric%5D-1.20.1-1.18.8.jar:?]
    at net.fabricmc.fabric.impl.networking.client.ClientPlayNetworkAddon.receive(ClientPlayNetworkAddon.java:98) ~[fabric-networking-api-v1-1.3.11+1802ada577-4657550f9c265bf4.jar:?]
    at net.fabricmc.fabric.impl.networking.client.ClientPlayNetworkAddon.receive(ClientPlayNetworkAddon.java:40) ~[fabric-networking-api-v1-1.3.11+1802ada577-4657550f9c265bf4.jar:?]
    at net.fabricmc.fabric.impl.networking.AbstractChanneledNetworkAddon.handle(AbstractChanneledNetworkAddon.java:101) ~[fabric-networking-api-v1-1.3.11+1802ada577-4657550f9c265bf4.jar:?]
    at net.fabricmc.fabric.impl.networking.client.ClientPlayNetworkAddon.handle(ClientPlayNetworkAddon.java:90) ~[fabric-networking-api-v1-1.3.11+1802ada577-4657550f9c265bf4.jar:?]
    at net.minecraft.class_634.handler$ckd000$fabric-networking-api-v1$handleCustomPayload(class_634.java:3768) ~[client-intermediary.jar:?]
    at net.minecraft.class_634.method_11152(class_634.java) ~[client-intermediary.jar:?]
    at net.minecraft.class_2658.method_11457(class_2658.java:60) ~[client-intermediary.jar:?]
    at net.minecraft.class_2658.method_11054(class_2658.java:8) ~[client-intermediary.jar:?]
    at net.minecraft.class_2535.method_10759(class_2535.java:175) ~[client-intermediary.jar:?]
    at net.minecraft.class_2535.method_10770(class_2535.java:160) ~[client-intermediary.jar:?]
    at net.minecraft.class_2535.channelRead0(class_2535.java:52) ~[client-intermediary.jar:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[netty-codec-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:336) ~[netty-codec-4.1.82.Final.jar:?]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:308) ~[netty-codec-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:336) ~[netty-codec-4.1.82.Final.jar:?]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:308) ~[netty-codec-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:336) ~[netty-codec-4.1.82.Final.jar:?]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:308) ~[netty-codec-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[netty-codec-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) ~[netty-handler-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:800) ~[netty-transport-classes-epoll-4.1.82.Final.jar:?]
    at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:499) ~[netty-transport-classes-epoll-4.1.82.Final.jar:?]
    at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:397) ~[netty-transport-classes-epoll-4.1.82.Final.jar:?]
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.82.Final.jar:?]
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.82.Final.jar:?]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]

Mod List: PrismLauncher.txt

It gets even stranger, when I just have DoggyTalents by itself and I add the radio collar to the dog, it for some reason selects the hot dog costume and not the radio collar at all. image

And it oddly shows both the hotdog costume and the radio collar is added image

Edit: And using any other item results in the world instantly crashing with similar errors as mentioned before (the screen of the errors look like this) image Client logs

[22:43:30] [Netty Epoll Client IO #0/ERROR]: Encountered exception while handling in channel with name "doggytalents:channel"
java.lang.IndexOutOfBoundsException: readerIndex(21) + length(4) exceeds writerIndex(21): UnpooledSlicedByteBuf(ridx: 21, widx: 21, cap: 21/21, unwrapped: PooledUnsafeDirectByteBuf(ridx: 0, widx: 21, cap: 21))
    at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1442) ~[netty-buffer-4.1.82.Final.jar:?]
    at io.netty.buffer.AbstractByteBuf.readInt(AbstractByteBuf.java:809) ~[netty-buffer-4.1.82.Final.jar:?]
    at net.minecraft.class_2540.readInt(class_2540.java:1353) ~[client-intermediary.jar:?]
    at doggytalents.common.network.packet.DogSyncDataPacket.decode(DogSyncDataPacket.java:71) ~[DoggyTalentsNext%5BFabric%5D-1.20.1-1.18.8.jar:?]
    at doggytalents.common.network.packet.DogSyncDataPacket.decode(DogSyncDataPacket.java:15) ~[DoggyTalentsNext%5BFabric%5D-1.20.1-1.18.8.jar:?]
    at doggytalents.forge_imitate.network.ForgeNetworkHandler$PacketCodec.decodeAndConsume(ForgeNetworkHandler.java:67) ~[DoggyTalentsNext%5BFabric%5D-1.20.1-1.18.8.jar:?]
    at doggytalents.forge_imitate.network.ForgeNetworkHandler.onToClientPacket(ForgeNetworkHandler.java:126) ~[DoggyTalentsNext%5BFabric%5D-1.20.1-1.18.8.jar:?]
    at doggytalents.forge_imitate.client.ForgeNetworkHandlerClient.lambda$initClient$0(ForgeNetworkHandlerClient.java:12) ~[DoggyTalentsNext%5BFabric%5D-1.20.1-1.18.8.jar:?]
    at net.fabricmc.fabric.impl.networking.client.ClientPlayNetworkAddon.receive(ClientPlayNetworkAddon.java:98) ~[fabric-networking-api-v1-1.3.11+1802ada577-4657550f9c265bf4.jar:?]
    at net.fabricmc.fabric.impl.networking.client.ClientPlayNetworkAddon.receive(ClientPlayNetworkAddon.java:40) ~[fabric-networking-api-v1-1.3.11+1802ada577-4657550f9c265bf4.jar:?]
    at net.fabricmc.fabric.impl.networking.AbstractChanneledNetworkAddon.handle(AbstractChanneledNetworkAddon.java:101) ~[fabric-networking-api-v1-1.3.11+1802ada577-4657550f9c265bf4.jar:?]
    at net.fabricmc.fabric.impl.networking.client.ClientPlayNetworkAddon.handle(ClientPlayNetworkAddon.java:90) ~[fabric-networking-api-v1-1.3.11+1802ada577-4657550f9c265bf4.jar:?]
    at net.minecraft.class_634.handler$zgm000$fabric-networking-api-v1$handleCustomPayload(class_634.java:3268) ~[client-intermediary.jar:?]
    at net.minecraft.class_634.method_11152(class_634.java) ~[client-intermediary.jar:?]
    at net.minecraft.class_2658.method_11457(class_2658.java:60) ~[client-intermediary.jar:?]
    at net.minecraft.class_2658.method_11054(class_2658.java:8) ~[client-intermediary.jar:?]
    at net.minecraft.class_2535.method_10759(class_2535.java:175) ~[client-intermediary.jar:?]
    at net.minecraft.class_2535.method_10770(class_2535.java:160) ~[client-intermediary.jar:?]
    at net.minecraft.class_2535.channelRead0(class_2535.java:52) ~[client-intermediary.jar:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[netty-codec-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:336) ~[netty-codec-4.1.82.Final.jar:?]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:308) ~[netty-codec-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:336) ~[netty-codec-4.1.82.Final.jar:?]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:308) ~[netty-codec-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:336) ~[netty-codec-4.1.82.Final.jar:?]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:308) ~[netty-codec-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[netty-codec-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) ~[netty-handler-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.82.Final.jar:?]
    at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:800) ~[netty-transport-classes-epoll-4.1.82.Final.jar:?]
    at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:499) ~[netty-transport-classes-epoll-4.1.82.Final.jar:?]
    at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:397) ~[netty-transport-classes-epoll-4.1.82.Final.jar:?]
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.82.Final.jar:?]
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.82.Final.jar:?]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]
DashieDev commented 7 months ago

I am terribly sorry for the inconvinience, This bug is fixed in DTN 1.18.10, I forgot to enable sync for DTN's custom registries. I have uploaded the file on Curseforge and it will be on modrinth shortly.

DashieDev commented 7 months ago

File uploaded to Modrinth, the server will let you in after you update. It was my first tap into the Fabric realm as opposed to Forge, so it does get critically bugged in the first version, please understand 😅

NovaViper commented 7 months ago

@DashieDev It's all good! Porting over mods between different mod loaders (especially when you haven't used the other modloader before) is pretty hard, so I definitely understand!

DashieDev commented 7 months ago

I will assume this has been resolved and will close this now, feel free to re-open if you still face the problem.

V-lpen commented 1 month ago

Hi! I'm using DTN 1.18.29 fabric on quilt and am receiving the crash. https://mclo.gs/TxQlok6 2024-09-11_08 49 30 Happened after giving one of my dogs a training treat

DashieDev commented 1 month ago

Are you on a multiplayer server or singleplayer world ?

V-lpen commented 1 month ago

Multiplayer, let me get the server log https://mclo.gs/Pp8IXWk can confirm it works fine in singleplayer too ignore the usernames lol

DashieDev commented 1 month ago

Weird, i was testing on a fabric dedicated server on the newest version 1.18.31 and it is working fine on my side......... Will investigate further when i have the chance.

V-lpen commented 1 month ago

Could it be quilt? or maybe one of the server-side mods? I guess I can do a binary search til i find the issue

V-lpen commented 1 month ago

More testing, this seems to be a quilt issue. The server seems to not be making any logs from this, only the client. https://mclo.gs/L1MPp6i This is a clean install with just QFAPI, DTN and Forgeconfigapi And this only occurs on dedicated server

V-lpen commented 4 weeks ago

Hi! Did you ever look into fixing this on quilt?