Iron Backpacks

Iron Backpacks

54M Downloads

ArrayOutOfBounds Exception with picking up items

DoomRater opened this issue ยท 14 comments

commented

I have a worn backpack that has an advanced nesting upgrade in it and inside is a backpack with a depth upgrade and a mining filter upgrade. I also have a Rare Earth Magnet from Practicalities in my inventory, which directly places items into the inventory from the ground. I walked by a spider which had string around it, and when I tried to pick up the string this ArrayOutOfbounds Exception occurred.

[Server thread/WARN]: Failed to handle packet for /69.54.4.26:53668
net.minecraft.util.ReportedException: Ticking player
at net.minecraft.entity.player.EntityPlayerMP.func_71127_g(EntityPlayerMP.java:349) ~[mw.class:?]
at net.minecraft.network.NetHandlerPlayServer.func_147347_a(NetHandlerPlayServer.java:303) ~[nh.class:?]
at net.minecraft.network.play.client.C03PacketPlayer.func_148833_a(SourceFile:137) ~[jd.class:?]
at net.minecraft.network.play.client.C03PacketPlayer$C04PacketPlayerPosition.func_148833_a(SourceFile:63) ~[je.class:?]
at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:212) ~[ej.class:?]
at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:165) [nc.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:659) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:334) [lt.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685) [li.class:?]
Caused by: java.lang.ArrayIndexOutOfBoundsException: 4
at main.ironbackpacks.events.ForgeEventHandler.getEventBackpacks(ForgeEventHandler.java:149) ~[ForgeEventHandler.class:1.7.10-1.2.15]
at main.ironbackpacks.events.ForgeEventHandler.getFilterCondenserAndHopperBackpacks(ForgeEventHandler.java:125) ~[ForgeEventHandler.class:1.7.10-1.2.15]
at main.ironbackpacks.events.ForgeEventHandler.onItemPickupEvent(ForgeEventHandler.java:47) ~[ForgeEventHandler.class:1.7.10-1.2.15]
at cpw.mods.fml.common.eventhandler.ASMEventHandler_682_ForgeEventHandler_onItemPickupEvent_EntityItemPickupEvent.invoke(.dynamic) ~[?:?]
at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?]
at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:140) ~[EventBus.class:?]
at net.minecraft.entity.item.EntityItem.func_70100_b_(EntityItem.java:345) ~[xk.class:?]
at net.minecraft.entity.player.EntityPlayer.func_71044_o(EntityPlayer.java:609) ~[yz.class:?]
at net.minecraft.entity.player.EntityPlayer.func_70636_d(EntityPlayer.java:600) ~[yz.class:?]
at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:1611) ~[sv.class:?]
at net.minecraft.entity.player.EntityPlayer.func_70071_h_(EntityPlayer.java:288) ~[yz.class:?]
at net.minecraft.entity.player.EntityPlayerMP.func_71127_g(EntityPlayerMP.java:295) ~[mw.class:?]
... 10 more
[13:58:24] [Server thread/INFO]: DoomRater lost connection: TextComponent{text='Internal server error', siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null}}
[13:58:24] [Server thread/INFO]: DoomRater left the game
[13:58:41] [User Authenticator #5/INFO]: UUID of player DoomRater is c1a62d17-65bc-4256-9f54-af38270f9559
[13:58:43] [Server thread/INFO]: DoomRater[/69.54.4.26:54786] logged in with entity id 4123664 at (717.4875000119209, 63.0, 2203.101656193852)
[13:58:43] [Server thread/INFO]: DoomRater joined the game
[13:58:46] [Server thread/WARN]: Failed to handle packet for /69.54.4.26:54786
net.minecraft.util.ReportedException: Ticking player
at net.minecraft.entity.player.EntityPlayerMP.func_71127_g(EntityPlayerMP.java:349) ~[mw.class:?]
at net.minecraft.network.NetHandlerPlayServer.func_147347_a(NetHandlerPlayServer.java:303) ~[nh.class:?]
at net.minecraft.network.play.client.C03PacketPlayer.func_148833_a(SourceFile:137) ~[jd.class:?]
at net.minecraft.network.play.client.C03PacketPlayer$C06PacketPlayerPosLook.func_148833_a(SourceFile:20) ~[jf.class:?]
at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:212) ~[ej.class:?]
at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:165) [nc.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:659) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:334) [lt.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685) [li.class:?]
Caused by: java.lang.ArrayIndexOutOfBoundsException: 4
at main.ironbackpacks.events.ForgeEventHandler.getEventBackpacks(ForgeEventHandler.java:149) ~[ForgeEventHandler.class:1.7.10-1.2.15]
at main.ironbackpacks.events.ForgeEventHandler.getFilterCondenserAndHopperBackpacks(ForgeEventHandler.java:125) ~[ForgeEventHandler.class:1.7.10-1.2.15]
at main.ironbackpacks.events.ForgeEventHandler.onItemPickupEvent(ForgeEventHandler.java:47) ~[ForgeEventHandler.class:1.7.10-1.2.15]
at cpw.mods.fml.common.eventhandler.ASMEventHandler_682_ForgeEventHandler_onItemPickupEvent_EntityItemPickupEvent.invoke(.dynamic) ~[?:?]
at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?]
at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:140) ~[EventBus.class:?]
at net.minecraft.entity.item.EntityItem.func_70100_b_(EntityItem.java:345) ~[xk.class:?]
at net.minecraft.entity.player.EntityPlayer.func_71044_o(EntityPlayer.java:609) ~[yz.class:?]
at net.minecraft.entity.player.EntityPlayer.func_70636_d(EntityPlayer.java:600) ~[yz.class:?]
at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:1611) ~[sv.class:?]
at net.minecraft.entity.player.EntityPlayer.func_70071_h_(EntityPlayer.java:288) ~[yz.class:?]
at net.minecraft.entity.player.EntityPlayerMP.func_71127_g(EntityPlayerMP.java:295) ~[mw.class:?]
... 10 more
[13:58:54] [Server thread/INFO]: DoomRater lost connection: TextComponent{text='Internal server error', siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null}}
[13:58:54] [Server thread/INFO]: DoomRater left the game

