Thaumcraft

Thaumcraft

57M Downloads

NPE in ThaumcraftInvHelper.compareTagsRelaxed

blackdrag opened this issue ยท 0 comments

commented

I am currently playing the Stoneblock 2 modpack, which is also using Thaumcraft 6. See https://paste.dimdev.org/diyokubuya.mccrash for the exact exception as well as all versions of the involved mods. It happens when trying to start infusion crafting.

Looking at the code without debugging and assuming master is still valid for my version of the mod I do see a potential problem. The call to compareTagsRelaxed in

return (prime.getTagCompound() == null || ThaumcraftInvHelper.compareTagsRelaxed(prime.getTagCompound(),other.getTagCompound()));
is done if prime.getTagCompound() is not null. But that kind of implies to me, that other.getTagCompound() could be null. If that is the case it would indeed cause a NPE in
if (!other.hasKey(key) || !prime.getTag(key).equals(other.getTag(key))) {
for !other.hasKey(key). Maybe that is the bug, maybe not, I thought I just add it here for now.