Traveler's Backpack [Fabric]

Traveler's Backpack [Fabric]

13M Downloads

client crash when open backpack interface with already equiped

koshnarek opened this issue ยท 6 comments

commented

[email protected] (both server and client)
[email protected]

playing locally there is no problem. Client only crash if there`s a backpack already equipped and the user open it

stacktrace:

[09Aug2024 11:28:13.798] [Render thread/ERROR] [net.neoforged.neoforge.network.handlers.ClientPayloadHandler/]: Failed to handle advanced open screen from server.
java.lang.IndexOutOfBoundsException: readerIndex(1) + length(1) exceeds writerIndex(1): UnpooledHeapByteBuf(ridx: 1, widx: 1, cap: 1/1)
	at MC-BOOTSTRAP/[email protected]/io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1442) ~[netty-buffer-4.1.97.Final.jar%23133!/:4.1.97.Final]
	at MC-BOOTSTRAP/[email protected]/io.netty.buffer.AbstractByteBuf.readByte(AbstractByteBuf.java:730) ~[netty-buffer-4.1.97.Final.jar%23133!/:4.1.97.Final]
	at MC-BOOTSTRAP/[email protected]/io.netty.buffer.AbstractByteBuf.readBoolean(AbstractByteBuf.java:739) ~[netty-buffer-4.1.97.Final.jar%23133!/:4.1.97.Final]
	at TRANSFORMER/[email protected]/net.minecraft.network.FriendlyByteBuf.readBoolean(FriendlyByteBuf.java:1105) ~[client-1.21-20240613.152323-srg.jar%23299!/:?]
	at **TRANSFORMER/[email protected]/com.tiviacz.travelersbackpack.inventory.menu.TravelersBackpackItemMenu.createInventory(TravelersBackpackItemMenu.java:46) ~[travelersbackpack-neoforge-1.21-10.0.5.jar%23422!/:?]
	at TRANSFORMER/[email protected]/com.tiviacz.travelersbackpack.inventory.menu.TravelersBackpackItemMenu.<init>(TravelersBackpackItemMenu.java:24) ~[travelersbackpack-neoforge-1.21-10.0.5.jar%23422!/:?]**
	at TRANSFORMER/[email protected]/net.minecraft.world.inventory.MenuType.create(MenuType.java:60) ~[client-1.21-20240613.152323-srg.jar%23299!/:?]
	at TRANSFORMER/[email protected]/net.neoforged.neoforge.network.handlers.ClientPayloadHandler.lambda$createMenuScreen$0(ClientPayloadHandler.java:127) ~[neoforge-21.0.167-universal.jar%23300!/:?]
	at java.base/java.util.Optional.ifPresent(Optional.java:178) ~[?:?]
	at TRANSFORMER/[email protected]/net.neoforged.neoforge.network.handlers.ClientPayloadHandler.createMenuScreen(ClientPayloadHandler.java:126) ~[neoforge-21.0.167-universal.jar%23300!/:?]
	at TRANSFORMER/[email protected]/net.neoforged.neoforge.network.handlers.ClientPayloadHandler.handle(ClientPayloadHandler.java:115) ~[neoforge-21.0.167-universal.jar%23300!/:?]
	at TRANSFORMER/[email protected]/net.neoforged.neoforge.network.handling.MainThreadPayloadHandler.lambda$handle$0(MainThreadPayloadHandler.java:16) ~[neoforge-21.0.167-universal.jar%23300!/:?]
	at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.lambda$submitAsync$0(BlockableEventLoop.java:60) ~[client-1.21-20240613.152323-srg.jar%23299!/:?]
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
	at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:148) ~[client-1.21-20240613.152323-srg.jar%23299!/:?]
	at TRANSFORMER/[email protected]/net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:23) ~[client-1.21-20240613.152323-srg.jar%23299!/:?]
	at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:122) ~[client-1.21-20240613.152323-srg.jar%23299!/:?]
	at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.runAllTasks(BlockableEventLoop.java:111) ~[client-1.21-20240613.152323-srg.jar%23299!/:?]
	at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.runTick(Minecraft.java:1155) ~[client-1.21-20240613.152323-srg.jar%23299!/:?]
	at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.run(Minecraft.java:807) ~[client-1.21-20240613.152323-srg.jar%23299!/:?]
	at TRANSFORMER/[email protected]/net.minecraft.client.main.Main.main(Main.java:230) ~[client-1.21-20240613.152323-srg.jar%23299!/:?]
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
	at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
	at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:136) ~[loader-4.0.23.jar%23108!/:4.0]
	at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.loading.targets.CommonLaunchHandler.clientService(CommonLaunchHandler.java:124) ~[loader-4.0.23.jar%23108!/:4.0]
	at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.loading.targets.CommonClientLaunchHandler.runService(CommonClientLaunchHandler.java:32) ~[loader-4.0.23.jar%23108!/:4.0]
	at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.loading.targets.CommonLaunchHandler.lambda$launchService$4(CommonLaunchHandler.java:118) ~[loader-4.0.23.jar%23108!/:4.0]
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [modlauncher-11.0.4.jar%2390!/:?]
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-11.0.4.jar%2390!/:?]
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-11.0.4.jar%2390!/:?]
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:103) [modlauncher-11.0.4.jar%2390!/:?]
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:74) [modlauncher-11.0.4.jar%2390!/:?]
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-11.0.4.jar%2390!/:?]
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-11.0.4.jar%2390!/:?]
	at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.run(BootstrapLauncher.java:210) [bootstraplauncher-2.0.2.jar:?]
	at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:69) [bootstraplauncher-2.0.2.jar:?]
commented

post full crashlog

commented

@Tiviacz1337 the client doesn`t generate one, it just disconect from the server and log the presented stacktrace

commented

Are you sure you updated the mod on client and server too?

commented

@Tiviacz1337 absolutely sure...

I do some tests removing the mod from client and server (to force player lose the equipped backpack, since standalone the problem does not occur)... than ,I reinstalled the mod, restart again, and player was able to see a new backpack equipped (but not the old one)... after that, the error was no longer reproducible :s

commented

so it works correctly now?

commented

@Tiviacz1337 yeah... maybe something with the upgrade (both server and client was updated today from neoforge 146 to 167... the only problem was the loss of the items inside the equipped backpack when the crash occurs.. but since it is a family server: a little change on the gamemode "forcelly" restore it :)