Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Crash in ImageBuilder

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

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
swift

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.

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

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

Getting set up

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.

More from mapbox/mapbox-scenekit

All issues in mapbox/mapbox-scenekit

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.