[BUG]: Moving a cable with a sticky piston to break a connection causes ticking crash
Jadan1213 opened this issue ยท 2 comments
Describe the bug
I was toying with an idea to try and break the connection to some blast furnaces (until i manage to understand the built in autocrafting stuff). So I decided to use a sticky piston with a lever to move one of the cables out of the way to disconnect the blast furnaces, so their corresponding importer/exporters wont draw power/be active. Well when i break the cable connection with the piston and go click the controller, it causes a ticking crash. Moving the cable back into place allows normal operation.
How can we reproduce this bug or crash?
- connect cables to importers/exporters connected to a blast furnace (or other furnace probably too?)
- use a stick piston to break the cable connection to the controller
- right click the storage controller to view connected items
What Minecraft version is this happening on?
Minecraft 1.20.1
What Forge version is this happening on?
42.2.17
What Refined Storage version is this happening on?
1.12.4
Relevant log output
[02:19:58] [Server thread/ERROR]: Failed to handle packet net.minecraft.network.protocol.game.ServerboundUseItemOnPacket@65ef7e98, suppressing error
java.lang.NullPointerException: Cannot invoke "net.minecraft.world.level.ItemLike.m_5456_()" because "p_41604_" is null
at net.minecraft.world.item.ItemStack.<init>(ItemStack.java:147) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.world.item.ItemStack.<init>(ItemStack.java:143) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at com.refinedmods.refinedstorage.apiimpl.network.node.NetworkNode.getItemStack(NetworkNode.java:91) ~[refinedstorage-1.12.4.jar%23788!/:?]
at com.refinedmods.refinedstorage.blockentity.ControllerBlockEntity.collectClientNodes(ControllerBlockEntity.java:71) ~[refinedstorage-1.12.4.jar%23788!/:?]
at com.refinedmods.refinedstorage.network.sync.BlockEntitySynchronizationParameterMessage.encode(BlockEntitySynchronizationParameterMessage.java:44) ~[refinedstorage-1.12.4.jar%23788!/:?]
at net.minecraftforge.network.simple.IndexedMessageCodec.lambda$tryEncode$4(IndexedMessageCodec.java:121) ~[forge-1.20.1-47.2.17-universal.jar%23898!/:?]
at java.util.Optional.ifPresent(Optional.java:178) ~[?:?]
at net.minecraftforge.network.simple.IndexedMessageCodec.tryEncode(IndexedMessageCodec.java:119) ~[forge-1.20.1-47.2.17-universal.jar%23898!/:?]
at net.minecraftforge.network.simple.IndexedMessageCodec.build(IndexedMessageCodec.java:134) ~[forge-1.20.1-47.2.17-universal.jar%23898!/:?]
at net.minecraftforge.network.simple.SimpleChannel.encodeMessage(SimpleChannel.java:68) ~[forge-1.20.1-47.2.17-universal.jar%23898!/:?]
at net.minecraftforge.network.simple.SimpleChannel.toBuffer(SimpleChannel.java:81) ~[forge-1.20.1-47.2.17-universal.jar%23898!/:?]
at net.minecraftforge.network.simple.SimpleChannel.toVanillaPacket(SimpleChannel.java:112) ~[forge-1.20.1-47.2.17-universal.jar%23898!/:?]
at net.minecraftforge.network.simple.SimpleChannel.send(SimpleChannel.java:107) ~[forge-1.20.1-47.2.17-universal.jar%23898!/:?]
at com.refinedmods.refinedstorage.network.NetworkHandler.sendTo(NetworkHandler.java:82) ~[refinedstorage-1.12.4.jar%23788!/:?]
at com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationWatcher.sendParameter(BlockEntitySynchronizationWatcher.java:56) ~[refinedstorage-1.12.4.jar%23788!/:?]
at com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationWatcher.lambda$detectAndSendChanges$0(BlockEntitySynchronizationWatcher.java:33) ~[refinedstorage-1.12.4.jar%23788!/:?]
at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]
at java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1092) ~[?:?]
at com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationWatcher.detectAndSendChanges(BlockEntitySynchronizationWatcher.java:33) ~[refinedstorage-1.12.4.jar%23788!/:?]
at com.refinedmods.refinedstorage.container.BaseContainerMenu.m_38946_(BaseContainerMenu.java:198) ~[refinedstorage-1.12.4.jar%23788!/:?]
at net.minecraft.world.inventory.AbstractContainerMenu.m_38893_(AbstractContainerMenu.java:124) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.server.level.ServerPlayer.m_143399_(ServerPlayer.java:401) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraftforge.network.NetworkHooks.openScreen(NetworkHooks.java:212) ~[forge-1.20.1-47.2.17-universal.jar%23898!/:?]
at net.minecraftforge.network.NetworkHooks.openScreen(NetworkHooks.java:173) ~[forge-1.20.1-47.2.17-universal.jar%23898!/:?]
at com.refinedmods.refinedstorage.block.ControllerBlock.lambda$use$2(ControllerBlock.java:108) ~[refinedstorage-1.12.4.jar%23788!/:?]
at com.refinedmods.refinedstorage.util.NetworkUtils.attempt(NetworkUtils.java:66) ~[refinedstorage-1.12.4.jar%23788!/:?]
at com.refinedmods.refinedstorage.util.NetworkUtils.attemptModify(NetworkUtils.java:46) ~[refinedstorage-1.12.4.jar%23788!/:?]
at com.refinedmods.refinedstorage.block.ControllerBlock.m_6227_(ControllerBlock.java:108) ~[refinedstorage-1.12.4.jar%23788!/:?]
at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.m_60664_(BlockBehaviour.java:778) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.server.level.ServerPlayerGameMode.m_7179_(ServerPlayerGameMode.java:343) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.m_6371_(ServerGamePacketListenerImpl.java:1057) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.m_5797_(ServerboundUseItemOnPacket.java:34) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.m_5797_(ServerboundUseItemOnPacket.java:8) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.network.protocol.PacketUtils.m_263899_(PacketUtils.java:22) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:156) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:770) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:161) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:130) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:753) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:747) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.util.thread.BlockableEventLoop.m_18699_(BlockableEventLoop.java:115) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:732) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:665) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:251) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at java.lang.Thread.run(Thread.java:842) ~[?:?]
[02:19:58] [Server thread/WARN]: Neruina Caught Exception
java.lang.NullPointerException: Cannot invoke "net.minecraft.world.level.ItemLike.m_5456_()" because "p_41604_" is null
at net.minecraft.world.item.ItemStack.<init>(ItemStack.java:147) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.world.item.ItemStack.<init>(ItemStack.java:143) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at com.refinedmods.refinedstorage.apiimpl.network.node.NetworkNode.getItemStack(NetworkNode.java:91) ~[refinedstorage-1.12.4.jar%23788!/:?]
at com.refinedmods.refinedstorage.blockentity.ControllerBlockEntity.collectClientNodes(ControllerBlockEntity.java:71) ~[refinedstorage-1.12.4.jar%23788!/:?]
at com.refinedmods.refinedstorage.network.sync.BlockEntitySynchronizationParameterMessage.encode(BlockEntitySynchronizationParameterMessage.java:44) ~[refinedstorage-1.12.4.jar%23788!/:?]
at net.minecraftforge.network.simple.IndexedMessageCodec.lambda$tryEncode$4(IndexedMessageCodec.java:121) ~[forge-1.20.1-47.2.17-universal.jar%23898!/:?]
at java.util.Optional.ifPresent(Optional.java:178) ~[?:?]
at net.minecraftforge.network.simple.IndexedMessageCodec.tryEncode(IndexedMessageCodec.java:119) ~[forge-1.20.1-47.2.17-universal.jar%23898!/:?]
at net.minecraftforge.network.simple.IndexedMessageCodec.build(IndexedMessageCodec.java:134) ~[forge-1.20.1-47.2.17-universal.jar%23898!/:?]
at net.minecraftforge.network.simple.SimpleChannel.encodeMessage(SimpleChannel.java:68) ~[forge-1.20.1-47.2.17-universal.jar%23898!/:?]
at net.minecraftforge.network.simple.SimpleChannel.toBuffer(SimpleChannel.java:81) ~[forge-1.20.1-47.2.17-universal.jar%23898!/:?]
at net.minecraftforge.network.simple.SimpleChannel.toVanillaPacket(SimpleChannel.java:112) ~[forge-1.20.1-47.2.17-universal.jar%23898!/:?]
at net.minecraftforge.network.simple.SimpleChannel.send(SimpleChannel.java:107) ~[forge-1.20.1-47.2.17-universal.jar%23898!/:?]
at com.refinedmods.refinedstorage.network.NetworkHandler.sendTo(NetworkHandler.java:82) ~[refinedstorage-1.12.4.jar%23788!/:?]
at com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationWatcher.sendParameter(BlockEntitySynchronizationWatcher.java:56) ~[refinedstorage-1.12.4.jar%23788!/:?]
at com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationWatcher.lambda$detectAndSendChanges$0(BlockEntitySynchronizationWatcher.java:33) ~[refinedstorage-1.12.4.jar%23788!/:?]
at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]
at java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1092) ~[?:?]
at com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationWatcher.detectAndSendChanges(BlockEntitySynchronizationWatcher.java:33) ~[refinedstorage-1.12.4.jar%23788!/:?]
at com.refinedmods.refinedstorage.container.BaseContainerMenu.m_38946_(BaseContainerMenu.java:198) ~[refinedstorage-1.12.4.jar%23788!/:?]
at net.minecraft.server.level.ServerPlayer.m_8119_(ServerPlayer.java:435) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.server.level.ServerLevel.m_8647_(ServerLevel.java:693) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.world.level.Level.mixinextras$bridge$accept$176(Level.java) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at com.bawnorton.neruina.handler.NeruinaTickHandler.safelyTickEntities$notTheCauseOfTickLag(NeruinaTickHandler.java:115) ~[neruina-1.3.0-forge+1.18.2-1.20.1.jar%23745!/:?]
at net.minecraft.world.level.Level.wrapOperation$cfi000$neruina$catchTickingEntities(Level.java:8540) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.world.level.Level.m_46653_(Level.java:479) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.server.level.ServerLevel.m_184063_(ServerLevel.java:343) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.world.level.entity.EntityTickList.m_156910_(EntityTickList.java:54) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.server.level.ServerLevel.m_8793_(ServerLevel.java:323) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:893) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.server.dedicated.DedicatedServer.m_5703_(DedicatedServer.java:283) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:814) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:661) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:251) ~[server-1.20.1-20230612.114412-srg.jar%23893!/:?]
at java.lang.Thread.run(Thread.java:842) ~[?:?]
[02:19:58] [Server thread/INFO]: Jadan1213 lost connection: You have been kicked due to a ticking exception on your player. Please remove the culprit mod or contact an admin.
[02:19:58] [Server thread/INFO]: Jadan1213 left the game