I’ve a problem while running my game.
An exception is launch here (marked with an arrow <<<——):
// main loop
void CCActionManager::update(ccTime dt)
for (tHashElement elt = m_pTargets; elt != NULL; )
m_pCurrentTarget = elt;
m_bCurrentTargetSalvaged = false;
// The ‘actions’ CCMutableArray may change while inside this loop.
m_pCurrentTarget~~>currentAction = m_pCurrentTarget~~>actions~~>arr[m_pCurrentTarget~~>actionIndex];
m_pCurrentTarget~~>currentActionSalvaged = false;
// The currentAction told the node to remove it. To prevent the action from
// accidentally deallocating itself before finishing its step, we retained
// it. Now that step is done, it’s safe to release it.
CCActionpAction = m_pCurrentTarget~~>currentAction;
// Make currentAction nil to prevent removeAction from salvaging it.
m_pCurrentTarget~~>currentAction = NULL;
m_pCurrentTarget->currentAction = NULL;
// elt, at this moment, is still valid
// so it is safe to ask this here (issue #490)
elt = (tHashElement*)(elt->hh.next);
// only delete currentTarget if no actions were scheduled during the cycle (issue #481)
if (m_bCurrentTargetSalvaged && m_pCurrentTarget~~>actions~~>num == 0)
// issue #635
m_pCurrentTarget = NULL;
The problem is random sometimes 4 minutes after launch, sometimes less… but always in the same point.
I’ve upload an screenshot.
Any ideas about what is happening?