TheCodex6824 / ThaumicAugmentation

A Thaumcraft addon for Minecraft 1.12 that tries to add new content that would fit in with the base mod.
https://minecraft.curseforge.com/projects/thaumic-augmentation
GNU Lesser General Public License v3.0
41 stars 30 forks source link

Impetus Nodes seem to still not be loaded properly and crash #379

Open jchung01 opened 2 months ago

jchung01 commented 2 months ago

Making an issue about a crash report another user experienced in the MeatballCraft modpack. It seems like impetus nodes still aren't loaded properly. This user, on world load, would get this crash https://mclo.gs/QW45Sdk. (This specific report is using Java 22/Cleanroom, but they said they tested entering the world on Java 8 and still crashed) From looking at past issues, it looks like reproducing impetus node issues is difficult, but the user mentioned they were using a cross-dimensional setup using impetus mirrors.

Looking at the code and some related issues, it looks like the world of a TileEntity can still be null during onLoad() (in this case, called from the impetus mirror). This seems to be a Forge bug. ImpetusNode.validateNodeInput() does not seem to check if the world is null, so that would explain the crash. This may have been due to the code changes in #319. I'm not sure if a null check would be sufficient or further reworking of the loading of the impetus node system would be required.

TheCodex6824 commented 2 months ago

Sorry for the crashing. As you found out, impetus nodes have a lot of history with chunk loading issues. In this case, it looks like onLoad is not suitable for initializing the properties of impetus nodes. I originally used it both because the documentation said to and to avoid having to make every impetus node tickable, but it looks like there's no getting around it.