Thaumcraft 4 Particle Client Crash on Changing Worlds #484
Description
Your GTNH Discord Username
TechnoParadox
Mod Version
Thaumcraft 4.2.3.5
Bug Report
I have found a crash with TC4 Particles causing crashes when switching worlds.
Specifically, the issue occurs when switching from a world where a TC4 particle exists to then moving to any other world that doesn't have it (most noticeable when switching from MP to SP). Issue gets fixed upon reloading the instance.
At first I thought it was a COFH Core issue, but looking at the collection of crash reports sent to me on this issue, it could only ever occur with TC4 particles and looking at the code, it strikes me more as a problem on TC side.
TC Particles from a previous world seem to stay in memory in the client and will attempt to update themselves on load in a world they do not belong in causing a crash when spatial related methods are called (or at least that's what I am assuming that's happening).
I'll post the TC Method in question:
thaumcraft.client.fx.ParticleEngine.updateParticles
Line 150: entityfx.onUpdate();
I need advice on how this should be patched effectively.
Tagging @Glease for his intimate understanding of TC4 source-code.
Java Version
Java 8
Mod List or GTNH Pack Version
Some crash report on the issue
crash-2025-01-29_16.10.21-client.txt
crash-2024-07-29_22.56.48-client.txt
Final Checklist
- I have searched the issues and haven't found a similar issue.