Geometry.splitLongitude crashing for polygon that crosses the poles
Reported on the forum: https://groups.google.com/forum/?hl=en#!topic/cesium-dev/O_LaBx1_1wg
ne_10m_admin_0_countries2.json.txt
For some reason this crashes in Sandcastle but not in the CesiumViewer. It also doesn't crash when scene3DOnly = true
var viewer = new Cesium.Viewer('cesiumContainer');
viewer.dataSources.add(Cesium.GeoJsonDataSource.load('../../SampleData/ne_10m_admin_0_countries2.json'));
DeveloperError: normalized result is not a number
Error
at new DeveloperError (http://localhost:8080/Source/Core/DeveloperError.js:44:19)
at Function.Cartesian3.normalize (http://localhost:8080/Source/Core/Cartesian3.js:422:19)
at computeTriangleAttributes (http://localhost:8080/Source/Core/GeometryPipeline.js:1901:24)
at splitLongitudeTriangles (http://localhost:8080/Source/Core/GeometryPipeline.js:2058:17)
at Object.GeometryPipeline.splitLongitude (http://localhost:8080/Source/Core/GeometryPipeline.js:2482:17)
at geometryPipeline (http://localhost:8080/Source/Scene/PrimitivePipeline.js:135:38)
at Object.PrimitivePipeline.combineGeometry (http://localhost:8080/Source/Scene/PrimitivePipeline.js:278:26)
at combineGeometry (http://localhost:8080/Source/Workers/combineGeometry.js:12:41)
at http://localhost:8080/Source/Workers/createTaskProcessorWorker.js:56:42
It also doesn't crash when scene3DOnly = true
That's because we don't need to split the geometry in 3D so this code path never gets calls.
Reported again in https://community.cesium.com/t/geojsondatasource-crash/25540/2.
Also reported in https://github.com/CesiumGS/cesium/issues/12251 / https://community.cesium.com/t/25mb-geojson-file-related-rangeerror-invalid-array-length/35754