Closed pawelstan closed 8 years ago
It seems that it is trying to render a Sprite somewhere that has no texture, so the Sprite was probably destroyed but left on the display list. It could also be possible that your AnimatedParticle art data is not formatted correctly - see http://pixijs.github.io/pixi-particles/docs/classes/PIXI.particles.AnimatedParticle.html. If you are using the { texture: "textureName", count: 3}
format, but the texture
property doesn't exist or is misnamed, then that would probably try to use undefined
as a texture.
The fun part is that this occurs occasionally without any changes in code or config. Also I havn't found any solid reproduction. Just happens from time to time.
I would go with the "Sprite with no texture", what I can manually destroy to be sure empty sprite is not rendered?
Sorry, I missed your response until now. Were/are you using a ParticleContainer or a regular Container? Upon looking at my cleanup/destruction code, it looks like any particles that are waiting in the pool when an Emitter is destroyed won't get removed from a ParticleContainer.
Hey!
I'm using regular Container cause I need color transform functionality + animatedParticle. When using ParticleContainer, I dont have this issue. So something opposite of your find ;)
I dont think there was a memory leak in ParticleContainer, we double checked that, all was disposed correctly, but I have this issue with TypeError: Cannot read property '_uvs' of undefined in regular Container.
Maybe something is disposed too soon in regular Container? That's why I have this error?
Unless you are destroying Emitters in the middle of a render, I don't think it's possible to destroy stuff too soon.
I've done some general improvements to improve library stability, including making sure destroyed particles get orphaned and making it much more difficult to have a particle without a texture. If you test with the build currently on master, do you still get errors?
Great! thanks! checking
We checked, seems issue is fixed! I will do some more tests later on to be 100% sure. Thanks!
I think this is a good reason to build a 1.6.7 ;) would help us with our production release too ;)
So it was written, so it shall be (and is).
animationSpeed is undefined may lead to this Error.
Hey!
I have a problem with error:
TypeError: Cannot read property '_uvs' of undefined
Its show really randomly, hard to create a reproduction. The problem is with AnimatedParticle.
Do you have any advice what to look for to better track the issue? So I can say more? Using the latest 1.6.6
Cheers, P.