Startup crash with Astral Sorcery 1.9 + Mekanism Generators
luke-bravenboer opened this issue ยท 8 comments
So, yet another incident of 1.9.0 startup crashes to report; very similar to #748, though that was misreported- their crash report was stemming from Mekanism Generators + NEI. I experienced the same problem:
net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Not Enough Items (nei)
Caused by: java.lang.NullPointerException
at mekanism.generators.common.item.ItemBlockGenerator.getItemStackLimit(ItemBlockGenerator.java:95)
at net.minecraft.item.ItemStack.getMaxStackSize(ItemStack.java:248)
at hellfirepvp.astralsorcery.common.enchantment.amulet.EnchantmentUpgradeHelper.isItemBlacklisted(EnchantmentUpgradeHelper.java:176)
at hellfirepvp.astralsorcery.common.enchantment.amulet.PlayerAmuletHandler.attachAmuletItemCapability(PlayerAmuletHandler.java:38)
(Full crash log: https://paste.dimdev.org/qibequyeme.mccrash)
Of course, the exception description claims to be catching the exception from NEI's code... so I removed NEI, but still got the same crash again, this time seemingly stemming from Robotic Parts (1.12 Cyberware port):
net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Minecraft Forge (forge)
Caused by: java.lang.NullPointerException
at mekanism.generators.common.item.ItemBlockGenerator.getItemStackLimit(ItemBlockGenerator.java:95)
at net.minecraft.item.ItemStack.getMaxStackSize(ItemStack.java:248)
at hellfirepvp.astralsorcery.common.enchantment.amulet.EnchantmentUpgradeHelper.isItemBlacklisted(EnchantmentUpgradeHelper.java:176)
at hellfirepvp.astralsorcery.common.enchantment.amulet.PlayerAmuletHandler.attachAmuletItemCapability(PlayerAmuletHandler.java:38)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_2159_PlayerAmuletHandler_attachAmuletItemCapability_AttachCapabilitiesEvent.invoke(.dynamic)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
at net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(ForgeEventFactory.java:658)
at net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(ForgeEventFactory.java:640)
at net.minecraft.item.ItemStack.forgeInit(ItemStack.java:1216)
at net.minecraft.item.ItemStack.<init>(ItemStack.java:112)
at net.minecraft.item.ItemStack.<init>(ItemStack.java:98)
at flaxbeard.cyberware.api.CyberwareAPI.getLinkedWare(CyberwareAPI.java:333)
(Second full crash log: https://paste.dimdev.org/sakamuluko.mccrash)
So, I can confirm that NEI is not related.
Appears to be related to #746 / #747, as there is a common factor among each of these startup crashes that have appeared following the 1.9.0 release; the isItemBlacklisted() method in the EnchantmentUpgradeHelper class, which could be a likely suspect:
hellfirepvp.astralsorcery.common.enchantment.amulet.EnchantmentUpgradeHelper.isItemBlacklisted()
Versions:
Forge: 14.23.4.2705
Astral Sorcery: 1.12.2-1.9.0
Mekanism: 1.12.2-9.4.11.346
MekanismGenerators: 1.12.2-9.4.11.346
Robotic Parts: 1.12.2-0.2.10.12
Not Enough Items: 1.12.2-2.4.1.233-universal
CodeChickenLib: 1.12.2-3.1.9.344-universal
Is there an exception for AttachCapabilitiesEvent directly above the crash in that same log? Something like: https://pastebin.com/N9M690QG ?
I am also seeing this error. My crash log looks identical to Ligands' and I do not have the separate NPE like in your pastebin example. I am also running the same mods & versions he has listed, but on Forge 2707 and running with JEI, so not sure if it's anything to do with NEI (or at least not the cause, but does trigger it).
This seems to be Mekanism's fault, as AS is only getting the item's max stack size. Mekanism isn't checking whether the generator type returns null (which it seems to be doing in this case) when it calculates the stack size.
@Ligands please open a sister ticket on the Robotic Parts issue tracker for them to address as well, the mek issue is on mek's side.
Confirmed fixed with Mekanism 9.4.12.348- this particular incident is no longer occurring,
I can confirm that Robotic Parts / Cyberware is unrelated. However, I have since discovered that Unique Crops is affected in the same way (crash with AS 1.9 + NEI) & have raised a ticket with them: bafomdad/uniquecrops#10
IC2 is also affected, and here's the relevant ticket in their system: https://bt.industrial-craft.net/view.php?id=2383
Collapsing this to the new master ticket for these: #762