原因:cocos2dx的bug
解决办法:
放到action中,前面添加一个DelayTime延迟,代码如下
this->runAction(Sequence::create(DelayTime::create(0.1f),CallFuncN::create([&](Node* pNode){pNode->removeFromParent();}),NULL));
解决cocos2dx调用removeFromParent后报错问题
原文:http://www.cnblogs.com/xyida/p/4305311.html