CesiumGS / CesiumGS/cesium

RangeError reported in PolylineGeometryLibrary.subdivideRhumbLine

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

Description

I'm getting a crash in master trying to display time zones that are in a GeoJSON file.

[ne_10m_time_zones_bug.zip](https://github.com/AnalyticalGraphicsInc/cesium/files/2846330/ne_10m_time_zones_bug.zip)

`RangeError: Invalid array length
RangeError: Invalid array length
at Object.PolygonGeometryLibrary.subdivideRhumbLine (http://localhost:8080/Source/Core/PolygonGeometryLibrary.js:207:26)
at createGeometryFromPositions (http://localhost:8080/Source/Core/PolygonOutlineGeometry.js:90:60)
at Function.PolygonOutlineGeometry.createGeometry (http://localhost:8080/Source/Core/PolygonOutlineGeometry.js:555:36)
at createPolygonOutlineGeometry (http://localhost:8080/Source/Workers/createPolygonOutlineGeometry.js:16:39)
at createGeometry (http://localhost:8080/Source/Workers/createGeometry.js:47:40)
at callAndWrap (http://localhost:8080/Source/Workers/createTaskProcessorWorker.js:20:31)
at http://localhost:8080/Source/Workers/createTaskProcessorWorker.js:66:25`

Sandcastle example:

`var viewer = new Cesium.Viewer('cesiumContainer');
viewer.dataSources.add(Cesium.GeoJsonDataSource.load('../../SampleData/ne_10m_time_zones_bug.geojson'));
`

Browser:

Chrome Version 72.0.3626.96 (Official Build) (64-bit)

Operating System:

Windows 10

Contributor guide

Open the contributing guide

Research direction

Reproduce the crash with the Sandcastle example and the linked time-zone GeoJSON, then inspect Source/Core/PolygonGeometryLibrary.js around subdivideRhumbLine and its callers in Source/Core/PolygonOutlineGeometry.js. Trace the worker path shown in the stack trace. Done means the time-zone GeoJSON loads without an Invalid array length error and its polygon outlines render.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.