Ledger icon indicating copy to clipboard operation
Ledger copied to clipboard

server crash with reinforced chests

Open vaniron opened this issue 1 year ago • 10 comments

Expected behavior

Happens when inserting more items at once, other storage mods are fine. Putting those chest into blacklist doesnt help, puting item-insert action on blacklist doesnt help either.

Description: Exception in server tick loop

java.lang.NullPointerException: Parameter specified as non-null is null: method com.github.quiltservertools.ledger.callbacks.ItemRemoveCallback$DefaultImpls.EVENT$lambda$1$lambda$0, parameter pos
	at knot//com.github.quiltservertools.ledger.callbacks.ItemRemoveCallback$DefaultImpls.EVENT$lambda$1$lambda$0(ItemRemoveCallback.kt)
	at knot//MC//net.minecraft.screen.ScreenHandler.handler$cip000$ledger$ledgerCloseScreenLogChanges(ScreenHandler.java:1945)
	at knot//MC//net.minecraft.screen.ScreenHandler.onClosed(ScreenHandler.java:569)
	at knot//atonkish.reinfcore.screen.ReinforcedStorageScreenHandler.onClosed(ReinforcedStorageScreenHandler.java:208)
	at knot//MC//net.minecraft.server.network.ServerPlayerEntity.onHandledScreenClosed(ServerPlayerEntity.java:1219)
	at knot//MC//net.minecraft.entity.player.PlayerEntity.remove(PlayerEntity.java:1454)
	at knot//MC//net.minecraft.server.world.ServerWorld.removePlayer(ServerWorld.java:953)
	at knot//MC//net.minecraft.server.PlayerManager.remove(PlayerManager.java:393)
	at knot//MC//net.minecraft.server.network.ServerPlayNetworkHandler.cleanUp(ServerPlayNetworkHandler.java:1250)
	at knot//MC//net.minecraft.server.network.ServerPlayNetworkHandler.onDisconnected(ServerPlayNetworkHandler.java:1239)
	at knot//MC//net.minecraft.network.ClientConnection.handleDisconnection(ClientConnection.java:673)
	at knot//MC//net.minecraft.server.ServerNetworkIo.tick(ServerNetworkIo.java:189)
	at knot//net.minecraft.server.MinecraftServer.tickWorlds(MinecraftServer.java:1032)
	at knot//MC//net.minecraft.server.dedicated.MinecraftDedicatedServer.tickWorlds(MinecraftDedicatedServer.java:299)
	at knot//net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:912)
	at knot//net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:697)
	at knot//net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:281)
	at [email protected]/java.lang.Thread.run(Thread.java:1583)

Observed/actual behavior

crash after putting items into chests

Steps/models to reproduce

put many items in reinforced chest

What operating system are you running

Windows

Minecraft version

1.21.1

Ledger version

1.3.5

Logs

in description

Agreements

  • [x] I am running the latest version of the mod.
  • [x] My version of Minecraft is supported.
  • [x] I have searched for and ensured there isn't already an open issue regarding this.

Other

No response

vaniron avatar Jan 17 '25 14:01 vaniron

We hit this same issue using More Chest Variants.

java.lang.NullPointerException: Parameter specified as non-null is null: method com.github.quiltservertools.ledger.callbacks.ItemInsertCallback$DefaultImpls.EVENT$lambda$1$lambda$0, parameter pos
	at knot/com.github.quiltservertools.ledger.callbacks.ItemInsertCallback$DefaultImpls.EVENT$lambda$1$lambda$0(ItemInsertCallback.kt) ~[ledger-1.3.5.jar:?]
	at knot/net.minecraft.class_1703.handler$bij000$ledger$ledgerCloseScreenLogChanges(class_1703.java:1441) ~[server-intermediary.jar:?]
	at knot/net.minecraft.class_1703.method_7595(class_1703.java:569) ~[server-intermediary.jar:?]
	at knot/net.minecraft.class_1707.method_7595(class_1707.java:108) ~[server-intermediary.jar:?]
	at knot/net.minecraft.class_3222.method_14247(class_3222.java:1219) ~[server-intermediary.jar:?]
	at knot/net.minecraft.class_1657.method_5650(class_1657.java:1454) ~[server-intermediary.jar:?]
	at knot/net.minecraft.class_3218.method_18770(class_3218.java:953) ~[server-intermediary.jar:?]
	at knot/net.minecraft.class_3324.method_14611(class_3324.java:393) ~[server-intermediary.jar:?]
	at knot/net.minecraft.class_3244.method_52415(class_3244.java:1250) ~[server-intermediary.jar:?]
	at knot/net.minecraft.class_3244.method_10839(class_3244.java:1239) ~[server-intermediary.jar:?]
	at knot/net.minecraft.class_2535.method_10768(class_2535.java:673) ~[server-intermediary.jar:?]
	at knot/net.minecraft.class_1255.method_19537(class_1255.java:93) ~[server-intermediary.jar:?]
	at knot/net.minecraft.class_8609.method_60673(class_8609.java:170) ~[server-intermediary.jar:?]
	at knot/net.minecraft.class_8609.method_52396(class_8609.java:164) ~[server-intermediary.jar:?]
	at knot/net.minecraft.class_3324.method_14597(class_3324.java:787) ~[server-intermediary.jar:?]
	at knot/net.minecraft.server.MinecraftServer.method_3782(MinecraftServer.java:602) ~[server-intermediary.jar:?]
	at knot/net.minecraft.class_3176.method_3782(class_3176.java:561) ~[server-intermediary.jar:?]
	at knot/net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:735) ~[server-intermediary.jar:?]
	at knot/net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:281) ~[server-intermediary.jar:?]
	at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]

