[Gltf]: An error will raise when a model is unavailable

Hi, All,
I create a czml has two models. One will live longer than another. When the shorter life model was unavailable an error will raise. It said,

An error occurred while rendering. Rendering has stopped.

DeveloperError: This object was destroyed, i.e., destroy() was called.


at new DeveloperError (

at throwOnDestroyed (

at CompositePrimitive.update (

at updatePrimitives (

at Scene.render (

at CesiumWidget.render (

at Viewer.render (

at render (

I debugged Cesium. I found in render loop the model object still referenced in primitives array, even it’s already unavailable.

Attachment is my test czml.

battlefield.czml (329 KB)

This file didn’t crash for me, but models didn’t load either. You need to swap your “gltf” and “uri” properties in your CZML in order to make it work in master, once you do that, everything works fine.

Hi, Matthew,
Thank you! My Czml is working on master branch.