游戏产生了一个崩溃bug。但是不能很好定位到产生崩溃的根本原因。
猜测可能是在runAction中callback回调中添加了新的action导致,看了下代码觉得有可能,但又不是很确定,有人知道这种添加action的方式可能会产生问题吗?
另外附上一下产生问题的代码,要是有人碰巧遇到过类似的问题,可以提供点思路不?谢谢
void Scheduler::update(float dt)
{
// updates with priority == 0
DL_FOREACH_SAFE(_updates0List, entry, tmp)
{
if ((! entry->paused) && (! entry->markedForDeletion))
{
entry->callback(dt); // <<<<<<<<<<<<<<< 这行
}
}
}
template
inline _LIBCPP_INLINE_VISIBILITY
auto
__invoke(_Fp&& __f, _Args&& ...__args)
-> decltype(_VSTD::forward<_Fp>(__f)(_VSTD::forward<_Args>(__args)...))
{
return _VSTD::forward<_Fp>(__f)(_VSTD::forward<_Args>(__args)...); // <<<<<<<<<<<<<<<<最终停在这 std::__functional_base文件 EXC_BAD_ACCESS (code=1, address=0xd6)
}
```