Lunatrius / Stackie

Improves vanilla stacking and adds experience orb stacking.
MIT License
9 stars 3 forks source link

Issue with Survivalist when mining. #9

Closed AndaleTheGreat closed 7 years ago

AndaleTheGreat commented 7 years ago

When mining stone quickly there is a crash if Survivlaist and Stackie are installed. Thorough testing has shown that it does not occur if either of these is disabled. Does not seem to work when just throwing the items on the ground. Only when mining.

Crash Report - http://pastebin.com/iQtBupY4 Curse Profile Export - https://drive.google.com/file/d/0B-zCPBgxfnQUNlM1R3Vwd1R5RXc/view?usp=drivesdk Video of example - https://drive.google.com/file/d/0B-zCPBgxfnQUN2toRWNsdkhSOXM/view?usp=drivesdk

Crossposted to Survivalist bugs: https://github.com/gigaherz/Survivalist/issues/23

Lunatrius commented 7 years ago

The crash happens because Stackie sets the stackSize to 0 and isDead to true. The exception is thrown here.

This can be fixed in both mods, but I'll check if I can manually remove all dead entities from the list after the iteration.

gigaherz commented 7 years ago

I really wonder how Survivalist's presence reveals this. The mod doesn't do anything with item entities or stacks, besides replacing certain drops...

Lunatrius commented 7 years ago

I just noticed it, but yeah... it's actually Convenient Additions that's crashing because of the invalid stacks.

Can you run the game with only Stackie, Convenient Additions and any required dependencies? And check whether you can reproduce the crash? Survivalist seems irrelevant.

AndaleTheGreat commented 7 years ago

I absolutely cannot seem to reproduce this without Survivalist and mining quickly thru stone.

Lunatrius commented 7 years ago
java.lang.IllegalArgumentException: Stack can not be invalid!
    at net.minecraftforge.oredict.OreDictionary.getOreIDs(OreDictionary.java:437)
-------- v
    at convenientadditions.item.adventurersPickaxe.OreMagnet.isOreItem(OreMagnet.java:22)
    at convenientadditions.item.adventurersPickaxe.OreMagnet.attractOres(OreMagnet.java:15)
    at convenientadditions.item.adventurersPickaxe.ItemAdventurersPickaxe.onPlayerInventoryTick(ItemAdventurersPickaxe.java:331)
    at convenientadditions.item.PlayerInventoryTickHandler.onPlayerInventoryTick(PlayerInventoryTickHandler.java:22)
-------- ^
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_23_PlayerInventoryTickHandler_onPlayerInventoryTick_PlayerTickEvent.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:185)
    at net.minecraftforge.fml.common.FMLCommonHandler.onPlayerPreTick(FMLCommonHandler.java:361)
    at net.minecraft.entity.player.EntityPlayer.func_70071_h_(EntityPlayer.java:188)
    at net.minecraft.client.entity.EntityPlayerSP.func_70071_h_(EntityPlayerSP.java:174)
    at net.minecraft.world.World.func_72866_a(World.java:1987)
    at net.minecraft.world.World.func_72870_g(World.java:1957)
    at net.minecraft.world.World.func_72939_s(World.java:1773)
    at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1782)
    at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1054)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:370)
    at net.minecraft.client.main.Main.main(SourceFile:124)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

Survivalist is no where in the stack trace, so unless it messes around with item stack entities (like Stackie does) there should be no way for the game to crash because of it.

Have you tried using only Survivalist and Convenient Additions to try to reproduce the crash?

QbDesu commented 7 years ago

Ok, great! I get it. I'll take care of it. The built in Ore Magnet of the Adventurer's Pickaxe isn't checking if the EntityItem's stack is still valid before trying to check it's Ore Dictionary entries. It's Convenient Addition's fault. You can close this issue.

AndaleTheGreat commented 7 years ago

Gotta say, pretty happy that one bug report has been seen by three very helpful authors that are very being super attentive to their work.