mapbox / mapbox/mapbox-scenekit
Crash in BezierSpline3D -> getProgressProperties
- Dominant language
- Swift
- Stars
- 232
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
Description
The code crashed in line 58, which is:
```let spineSegmentStartIndex: Int = min(Int(absoluteProgress), curvePoints.count - 2 - pad * 2) // Integer time for the index of the starting curvePoint```
`absoluteProgress` is `NaN`, `curvePoints.count` is `4`, `pad` is `1`.
Unfortunately, I'm not sure why `absoluteProgress` isn't a number. However, at the moment, it is happening in 100% cases I'm trying to render a route.
Contributor guide
Research direction
Start in BezierSpline3D.getProgressProperties at line 58, where absoluteProgress is passed to Int while rendering a route. Reproduce the route-rendering crash and trace why absoluteProgress becomes NaN; done means the route renders without this crash and the invalid-progress case is handled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100