Null Exception in CCActionManager

Hi,
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;
if
{
// The ‘actions’ CCMutableArray may change while inside this loop.
for *
m_pCurrentTarget~~>actionIndex++)
{
m_pCurrentTarget~~>currentAction = m_pCurrentTarget~~>actions~~>arr[m_pCurrentTarget~~>actionIndex];
if
{
continue;
}
m_pCurrentTarget~~>currentActionSalvaged = false;
m_pCurrentTarget~~>currentAction~~>step;
if
{
// 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.
m_pCurrentTarget~~>currentAction~~>release;
} else
if )
{
m_pCurrentTarget~~>currentAction~~>stop;
CCAction
pAction = m_pCurrentTarget~~>currentAction;
// Make currentAction nil to prevent removeAction from salvaging it.
m_pCurrentTarget~~>currentAction = NULL;
removeAction(pAction);
}

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)
{
deleteHashElement(m_pCurrentTarget);
}
}

// 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?


Captura de pantalla 2013-07-16 a la(s) 11.28.33.png (447.6 KB)

1 Like