removeAllActionsFromTarget: Target not found

removeAllActionsFromTarget: Target not found
0.0 0



I upgraded my code to 0.8.5.
Since then I notice a log of “removeAllActionsFromTarget: Target not found” debug messages. Can you please tell me if this is an issue ?



It means that, there is no action attached to the target.


And is this a problem or not?
Am I doing something wrong? Am I calling some framework method that I shouldn’t?



It has no effect if there is no action.
It is just a warning, just like the compiler.
But why do you call this method for a object that has no action attached?
Is it an error of your logic?


I don’t call this method directly.
The game is over and I replace the game scene. When this is happening, all the sprites are deallocated and I think that the removeAllActionsFromTarget is called when the sprites are deallocated.


Yes, many other functions will call it, like CCNode::stopAllActions().
May be you should hint a breakpoint in removeAllActionsFromTarget(),
look the call stack, and find how it is called.


Hi, Adi Fly, you don’t need to care about this log, unless you find anything is wrong.
When the a CCNode cleanup, stopAllActions & unscheduleAllSelectors will be invoked. If you haven’t binded any action to this node (it’s very common), then it will print this log “target not found”.


Ok, thanks!


use this…

if (this~~>numberOfRunningActions) this~~>stopAllActions();


yet ,sometimes we want to stop one action but we are not sure the conditions.
&& m_pCounterAction)=NULL
&& m_pCounterAction~~>getTarget!=NULL){

but still can see “removeAllActionsFromTarget: Target not found” debug messages.
and I try to use isDone() function,but
it always return true;