You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This example creates a polyline via CZML, then processes a second document which deletes one of the endpoint positions, then immediately recreates it.
This crashes:
Sandcastle-client.js:20 TypeError: Cannot read property 'getValueInReferenceFrame' of undefined
at ReferenceProperty.getValueInReferenceFrame (Cesium.js:128476)
at PositionPropertyArray.getValueInReferenceFrame (Cesium.js:128013)
at PositionPropertyArray.getValue (Cesium.js:127979)
at PolylineGeometryUpdater._onEntityPropertyChanged (Cesium.js:155733)
at Event.raiseEvent (Cesium.js:12972)
at Entity.<anonymous> (Cesium.js:80710)
at Event.raiseEvent (Cesium.js:12972)
at PolylineGraphics.<anonymous> (Cesium.js:80710)
at Event.raiseEvent (Cesium.js:12972)
at PositionPropertyArray._raiseDefinitionChanged (Cesium.js:128063)
This is because PolylineGeometryUpdater.prototype._onEntityPropertyChanged responds to the property being deleted by immediately trying to get the value, and ReferenceProperty crashes when it is asked to get the value.
@mramato do you remember why we made ReferenceProperty crash rather than return undefined? It's been so long that I don't know if there was a reason or not.
The text was updated successfully, but these errors were encountered:
The only explanation I have is very early on, we assumed properties were never undefined and that we wanted to "fail fast" instead of letting bad/unexpected data in. Obviously that's changed quite a bit (For the better).
Sandcastle example
(load then click the Test button)
This example creates a polyline via CZML, then processes a second document which deletes one of the endpoint positions, then immediately recreates it.
This crashes:
This is because
PolylineGeometryUpdater.prototype._onEntityPropertyChanged
responds to the property being deleted by immediately trying to get the value, andReferenceProperty
crashes when it is asked to get the value.@mramato do you remember why we made
ReferenceProperty
crash rather than return undefined? It's been so long that I don't know if there was a reason or not.The text was updated successfully, but these errors were encountered: