mapbox / mapbox/mapbox-gl-js

Assertion error thrown during Mercator-globe transition

Open
#12,057 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3d :triangular_ruler: bug :lady_beetle:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

mapbox-gl-js version: main since https://github.com/mapbox/mapbox-gl-js/pull/11329

browser: Chrome and Firefox

Steps to Trigger Behavior
  1. Open a globe with a development build of GL JS
  2. Position the map at high pitch and near the antimeridian, and > zoom 6 (e.g. http://localhost:9966/debug/projections.html#6.08/21.605/-157.219/-15.9/85)
  3. Enable default fog (`map.setFog({}))
  4. Zoom out across globe transition

The following error appears in console:

{
    "name": "AssertionError",
    "actual": false,
    "expected": true,
    "operator": "==",
    "message": "Invalid aabb min and max inputs, min[i] must be < max[i].",
    "generatedMessage": false
}

Looking at the stack trace this is coming from transform.coveringTiles():
https://github.com/mapbox/mapbox-gl-js/blob/fb857af74c0923d8b26fa580e730d5128a9554d0/src/geo/transform.js#L991

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

Reproduce the failure in debug/projections.html using the supplied high-pitch, near-antimeridian view, default fog, and zoom-out across the globe transition. Start at src/geo/transform.js in transform.coveringTiles(), then verify that the same transition no longer raises the invalid AABB assertion.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.