Closed LukeWood closed 1 year ago
Some additional information:
The code causing this error is a react-pixi-fiber component: https://gist.github.com/LukeWood/3e2b40564be8f12690b2c8500c033de9
Hmm, Particle.emitter
would only be null if the particle (and emitter) had been destroyed. That process should correctly clean everything up, and it looks like you have reasonable safeguards in place to not reuse a destroyed emitter, but my initial thoughts are that in spite of the safeguards somehow a destroyed emitter is being reused. You'd need to log out when things are destroyed, properties updated, and emitter updated to determine that.
Thanks for the quick reply.
Yeah - I’ve done a bit of logging but it’s a hard issue to repro only occurring once out of every 200~ emitters or so. I’ll be sure to post back here if I can find a definitive root cause.
One thing that DOES work in my checks is checking:
instance.emitter.emit before updating. Unfortunately this doesn’t play well with my playOnce particles.
( Outdated as this is maybe 10 versions old)
For some reason when creating many particle emitters I occasionally encounter this error.
This occurs inside of the Emitter.update method as the stack trace suggests.
Pixi-particles version: 4.3.0 pixi version: 5.3.3