react-native-ar / react-native-arkit

React Native binding for iOS ARKit
MIT License
1.72k stars 143 forks source link

WIP: Hopefully fix crash pt. 2 #173

Closed bnjm closed 6 years ago

bnjm commented 6 years ago

Seeing a lot of crashes come from here: https://github.com/react-native-ar/react-native-arkit/blob/master/ios/RCTARKitNodes.m#L344, maybe it helps to return early from this method.

Edit: Actually I think I misunderstood what [node removeFromParentNode]; is doing. First assumption was that objc deallocates unattached nodes so that [self.nodes removeObjectForKey:nodeId]; wouldn't be necessary after removing it from the parent. https://developer.apple.com/documentation/scenekit/scnnode/1407991-removefromparentnode?language=objc