I create scene nodes as below will get a crash.
1. Create 3 scene nodes node1, node2, subnodeOfNode2 sequencely. Where node1, and node2 are the sub node of rootNode, and subnodeOfNode2 is sub node of node2.
2. Delete node1 which cause the order of SceneManager::mSceneNodes to subnodeOfNode2 node2
3. Call SceneManager::clearScene() and crashed.
a. I found in Node destruct
Code: Select all
if( mParent )
{
Node *parent = mParent;
mParent = 0; //We've already called mNodeMemoryManager->nodeDestroyed.
parent->removeChild( this );
}
Code: Select all
assert( !child->getParent() || child->getParent() == this && "Node says it's not our child" );