Hey, I ran into this while writing shutdown cleanup for my plugin's models on R4.2.0 (the 2026-11-17 build).
When a model's render throws inside the updater, ModelUpdaters.tick catches the Throwable and skips the rest of that model's pass, so POST_MODEL_RENDER never fires for it that tick. On top of that, ModelUpdaters.end() just shuts the executor down without firing anything, so plugins get no signal that the updaters are stopping.
Why it matters for me: on disable, my plugin destroys its own models. To avoid destroying a model mid-render, it waits (bounded) for the pass in progress, and if that wait fails it marks the model and destroys it from that pass's POST_MODEL_RENDER.
That works fine, except when the render itself throws. Then the model only gets cleaned up on a later pass, and if the server is shutting down there is no later pass, so it never gets destroyed by my plugin. It's packet-only so it goes away when players disconnect, and it's not a crash, but I end up logging a SEVERE leak on shutdown that I can't fix from my side.
To reproduce:
- Register a
POST_MODEL_RENDERlistener and spawn a model. - Make that model's render throw once (e.g. a bone behaviour that throws during render).
POST_MODEL_RENDERdoesn't fire for that model that tick.- Stop the server in that state: nothing reaches the plugin from
ModelUpdaters.end().
Either of these would solve it for me:
- Fire
POST_MODEL_RENDEReven when the render threw (like afinally), or add a separate failed-render event. - Fire an event or callback when the model updaters shut down, so plugins can do their final teardown on the right thread before the executor stops.
Thanks!