Models sudenly stops working
Open
Models sudenly stops working
So my mobs with models from model engine are all spawning invisible. In the print I summonned a pet, but it only appears its effects and bossbar. It doesnt have a hitbox, but it play sounds and follow me like it was there. Here are my logs https://mclo.gs/yMVUG6O#L3344
I tried a clean installation, it worked at first but sudenly stopped loading models again. There are no errors on console that I could find.
ModelEngine version R4.0.8
Current Purpur Version: 1.21.3-2358-16ce24a (MC: 1.21.3)*
I also am having this issue 3x a day on average. Reloading Modelengine/mythicmobs does not fix it, so we have to restart the server with 20 players on it every time. I noticed it sometimes triggers on a mythicmobs reload or when a lot of models are spawned, but it also occurder sporadically. No errors in the logs, however I do use 1.21.4 (also purpur), ModelEngine Devbuild 2125. Can somehow not recreate this on my testserver, only on my live server (with players).
Is there anything I can do to help the developer debug this? Logs show nothing as of now.
Edited by Zodra2I also noticed a memory leak occurs from the moment the models stop working, which slowly builds up: 754 instances of "com.ticxo.modelengine.api.entity.data.BukkitEntityData", loaded by "org.bukkit.plugin.java.PluginClassLoader @ 0x50bd83660" occupy 5.893.519.384 (72,31%) bytes. I added a memory report to this comment. heap-2025-02-28_20.53.20_Leak_Suspects.zip
I encountered a similar bug before. To solve it, I replaced the Pig entity with a dummy. By doing this, I could disable automatic player detection—ensuring that the dummy doesn't spawn or despawn based on player presence. This change allowed the model to persist even when the chunk wasn’t loaded. For example:
Dummy<?> dummy = new Dummy<>(); // Disable automatic spawning/despawning for players dummy.setDetectingPlayers(false); ModeledEntity modeledEntity = ModelEngineAPI.createModeledEntity(dummy); // Load the model as before
Also, if you regenerate your resource pack on every server boot, ensure that you spawn your mobs with a delay so that the mobs are spawned after the resource pack is loaded.
Edited by minerogue
Might be related to #208, perhaps search for that error