addidotlol avatar Feb 02 '25 23:02 addidotlol

Happened to me with a regular barrel.

java.lang.NullPointerException: Parameter specified as non-null is null: method com.github.quiltservertools.ledger.callbacks.ItemInsertCallback$DefaultImpls.EVENT$lambda$1$lambda$0, parameter pos at knot//com.github.quiltservertools.ledger.callbacks.ItemInsertCallback$DefaultImpls.EVENT$lambda$1$lambda$0(ItemInsertCallback.kt) at knot//MC//net.minecraft.screen.ScreenHandler.handler$ebl000$ledger$ledgerCloseScreenLogChanges(ScreenHandler.java:3484) at knot//MC//net.minecraft.screen.ScreenHandler.onClosed(ScreenHandler.java:613) at knot//MC//net.minecraft.screen.GenericContainerScreenHandler.onClosed(GenericContainerScreenHandler.java:104) at knot//MC//net.minecraft.server.network.ServerPlayerEntity.onHandledScreenClosed(ServerPlayerEntity.java:1410) at knot//MC//net.minecraft.server.network.ServerPlayerEntity.closeHandledScreen(ServerPlayerEntity.java:1405) at knot//MC//net.minecraft.server.network.ServerPlayerEntity.tick(ServerPlayerEntity.java:700) at knot//MC//net.minecraft.server.world.ServerWorld.tickEntity(ServerWorld.java:762) at knot//MC//net.minecraft.world.World.tickEntity(World.java:502) at knot//MC//net.minecraft.server.world.ServerWorld.method_31420(ServerWorld.java:407) at knot//MC//net.minecraft.world.EntityList.forEach(EntityList.java:54) at knot//MC//net.minecraft.server.world.ServerWorld.tick(ServerWorld.java:377) at knot//net.minecraft.server.MinecraftServer.mixinextras$bridge$method_18765$346(MinecraftServer.java) at knot//net.minecraft.server.MinecraftServer.wrapOperation$zln000$carpet-ams-addition$tickWorlds(MinecraftServer.java:4707) at knot//net.minecraft.server.MinecraftServer.mixinextras$bridge$wrapOperation$zln000$carpet-ams-addition$tickWorlds$347(MinecraftServer.java) at knot//net.minecraft.server.MinecraftServer.wrapOperation$cno000$carpet-tis-addition$yeetUpdateSuppressionCrash_implOnTickWorlds(MinecraftServer.java:8202) at knot//net.minecraft.server.MinecraftServer.tickWorlds(MinecraftServer.java:1069) at knot//net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:953) at knot//net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:713) at knot//net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:292) at [email protected]/java.lang.Thread.run(Thread.java:1583)

imagelesskink avatar Feb 07 '25 08:02 imagelesskink

Seems to work fine in a singleplayer world, you need a dedicated server for it to crash. (only double chests) I have a spare for testing if its needed.

edit: will also test my variant barrels on the server

lieonlion avatar Feb 09 '25 12:02 lieonlion

From what i could test the More Varient Barrels work normaly on a dedicated server, with ledger loging every activity normaly

davidzus avatar Feb 09 '25 13:02 davidzus

A workaround i made for my Server is just to log the player position when the Chest pos is null, this is Purely done to still keep logging of taking items out of a chest without a crash but the logging isnt done on the chest itself but on the ground where the player was standing. I havent fully tested it but so far it worked with the Large Chests. To check if a player has removed or inserted an Item into the chest i need to run /lg search range:10 action:item-insert, this isnt Perfect but will work for my usecase

davidzus avatar Feb 09 '25 14:02 davidzus

A workaround i made for my Server is just to log the player position when the Chest pos is null, this is Purely done to still keep logging of taking items out of a chest without a crash but the logging isnt done on the chest itself but on the ground where the player was standing. I havent fully tested it but so far it worked with the Large Chests. To check if a player has removed or inserted an Item into the chest i need to run /lg search range:10 action:item-insert, this isnt Perfect but will work for my usecase

are you able to share this fix

Lunascaped avatar Apr 06 '25 21:04 Lunascaped

A workaround i made for my Server is just to log the player position when the Chest pos is null, this is Purely done to still keep logging of taking items out of a chest without a crash but the logging isnt done on the chest itself but on the ground where the player was standing. I havent fully tested it but so far it worked with the Large Chests. To check if a player has removed or inserted an Item into the chest i need to run /lg search range:10 action:item-insert, this isnt Perfect but will work for my usecase

are you able to share this fix

From what I have tested it was already "Fixed" in the new Version of Ledger 1.3.8, but the logging still wasnt happening on the Chest itself but in the corner of the block where the Chest is, so you still need to run /lg search range

davidzus avatar Apr 06 '25 22:04 davidzus

can you please share how you fixed this anyway? I'm running ledger for 1.21.1 and 1.3.8 isn't for 1.21.1

GamerGuyD3 avatar Apr 13 '25 18:04 GamerGuyD3

can you please share how you fixed this anyway? I'm running ledger for 1.21.1 and 1.3.8 isn't for 1.21.1

I fixed this by building the latest version in the github, take a look at #314 and see if you can download the source for 1.21.1 and implement the fix yourself and build it.

Lunascaped avatar Apr 14 '25 00:04 Lunascaped

I'm having the same issue with chests from the Mythic Metals mod.

Elektraaaa avatar Apr 28 '25 18:04 Elektraaaa