CesiumGS / CesiumGS/cesium

Setting markerSize: 0 with large GeoJSON files causes Cesium to crash.

Open
#6,307 5 comments 0 reactions 0 assignees View on GitHub
category - data sources type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

I've tested this on a MacBook Air with 8GB of memory and a MacBook Pro with 16GB of memory and experienced the issue. A Cesium forum user was unable to recreate the issue on her computer.

When adding a largish GeoJSON file (2,837 unique markers and polylines) to a map and setting the `markerSize : 0` Cesium hangs and crashes WebGL after about 30 seconds of trying to render the map. Leaving markerSize its default size, or setting the color to transparent solves the issue, so my assumption is that setting markerSize uses a lot of memory. When the dataset is smaller, even up to 1,500 markers, Cesium doesn't crash or hang. Additionally, when I don't add the polylines Cesium has no issue when setting markerSize, but I don't know what would happen with extremely large datasets.

Here is a [sandcastle](https://cesiumjs.org/Cesium/Apps/Sandcastle/?src=Hello%20World.html&label=Showcases&gist=6ae31a1e7183a2885d47bdfef3148bd8) where you can see the issue. I set `markerSize : 0` on line 9. If you switch this to `markerColor: Cesium.Color.fromHsl(0, 0, 0, 0)` or just remove the line, the scene will render fine.

Contributor guide

Open the contributing guide

Research direction

Reproduce the crash using the linked Sandcastle example, starting with markerSize: 0 on line 9 and comparing it with the default size and transparent markerColor. Trace the rendering path for the large GeoJSON dataset with markers and polylines; done means markerSize: 0 no longer hangs or crashes WebGL for this case.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics, performance
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.