Out of memory crash
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
mapbox-gl-js version: 2.8.2
browser: FF
Steps to Trigger Behavior
I haven't fully narrowed this down, but it's completely consistent and reproducible at my end. The cause was some bad mbtiles served locally.
The TileJSON looked like this:
{
"basename": "SRA_PS_Current_Base.mbtiles",
"id": "SRA_PS_Current_Base",
"filesize": 24576,
"scheme": "xyz",
"name": "Untitled",
"center": [
-122.444,
37.7908,
12
],
"bounds": [
-180,
-85.0511,
180,
85.0511
],
"format": "png",
"minzoom": 0,
"maxzoom": null,
"tiles": [
"http://localhost:4001/tiles/SRA_PS_Current_Base/{z}/{x}/{y}.png"
],
"tilejson": "2.0.0"
}
Call addSource as normal, the tileJSON is fetched without issue. Then call addLayer to add a line feature. The browser locks up, and eventually:

I speculate that maybe the maxzoom: null is at fault here.
(I do not anticipate doing further, unpaid, work to help create a repro case. Good luck.)
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 by reproducing the reported sequence with the supplied TileJSON: call addSource, then addLayer for a line feature in Firefox. Investigate how the null maxzoom and locally served mbtiles are handled during tile loading. Done means identifying and preventing the out-of-memory lockup, with the behavior covered by a regression test if the project has an appropriate test location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100