Note that there are some explanatory texts on larger screens.

plurals
  1. POCCParticleSystemQuad removed prematurely - ios
    primarykey
    data
    text
    <p>I have an ios app that uses cocos2d v1.1.0-beta2b, and encountered a very strange condition with emitters' auto removal.</p> <p>My question is:</p> <p><strong>Is</strong> there any way that an <strong>infinite duration CCParticleSystemQuad</strong>, with an <strong>autoRemoveOnFinished</strong> set to <strong>YES</strong>, will be removed before I call <strong>stopSystem</strong>?</p> <p>Here is some additional info:</p> <p>I initialize the emitter as follows:</p> <pre><code>NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:path]; emitter = [[[CCParticleSystemQuad alloc] initWithDictionary:dict] autorelease]; emitter.duration = -1.0f; [emitter setAutoRemoveOnFinish:YES]; [self addChild:emitter z:10]; </code></pre> <p>Then, it is of course added as a child and everything works perfectly. As suggested in many places, in order to remove it I call:</p> <pre><code>[emitter stopSystem]; </code></pre> <p>After that, when all the particles are gone the emitter is removed as expected.</p> <p>So far all is well.</p> <p>However, I've encountered several crash reports that indicate that the emitter is released prematurely, and then my app crashes on the stopSystem line (as emitter is already released). I got several feedbacks that indicate that it sometimes happen when the device is locked/unlocked during the emitter activity, though for me it works and these crashes are rare. I haven't been able to reproduce the circumstances under which it happens, so I ask you guys again:</p> <p><strong>Is</strong> there any way that an <strong>infinite duration CCParticleSystemQuad</strong>, with an <strong>autoRemoveOnFinished</strong> set to <strong>YES</strong>, will be removed before I call <strong>stopSystem</strong>?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload