Sophisticated Backpacks

Sophisticated Backpacks

89M Downloads

Stacking pre-generated shulkers - stack upgrade - magnet upgrade

bohmak opened this issue ยท 6 comments

commented

Describe the bug
When I destroyed 2 shulkers i found pre-generated in the end monument, it disconnected me and i couldn't join again. I was getting Internal Server Error. I fixed it via deleting dropped items in the overworld, but to do that it had to be chunk loaded, so my friend ( which was hosting the server ) spammed the dropped item clear command while i joined and we got it in time. So basicly first shulker picked up easily, second one caused the error.

To Reproduce
Steps to reproduce the behavior:

  1. Open backpack
  2. Add magnet upgrade + stack upgrade
  3. Destroy pre-generated shulker ( in the End monuments ) with items in it
  4. Destroy pre-generated shulker ( in the End monuments ) with items in it again
  5. Your game crashes and you can't connect. Getting Internal Server Error

Expected behavior
Not sure if it should not pickup shulkers at all, or maybe not stack them atleast. Mainly it shouldn't crash the game in the way the player can't connect again.

Versions
ATM7 0.2.36
Forge 39.0.64
Sophisticated Backpacks 3.15.1.505

Log
[23:49:27] [Server thread/INFO]: HIDDENNAME[/HIDDENIP] logged in with entity id 799 at (-798.6532043310945, 32.0, -1052.4805455595497)
[23:49:27] [Server thread/INFO]: Sending ToolHandleTypeManager to HIDDENNAME
[23:49:27] [Server thread/INFO]: Sending SnowcapOvenFreezingManager to HIDDENNAME
[23:49:27] [Server thread/INFO]: Sending HorizoniteForgeFuelManager to HIDDENNAME
[23:49:27] [Server thread/INFO]: Sending AlchemyRecipeManager to HIDDENNAME
[23:49:27] [Server thread/INFO]: Sending JournalEntryManager to HIDDENNAME
[23:49:27] [Server thread/INFO]: Sending JournalSectionManager to HIDDENNAME
[23:49:27] [Server thread/INFO]: Sending JournalRequirementManager to HIDDENNAME
[23:49:27] [Server thread/INFO]: HIDDENNAME joined the game
[23:49:27] [Server thread/INFO]: New Server UUID HIDDENUUID
[23:49:30] [Server thread/ERROR]: Exception caught during firing event: Cannot invoke "java.util.Set.size()" because the return value of "java.util.Map.get(Object)" is null
Index: 24
Listeners:
0: NORMAL
1: ASM: class com.progwml6.ironchest.common.ai.CatsSitOnChestsHandler changeSittingTaskForOcelots(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
2: ASM: class com.legacy.blue_skies.events.SkiesEvents onEntityUpdate(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
3: ASM: com.github.alexthe666.citadel.server.CitadelEvents@590f727d onEntityUpdateDebug(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
4: ASM: com.github.alexthe666.alexsmobs.event.ServerEvents@6a688c39 onLivingUpdateEvent(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
5: net.minecraftforge.eventbus.EventBus$$Lambda$3723/0x000000080176a5c8@52a19161
6: ASM: class net.mrscauthd.beyond_earth.events.Events onLivingEntityTick(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
7: ASM: elucent.rootsclassic.event.ComponentSpellsEvent@6a72257f onLivingTick(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
8: ASM: class com.simibubi.create.events.CommonEvents onUpdateLivingEntity(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
9: ASM: class com.simibubi.create.content.curiosities.tools.ExtendoGripItem holdingExtendoGripIncreasesRange(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
10: ASM: class com.simibubi.create.content.curiosities.armor.DivingHelmetItem breatheUnderwater(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
11: ASM: class com.simibubi.create.content.curiosities.armor.DivingBootsItem accellerateDescentUnderwater(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
12: ASM: stepsword.mahoutsukai.handlers.ServerHandler@46c59eec livingEvent(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
13: ASM: beyond_earth_giselle_addon.common.content.proof.SpaceOxygenProofUtils@c96f16 onLivingUpdate(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
14: ASM: beyond_earth_giselle_addon.common.content.proof.SpaceGravityProofUtils@29d7e039 onLivingUpdate(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
15: ASM: beyond_earth_giselle_addon.common.content.proof.SpaceFireProofUtils@7ab4b753 onLivingUpdate(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
16: ASM: beyond_earth_giselle_addon.common.content.proof.VenusAcidProofUtils@2ddc261a onLivingUpdate(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
17: ASM: wile.engineersdecor.ModEngineersDecor@5379a8 onPlayerEvent(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
18: ASM: Block{naturesaura:animal_generator} onLivingUpdate(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
19: ASM: Block{null} onDragonTick(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
20: ASM: de.ellpeck.naturesaura.items.ItemPetReviver$Events@65083331 onEntityTick(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
21: net.minecraftforge.eventbus.EventBus$$Lambda$3723/0x000000080176a5c8@2cae6a2a
22: net.minecraftforge.eventbus.EventBus$$Lambda$3723/0x000000080176a5c8@7825ec53
23: net.minecraftforge.eventbus.EventBus$$Lambda$3723/0x000000080176a5c8@4995432
24: ASM: top.theillusivec4.curios.common.event.CuriosEventHandler@18424583 tick(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
25: ASM: blusunrize.immersiveengineering.common.EventHandler@7e8629dd onLivingUpdate(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
26: ASM: squeek.appleskin.network.SyncHandler@66665946 onLivingUpdateEvent(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
27: ASM: com.lothrazar.villagertools.ItemEvents@b99aff1 onLivingUpdateEvent(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
28: ASM: com.blakebr0.mysticalagriculture.handler.AugmentHandler@68cb8ff0 onPlayerUpdate(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
29: ASM: mob_grinding_utils.events.ChickenFuseEvent@316e2207 startChickenFuse(Lnet/minecraftforge/event/entity/living/LivingEvent;)V
30: LOWEST
31: ASM: class ovh.corail.tombstone.event.EventHandler onLivingUpdate(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
java.lang.NullPointerException: Cannot invoke "java.util.Set.size()" because the return value of "java.util.Map.get(Object)" is null
at TRANSFORMER/[email protected]/net.p3pp3rf1y.sophisticatedbackpacks.util.InventoryHandlerSlotTracker.insertIntoSlotsThatMatchStack(InventoryHandlerSlotTracker.java:168)
at TRANSFORMER/[email protected]/net.p3pp3rf1y.sophisticatedbackpacks.util.InventoryHandlerSlotTracker.insertItemIntoHandler(InventoryHandlerSlotTracker.java:125)
at TRANSFORMER/[email protected]/net.p3pp3rf1y.sophisticatedbackpacks.backpack.wrapper.BackpackInventoryHandler.insertItem(BackpackInventoryHandler.java:321)
at TRANSFORMER/[email protected]/net.p3pp3rf1y.sophisticatedbackpacks.upgrades.magnet.MagnetUpgradeWrapper.tryToInsertItem(MagnetUpgradeWrapper.java:188)
at TRANSFORMER/[email protected]/net.p3pp3rf1y.sophisticatedbackpacks.upgrades.magnet.MagnetUpgradeWrapper.pickupItems(MagnetUpgradeWrapper.java:146)
at TRANSFORMER/[email protected]/net.p3pp3rf1y.sophisticatedbackpacks.upgrades.magnet.MagnetUpgradeWrapper.tick(MagnetUpgradeWrapper.java:77)
at TRANSFORMER/[email protected]/net.p3pp3rf1y.sophisticatedbackpacks.backpack.BackpackItem.lambda$inventoryTick$10(BackpackItem.java:328)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at TRANSFORMER/[email protected]/net.p3pp3rf1y.sophisticatedbackpacks.backpack.BackpackItem.lambda$inventoryTick$11(BackpackItem.java:328)
at TRANSFORMER/[email protected]/net.minecraftforge.common.util.LazyOptional.ifPresent(LazyOptional.java:164)
at TRANSFORMER/[email protected]/net.p3pp3rf1y.sophisticatedbackpacks.backpack.BackpackItem.m_6883_(BackpackItem.java:326)
at TRANSFORMER/[email protected]/net.minecraft.world.item.ItemStack.m_41666_(ItemStack.java:484)
at TRANSFORMER/[email protected]/top.theillusivec4.curios.common.event.CuriosEventHandler.lambda$tick$23(CuriosEventHandler.java:464)
at TRANSFORMER/[email protected]/net.minecraftforge.common.util.LazyOptional.ifPresent(LazyOptional.java:164)
at TRANSFORMER/[email protected]/top.theillusivec4.curios.common.event.CuriosEventHandler.tick(CuriosEventHandler.java:445)
at net.minecraftforge.eventbus.ASMEventHandler_1297_CuriosEventHandler_tick_LivingUpdateEvent.invoke(.dynamic)
at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85)
at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.EventBus.post(EventBus.java:302)
at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.EventBus.post(EventBus.java:283)
at TRANSFORMER/[email protected]/net.minecraftforge.common.ForgeHooks.onLivingUpdate(ForgeHooks.java:301)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.LivingEntity.m_8119_(LivingEntity.java:2209)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.player.Player.m_8119_(Player.java:234)
at TRANSFORMER/[email protected]/net.minecraft.server.level.ServerPlayer.m_9240_(ServerPlayer.java:439)
at TRANSFORMER/[email protected]/net.minecraft.server.network.ServerGamePacketListenerImpl.m_9933_(ServerGamePacketListenerImpl.java:206)
at TRANSFORMER/[email protected]/net.minecraft.network.Connection.m_129483_(Connection.java:233)
at TRANSFORMER/[email protected]/net.minecraft.server.network.ServerConnectionListener.m_9721_(ServerConnectionListener.java:142)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:882)
at TRANSFORMER/[email protected]/net.minecraft.server.dedicated.DedicatedServer.m_5703_(DedicatedServer.java:328)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:808)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:668)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:258)
at java.base/java.lang.Thread.run(Thread.java:833)

[23:49:30] [Server thread/WARN]: Failed to handle packet for /HIDDENIP
Caused by: java.lang.NullPointerException: Cannot invoke "java.util.Set.size()" because the return value of "java.util.Map.get(Object)" is null
at net.p3pp3rf1y.sophisticatedbackpacks.util.InventoryHandlerSlotTracker.insertIntoSlotsThatMatchStack(InventoryHandlerSlotTracker.java:168) ~[sophisticatedbackpacks-1.18.1-3.15.1.505.jar%23230!/:1.18.1-3.15.1.505]
at net.p3pp3rf1y.sophisticatedbackpacks.util.InventoryHandlerSlotTracker.insertItemIntoHandler(InventoryHandlerSlotTracker.java:125) ~[sophisticatedbackpacks-1.18.1-3.15.1.505.jar%23230!/:1.18.1-3.15.1.505]
at net.p3pp3rf1y.sophisticatedbackpacks.backpack.wrapper.BackpackInventoryHandler.insertItem(BackpackInventoryHandler.java:321) ~[sophisticatedbackpacks-1.18.1-3.15.1.505.jar%23230!/:1.18.1-3.15.1.505]
at net.p3pp3rf1y.sophisticatedbackpacks.upgrades.magnet.MagnetUpgradeWrapper.tryToInsertItem(MagnetUpgradeWrapper.java:188) ~[sophisticatedbackpacks-1.18.1-3.15.1.505.jar%23230!/:1.18.1-3.15.1.505]
at net.p3pp3rf1y.sophisticatedbackpacks.upgrades.magnet.MagnetUpgradeWrapper.pickupItems(MagnetUpgradeWrapper.java:146) ~[sophisticatedbackpacks-1.18.1-3.15.1.505.jar%23230!/:1.18.1-3.15.1.505]
at net.p3pp3rf1y.sophisticatedbackpacks.upgrades.magnet.MagnetUpgradeWrapper.tick(MagnetUpgradeWrapper.java:77) ~[sophisticatedbackpacks-1.18.1-3.15.1.505.jar%23230!/:1.18.1-3.15.1.505]
at net.p3pp3rf1y.sophisticatedbackpacks.backpack.BackpackItem.lambda$inventoryTick$10(BackpackItem.java:328) ~[sophisticatedbackpacks-1.18.1-3.15.1.505.jar%23230!/:1.18.1-3.15.1.505]
at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]
at net.p3pp3rf1y.sophisticatedbackpacks.backpack.BackpackItem.lambda$inventoryTick$11(BackpackItem.java:328) ~[sophisticatedbackpacks-1.18.1-3.15.1.505.jar%23230!/:1.18.1-3.15.1.505]
at net.minecraftforge.common.util.LazyOptional.ifPresent(LazyOptional.java:164) ~[forge-1.18.1-39.0.64-universal.jar%23266!/:?]
at net.p3pp3rf1y.sophisticatedbackpacks.backpack.BackpackItem.m_6883_(BackpackItem.java:326) ~[sophisticatedbackpacks-1.18.1-3.15.1.505.jar%23230!/:1.18.1-3.15.1.505]
at net.minecraft.world.item.ItemStack.m_41666_(ItemStack.java:484) ~[server-1.18.1-20211210.034407-srg.jar%23262!/:?]
at top.theillusivec4.curios.common.event.CuriosEventHandler.lambda$tick$23(CuriosEventHandler.java:464) ~[curios-forge-1.18.1-5.0.6.0.jar%2399!/:1.18.1-5.0.6.0]
at net.minecraftforge.common.util.LazyOptional.ifPresent(LazyOptional.java:164) ~[forge-1.18.1-39.0.64-universal.jar%23266!/:?]
at top.theillusivec4.curios.common.event.CuriosEventHandler.tick(CuriosEventHandler.java:445) ~[curios-forge-1.18.1-5.0.6.0.jar%2399!/:1.18.1-5.0.6.0]
at net.minecraftforge.eventbus.ASMEventHandler_1297_CuriosEventHandler_tick_LivingUpdateEvent.invoke(.dynamic) ~[?:?]
at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-5.0.3.jar%232!/:?]
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-5.0.3.jar%232!/:?]
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-5.0.3.jar%232!/:?]
at net.minecraftforge.common.ForgeHooks.onLivingUpdate(ForgeHooks.java:301) ~[forge-1.18.1-39.0.64-universal.jar%23266!/:?]
at net.minecraft.world.entity.LivingEntity.m_8119_(LivingEntity.java:2209) ~[server-1.18.1-20211210.034407-srg.jar%23262!/:?]
at net.minecraft.world.entity.player.Player.m_8119_(Player.java:234) ~[server-1.18.1-20211210.034407-srg.jar%23262!/:?]
at net.minecraft.server.level.ServerPlayer.m_9240_(ServerPlayer.java:439) ~[server-1.18.1-20211210.034407-srg.jar%23262!/:?]

[23:49:30] [Server thread/INFO]: HIDDENNAME lost connection: Internal server error
[23:49:30] [Server thread/INFO]: HIDDENNAME left the game

commented

I am unable to recreate this issue

  • tried breaking the shulkers and having them picked up separately
  • as well as breaking multiple of them and having them picked up at the same time
    In neither of those cases I was able to get this crash. It's also rather odd one as on the same line of code there's check to prevent this from happening so I have no idea how it goes around that.

Anyway if you can give me steps with which I can recreate this reliably I will take a look.

commented

and I am still unable to recreate - shulkers just get picked up and either stacked or not based on whether I have them set to stack in config. I am guessing there must be some other mod in the pack that's causing this. And I would definitely need a bit of assistance here as I don't have time to debug huge modpacks to figure out what mod it is.

commented

I'm having the same issue. In my case, it was two of the loot shulkers from lootr, in a repurposed structures end dungeon.

commented

Could you give me exact steps how I can recreate the issue with loot shulkers?

commented

Sure. I had the magnet and stack upgrades on my backpack, like hubruku had. All I did was shift-break to pickup the shulkers, and the same thing happened. First one went in fine, second caused the crash.

commented

closing given that there's no additional info provided