-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Closed
Description
Step to reproduce the issue:
- run test-cpp
- enter
Node:clipping -> Clipping To RenderTexture - will crash sometimes on iOS and will 100% crash on Android
The problem is in this code
auto button = MenuItemFont::create("Reproduce bug", [&](Ref *sender) {
enumerateChildren("remove me [0-9]", [&](Node *node) {
this->removeChild(node);
this->reproduceBug();
return false;
}
);
});Invoke removeChild() and addChild()(invoked in reproduceBug()) in the callback of enumerateChildren(). Because enumerateChildren() will iterate children, so it is not safe to remove or add a child.
@ricardoquesada
I found you added the test case, and i don't know why you do it like this.
Any idea?