Intermittent error: "TypeError: Cannot set property 'geometry' of undefined"

I am attempting to create ~5000 3D boxes overlaid onto the globe, generating each corner point based on a particular map projection (the NDFD 2.5 km grid). For each of these cells, I call:

Hello,

From the code you posted, everything looks fine. Is there a code snippet or some data you could share that consistently reproduces this error?

I’m not sure if this will fix the problem, but if your polygons are always boxes like this, you should consider using a Rectangle instead. Take a look at this demo: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Rectangle.html&label=Geometries

It takes in a Rectangle as coordinates, defined by west, south, east, north. It renders more efficiently than a polygon for this kind of shape.

-Hannah

I am also having a similar problem. I am performing a jsonp request on an ArcGIS map server database and returning the geometry for multiple (sometimes hundreds) of polylines. I add each polyline using the viewer.entities.add() method. Adding the polylines works great. Where the problem starts is when I try to remove a couple of these polylines from the group based on a certain test that I run. With each batch of multiple polylines, I usually intend to remove at least a couple. It always crashes due to the SECOND viewer.entities.removeById() function that is called. That is another strange tidbit. I call that function on a polyline and on a label. Removing the labels doesn't generate the error. That is as far as I've been able to isolate the problem. If I do not call the remove polyline entity function, it never crashes. Here is the error that I get on the crash:

An error occurred while rendering. Rendering has stopped.
undefined
TypeError: Cannot set property 'geometry' of undefined
TypeError: Cannot set property 'geometry' of undefined
    at Object.B.unpackCombineGeometryParameters (http://127.0.0.1:8000/static/nfie_data_viewer/vendor/cesium/Build/Cesium/Workers/combineGeometry.js:61:25690)
    at r (http://127.0.0.1:8000/static/nfie_data_viewer/vendor/cesium/Build/Cesium/Workers/combineGeometry.js:61:27784)
    at DedicatedWorkerGlobalScope.<anonymous> (http://127.0.0.1:8000/static/nfie_data_viewer/vendor/cesium/Build/Cesium/Workers/combineGeometry.js:61:27296)

I have isolated the code that pertains to this process here:

https://gist.github.com/shawncrawley/d82a95d081da014dd05a

Let me know if you have any ideas of why this error is occurring. Thank you.

I am seeing this problem as well, with polygons or ellipses I'm adding and then trying to erase. I was hoping that cesium 1.20, with its fixes for bugs 3738 and 3739 would fix it, but the problem still occurs with v1.20.

Hello,

Can you please paste a code sample that runs in Sandcastle to reproduce the problem? Thanks!

-Hannah