Hi all, I have a crash on remove from parent node, that crashes in 30% of cases in my app when I try to remove many nodes in the same time. Seems that its crashes in random order.
I wrought such extension to remove them:
extension SCNNode {
func cleanUpChildrenAndRemove() {
self.childNodes.forEach { $0.cleanUpChildrenAndRemove() }
self.removeAllAudioPlayers()
self.removeAllAnimations()
self.removeAllActions()
self.removeAllParticleSystems()
self.removeFromParentNode()
}
}
but nothing helps, I am still crash on self.removeFromParentNode() line, it is note ARC bug, because I hold only 1 weak reference to node at all, seems that is issue of SceneKit at all. I run my app on IOS 11 beta. It it an ARTKit game
Please, If u have any ideas about what can cause this crash, help me.