mapbox/mapbox-scenekit

Frequently there's a crash when fetching terrain texture - Using Objective - C (There's no log about the issue)

Opened this issue · 1 comments

if(_terrainNode != nil){
_terrainNode.scale = terraindNodeScale;
_terrainNode.geometry.materials = [self _defaultMaterials];
[self.scene.rootNode addChildNode:_terrainNode];
NSLog(@"Agrega terreno a 4riders");

    [_terrainNode fetchTerrainAndTextureWithMinWallHeight:50.0 multiplier:2 enableDynamicShadows:YES textureStyle:@"mapbox/satellite-streets-v9" heightProgress:nil heightCompletion:^(NSError * _Nullable fetchError) {
        if (fetchError) {
            NSLog(@"Texture load failed: %@", fetchError.localizedDescription);
        } else {
            NSLog(@"Terrain load complete");
        }
    } textureProgress:nil textureCompletion:^(UIImage * _Nullable image, NSError * _Nullable fetchError) {
        if (fetchError) {

// NSLog(@"Texture load failed: %@", fetchError.localizedDescription);
}
if (image) {
NSLog(@"terrain texture fetch completed");
self->_terrainNode.geometry.materials[4].diffuse.contents = image;
}
}];
}

#79 might resolve this