# Invalid array length error!

**URL:** <https://community.cesium.com/t/invalid-array-length-error/10983>\
**Category:** CesiumJS\
**Created:** [September 21, 2020, 3:25pm UTC](https://community.cesium.com/t/invalid-array-length-error/10983 "2020-09-21T15:25:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shubham\_Verma](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/shubham_verma/32/3238_2.png) [@Shubham\_Verma](https://community.cesium.com/u/Shubham_Verma)\
**Post date:** [September 21, 2020, 3:25pm UTC](https://community.cesium.com/t/invalid-array-length-error/10983/1 "2020-09-21T15:25:13Z")

</div>

My code is generating multipolygons and trying to render it on Cesium globe, but I am getting the following error. I don’t understand why this error is coming up. Can someone please explain to me why it might be coming up?

RangeError: Invalid array length  
RangeError: Invalid array length  
at Object.PolygonGeometryLibrary.subdivideRhumbLine

---

<div class="post-metadata">

**Author:** ![11115](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/11115/32/3100_2.png) [@11115](https://community.cesium.com/u/11115)\
**Post date:** [September 21, 2020, 5:05pm UTC](https://community.cesium.com/t/invalid-array-length-error/10983/2 "2020-09-21T17:05:48Z")

</div>

If you post your question with some sample code.  
Other member are more easy to answer your question.  
I also newbie at Cesium but to the best of my knowledge ‘Invalid array length’ error’s reason is various. In my case it was from performance reason or polygon coordinates are not normal.

---

<div class="post-metadata">

**Author:** ![Shubham\_Verma](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/shubham_verma/32/3238_2.png) [@Shubham\_Verma](https://community.cesium.com/u/Shubham_Verma)\
**Post date:** [September 22, 2020, 5:20am UTC](https://community.cesium.com/t/invalid-array-length-error/10983/3 "2020-09-22T05:20:49Z")

</div>

Can you please explain how can it be a performance reason?  
Also, is there any way I can validate my multipolygon coordinates so that I will be sure it occurring because of that?

---

<div class="post-metadata">

**Author:** ![Shubham\_Verma](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/shubham_verma/32/3238_2.png) [@Shubham\_Verma](https://community.cesium.com/u/Shubham_Verma)\
**Post date:** [September 22, 2020, 7:59am UTC](https://community.cesium.com/t/invalid-array-length-error/10983/4 "2020-09-22T07:59:30Z")

</div>

I have tested my every multipolygons data using geojson validator([https://geojsonlint.com/](https://geojsonlint.com/)), it validates those multipolygons.

---

<div class="post-metadata">

**Author:** ![Scott\_Reynolds](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/scott_reynolds/32/2014_2.png) [@Scott\_Reynolds](https://community.cesium.com/u/Scott_Reynolds)\
**Post date:** [September 23, 2020, 9:04pm UTC](https://community.cesium.com/t/invalid-array-length-error/10983/5 "2020-09-23T21:04:53Z")

</div>

Can you share a GeoJSON file that demonstrates the problem? How about the call stack when the error occurs? As @11115 says, the more information you can provide the better assistance you will receive.