commented

Well, strike the part about having a Rare Earth Magnet in invnetory, I did not!

commented

-Having the backpack with the mining upgrade in my hand and picking up string kicks me with the same error. This doesn't seem related to having it nested in a worn backpack.

commented

-Removing the mining upgrade does not fix the error, it actually seems to be related to the depth upgrade!

commented

You should try updating to 1.2.16, I just released it yesterday. It fixed a similar error (ArrayOutOfBounds), but it actually looks like your issue might be different.

Try it with the new version, and if that doesn't fix it I will look into it more. Thanks.

commented

I'm afraid I retried in a testing world SP and immediately got the boot trying to pick up an item.
http://pastebin.com/Mzmhp5iV
Much cleaner crash log from doing so SP only.

commented

Dang. Alright, thanks for the attempt.

I'll look at your original error message and try and track it down. I'm super busy right now as I am moving in about 3 days, so if I disappear for a week that's why. I'll try to get it done before then, but unfortunately no promises.

commented

Alright, so the log itself doesn't allow me to directly identify the specific issue. I went into a creative world and tried to test it myself, but was unable to duplicate the error. By the way, the depth upgrade is in the outer backpack, not the nested one, correct?
Here is what I believe you meant (and what I used to try, unsuccessfully) to replicate the crash.
Backpack 1 - Advanced nesting upgrade, depth upgrade; contains: backpack 2
Backpack 2 - Mining filter upgrade

Could you try and reproduce the error, giving specific steps to replicate it? Because without it, I don't think I have the time to find the bug myself, at least not right now.

Thanks.

commented

The only step missing from what you said was to actually go and pick up an item off the ground. That is when I inevitably crash every time.

commented

Hmm, well I did that too, and no crash, it just went smoothly into the nested backpack, as expected.

commented

I'll be doing some more tests later on, removing mods and seeing if I can duplicate the issue without Practicalities or other various mods that might possibly interfere with picking up items instantly and automatically...? I can't begin to imagine why I am crashing 100% of the time. The most I can do is offer an ATLauncher modpack backup of all the mods I'm using (it's a modified Modsauce 2.2.4, mostly modpack updates) but no idea id that will help either.

https://www.dropbox.com/s/2b83xyx89e0lpc6/CustomModsauce2.7z?dl=0

commented

I think the best course of action is for you to narrow it down. I will help if I can of course, but my time is, unfortunately, not infinite and I don't have the time to narrow down from a huge modlist.

I would recommend making a backup, and then removing all mods except mine and seeing if you can duplicate it with only IronBackpacks. If you can, great, note down everything to duplicate it. If not, add mods (using a half-interval search to save time) until you figure out exactly which one is conflicting, and then let me know the details. Bugfixes are fine, but no promises on inter-mod compatibility at the moment, as I need to focus on porting to 1.10.

commented

Okay, I've disabled every mod I can find.
Minecraft 1.17.10
MCP v9.05
FML v7.10.99.99
Minecraft Forge m10.13.4.1614
Iron Backpacks v1.1.2

  1. entered creative world
  2. spawn in diamond backpack
  3. using a crafting table, place diamond backpack in center and depth upgrade to the right. Take resulting diamond backpack
  4. toss any old item on the ground. Attempt to pick up. (this happens regardless of whether I have the backpack IN the backpack slot, or holding onto it in my inventory)
    Resulting crash log: http://pastebin.com/NGLvng4z
commented

Thanks, I can work with that (I think). I have to run off to class at the moment but I'll check it out tomorrow.

commented

Alright, that really helped, it was specific to the diamond backpack causing the issue and I was testing it with a gold one initially.

Fixed with 1.2.17, which should be out momentarily.