mapbox / mapbox/mapbox-scenekit

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

Open
#77 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
232
Forks
50
PR merge metrics
No merged PRs in 30d

Description

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;
}
}];
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the fetchTerrainAndTextureWithMinWallHeight:multiplier:enableDynamicShadows:textureStyle: entry point and the height and texture completion callbacks shown in the report. Reproduce the terrain texture fetch and capture the crash or underlying error, then verify that the failing path completes without crashing and provides useful diagnostic output.

Written by the indexing model from the issue text.

Assessment

Tech stack
objective-c, swift
Domain
computer-graphics, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.