Columbus View zooming in sometimes renders everything black

1. A concise explanation of the problem you’re experiencing.

We are using a slightly modified version of Cesium 1.61. Where some times everything rendered in the cesium-widget goes black when zooming in. When I zoom out again it stops being black. Not a large zoom, from 30px being 400m to 30px being 350m. When this happens I get no errors or anything which could indicate what the problem could be. As this is a slightly modified version of cesium I’m just wondering if anyone could give me some pointers of what could cause a the canvas to render everything black, not not rendering anything at all, not sure which, probably the latter. Or is there some error reporting I can turn on or a specific place in the code that could be responsible?

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

As its modified I can’t reproduce it here.

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

4. The Cesium version you’re using, your operating system and browser.

Happens in all blink and webkit browsers. Haven’t been able to reproduce it in firefox yet. It happened in version 1.58 as well, before that we use 1.42 where it didn’t happen.

Is it the globe that goes black, or the entire canvas? If it’s just the globe, it sounds like the ground atmosphere might be causing it. This is similar to this issue here:

It would explain why it happens in 1.58 but not in 1.42, because I think the ground atmosphere was added around 1.50.

Everything goes black. Nothing at all visible.

Found the problem! There was two bugs introduced by us. The first one was that we accidentally inserted two NaN values for X & Y in a Cartesian2 for pixelOffset on a label.

A quick fix which wasn’t tested was added in View.js -> createPotentiallyVisibleSet which was to check if numFrustums was NaN close to the end. This makes the rendering look like its working most of the time. Except in some rear cases when all turns black which in our case was related to the zoom and performance of the pc running it.

Ah, glad you caught that, and thanks for sharing! It’s good to know what to suspect now if someone encounters a sudden black screen like that.