Toggling layer visibility causes render error

This has been a problem since the release of 1.20, and it persists in version 1.23. We have reverted to 1.19 for the moment, which does not have this problem.

Toggling the visibility of imagery layers in Cesium causes a render error after a few times. Take a look at the following Sandcastle, which is a simple modification of the "Imagery Layers" sandcastle already available on cesiumjs.org:

Hello,

Thanks for including the code example! I was able to reproduce this right away.

I’ve created an issue here for us to look into it: https://github.com/AnalyticalGraphicsInc/cesium/issues/4083

I’m not sure of a good workaround. I think it’s something we would have to fix on our end.

Best,

Hannah

This should be fixed with this PR: https://github.com/AnalyticalGraphicsInc/cesium/pull/4258

If you can give it a try, great. Otherwise I’m hoping to get it into master for Thursday’s release.