Error when loading many models, Expected sizeInBytes to be greater than 0

Hi everyone

I want to load large amount of gltf 2.0 models into Cesium.

But sometimes the viewer goes broken during the loading process.

The error is "Expected sizeInBytes to be greater than 0, actual value was 0"

Sometimes, it works fine without error.

I don’t know what the error above means.

Any help is appreciated.

Thanks

Chris

I haven’t seen that one before…

Would you be able to send me the tileset to debug?

HI Sean

The models are not 3d-tiles tileset.

I just render gltf models one by one, using the viewer.scene.primitives.add() and Model.fromGltf().

I think there may be something wrong with the gltf model. But I don’t know which is wrong.

Sometimes all the models can be rendered without error.

Chris

在 2018年2月27日星期二 UTC+8上午9:09:32,Sean Lilley写道:

Do you know how much memory the models use? It could be an out of memory error.

Hi Sean

Can you tell me the way to see memory usage of models?

Chris

在 2018年3月2日星期五 UTC+8上午9:42:34,Sean Lilley写道:

You can get the memory usage of each model with:

model.geometryByteLength + model.texturesByteLength

These are private variables, but they’re helpful for debugging purposes.

Thanks Sean

I have solved the problem by using readPromise.then() to load the model one by one.

It seems I’ve load too many models in one time.

在 2018年3月23日星期五 UTC+8上午7:01:30,Sean Lilley写道: