StackOverflow during block tick event as item pushed into full network
emanb29 opened this issue ยท 2 comments
Minecraft version & Mod Version:
1.16.4 / 1.3.1
Single player or Server:
Single player
Running a version of TNP Limitless 3 (with Simple Storage Network and an additional mod added).
I was afk for initial crash, but upon returning, this happens on startup after the client hanging for several minutes.
The cause is some kind of infinite (mutual) recursion between CollectionItemStackHandler::insertItem and CapabilityCollectableLink::insertStack and TimeMain::insertStack.
I believe the problematic setup is a hopper botany pot (from BotanyPots) placed on top of a network interface (sorry I forget the block name -- it's the equivalent of an ME interface in AE2). The network is probably full, and (though I doubt this matters) there is an unconfigured network link cable not connected to anything but one of the network interfaces.
Crash log:
java.lang.StackOverflowError: Ticking block entity
at net.minecraftforge.eventbus.EventBus.handleException(EventBus.java:311) ~[eventbus-3.0.5-service.jar:?] {}
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-3.0.5-service.jar:?] {}
at net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(ForgeEventFactory.java:579) ~[?:?] {re:mixin,re:classloading}
at net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(ForgeEventFactory.java:573) ~[?:?] {re:mixin,re:classloading}
at net.minecraftforge.common.capabilities.CapabilityProvider.gatherCapabilities(CapabilityProvider.java:48) ~[?:?] {re:computing_frames,re:mixin,re:classloading}
at net.minecraft.item.ItemStack.forgeInit(ItemStack.java:997) ~[?:?] {re:mixin,re:classloading,xf:fml:apotheosis:apothitemusehook,xf:fml:astralsorcery:add_missing_tag_enchantment_tooltip,xf:fml:astralsorcery:add_enchantment_tooltip,pl:mixin:APP:performant.mixins.json:item.ItemStackMixin,pl:mixin:APP:dankstorage.mixins.json:ItemStackMixin,pl:mixin:APP:forbidden_arcanus.mixins.json:ItemStackMixin,pl:mixin:APP:quark.mixins.json:ItemStackMixin,pl:mixin:A}
at net.minecraft.item.ItemStack.<init>(ItemStack.java:126) ~[?:?] {re:mixin,re:classloading,xf:fml:apotheosis:apothitemusehook,xf:fml:astralsorcery:add_missing_tag_enchantment_tooltip,xf:fml:astralsorcery:add_enchantment_tooltip,pl:mixin:APP:performant.mixins.json:item.ItemStackMixin,pl:mixin:APP:dankstorage.mixins.json:ItemStackMixin,pl:mixin:APP:forbidden_arcanus.mixins.json:ItemStackMixin,pl:mixin:APP:quark.mixins.json:ItemStackMixin,pl:mixin:A}
at net.minecraft.item.ItemStack.func_77946_l(ItemStack.java:345) ~[?:?] {re:mixin,re:classloading,xf:fml:apotheosis:apothitemusehook,xf:fml:astralsorcery:add_missing_tag_enchantment_tooltip,xf:fml:astralsorcery:add_enchantment_tooltip,pl:mixin:APP:performant.mixins.json:item.ItemStackMixin,pl:mixin:APP:dankstorage.mixins.json:ItemStackMixin,pl:mixin:APP:forbidden_arcanus.mixins.json:ItemStackMixin,pl:mixin:APP:quark.mixins.json:ItemStackMixin,pl:mixin:A}
at com.lothrazar.storagenetwork.block.main.TileMain.insertStack(TileMain.java:229) ~[?:1.16.4-1.3.1] {re:classloading}
at com.lothrazar.storagenetwork.block.collection.CollectionItemStackHandler.insertItem(CollectionItemStackHandler.java:63) ~[?:1.16.4-1.3.1] {re:classloading}
at net.minecraftforge.items.ItemHandlerHelper.insertItemStacked(ItemHandlerHelper.java:139) ~[?:?] {re:classloading}
at com.lothrazar.storagenetwork.capability.CapabilityConnectableLink.insertStack(CapabilityConnectableLink.java:109) ~[?:1.16.4-1.3.1] {re:classloading}
at com.lothrazar.storagenetwork.block.main.TileMain.insertStack(TileMain.java:263) ~[?:1.16.4-1.3.1] {re:classloading}
at com.lothrazar.storagenetwork.block.collection.CollectionItemStackHandler.insertItem(CollectionItemStackHandler.java:63) ~[?:1.16.4-1.3.1] {re:classloading}
at net.minecraftforge.items.ItemHandlerHelper.insertItemStacked(ItemHandlerHelper.java:139) ~[?:?] {re:classloading}
...
at com.lothrazar.storagenetwork.capability.CapabilityConnectableLink.insertStack(CapabilityConnectableLink.java:109) ~[?:1.16.4-1.3.1] {re:classloading}
at com.lothrazar.storagenetwork.block.main.TileMain.insertStack(TileMain.java:263) ~[?:1.16.4-1.3.1] {re:classloading}
at com.lothrazar.storagenetwork.block.collection.CollectionItemStackHandler.insertItem(CollectionItemStackHandler.java:63) ~[?:1.16.4-1.3.1] {re:classloading}
at net.minecraftforge.items.ItemHandlerHelper.insertItemStacked(ItemHandlerHelper.java:139) ~[?:?] {re:classloading}
-- Block entity being ticked --
Details:
Name: botanypots:botany_pot // net.darkhax.botanypots.block.tileentity.TileEntityBotanyPot
Block: Block{botanypots:hopper_botany_pot}
Block location: World: (352,72,243), Chunk: (at 0,4,3 in 22,15; contains blocks 352,0,240 to 367,255,255), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Block: Block{botanypots:hopper_botany_pot}
Block location: World: (352,72,243), Chunk: (at 0,4,3 in 22,15; contains blocks 352,0,240 to 367,255,255), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Stacktrace:
at net.minecraft.world.World.func_217391_K(World.java:1325) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,xf:fml:observerlib:coremodmethod,xf:fml:astralsorcery:sun_brightness_server,pl:mixin:APP:performant.mixins.json:world.WorldMixin,pl:mixin:A}
at net.minecraft.world.server.ServerWorld.func_72835_b(ServerWorld.java:371) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:performant.mixins.json:world.ServerWorldBlockUpdateMixin,pl:mixin:APP:immersiveengineering.mixins.json:coremods.ServerWorldMixin,pl:mixin:APP:abnormals_core.mixins.json:ServerWorldMixin,pl:mixin:APP:endergetic.mixins.json:ServerWorldMixin,pl:mixin:APP:quark.mixins.json:ServerWorldMixin,pl:mixin:APP:performant.mixins.json:world.ServerWorldMixin,pl:mixin:APP:performant.mixins.json:entity.MobServerWorldMixin,pl:mixin:A}
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:850) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:the_bumblezone.mixins.json:MinecraftServerMixin,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:A}
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:786) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:the_bumblezone.mixins.json:MinecraftServerMixin,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:A}
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:78) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:641) [?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:the_bumblezone.mixins.json:MinecraftServerMixin,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:A}
at net.minecraft.server.MinecraftServer.lambda$startServer$0(MinecraftServer.java:232) [?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:the_bumblezone.mixins.json:MinecraftServerMixin,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:A}
at net.minecraft.server.MinecraftServer$$Lambda$32678/276779413.run(Unknown Source) [?:?] {}
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_51] {}
Manually editing the MCA file for the chunk with the storage to ensure there were slots available in the chests backing the storage network allowed me to get back into the game -- I believe this confirms that the issue was caused by trying to push into a full network.