mapbox / mapbox/mapbox-scenekit
Crash in ImageBuilder
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 232
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
Description
```
func addTile(x: Int, y: Int, image: UIImage) {
context?.draw(image.cgImage!, in: CGRect(origin: CGPoint(x: CGFloat(x) * tileSize.width, y: CGFloat(Int(imageSize.height / tileSize.height) - y - 1) * tileSize.height), size: tileSize))
}
```
The force unwrap crashes sometimes
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ImageBuilder and the addTile(x:y:image:) method shown in the issue. Inspect when UIImage.cgImage is nil and determine the appropriate behavior for that case, then reproduce the intermittent crash and verify that image tiling no longer force-unwraps a missing image representation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- computer-graphics, mobile-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100