@padmnabh wrote:
Hi,
Can anyone help me understand ActionManager update method I am trying to debug one of severe crash in my iOS application and some ow it usually point's to this method so I just need someone who can help me with the flow call of this method.Basically I need to understand
void ActionManager::update(float dt)
line +36// Make currentAction nil to prevent removeAction from salvaging it. _currentTarget->currentAction = nullptr;
line +56
// issue #635
_currentTarget = nullptr;what are these two lines performing and who all are callers participating in this i.e how can i try and point the _currentTarget in this
Till now I am able to find that
My call on any node'sstopAllAction()
will invokeremoveAllActionsFromTarget(this);
void Node::stopAllActions()
{
_actionManager->removeAllActionsFromTarget(this);
}which in turn will do some retain() for that node
void ActionManager::removeAllActionsFromTarget(Node *target)
if (ccArrayContainsObject(element->actions, element->currentAction) && (! element->currentActionSalvaged))
{
element->currentAction->retain();
element->currentActionSalvaged = true;
}and this gets removed on next void ActionManager::update(float dt) call
but i am still somehow confused on call hierarchy as I am now checking everynode->getNumberOfRunnignAction > 0
before calling stopAllAction so still is there any chance my call can somehow point to unknown memory location causing a crash or is there something else also invloved in this whole scenario as I am confused now I have aDirector::getInstance()->getRunningScene()->runAction(seq);
call and inside this sequence there will be someNode->stopAllAction()
do they somehow affect parent or are limited to that Node.Anything relate to
ActionManager::update(float dt)
will be helpful.
Posts: 1
Participants: 1