We are consistently seeing an issue in which Cesium crashes when plugging in an external monitor. I am using Chrome 42.0.2311.135 (64-bit) on MacOS 10.9.5. It also occurs in Windows and other browsers.
Its definitely is a browser issue, it’s destroying the canvas context and not reinitializing it when the new monitor is connected. I’m not sure if it’s something that Cesium can ever actually prevent from happening due to browser limitations. I’ll ask the team though to see if they have any ideas on this.
There is no feasible way for Cesium to auto-recover for you. How you can handle this yourself would be to add an event handler for the webglcontextlost (
https://www.khronos.org/webgl/wiki/HandlingContextLost
). That method can capture some application state information, destroy the current Cesium instance and initialized the application back to the same place it was before.
Sorry for the necro-thread, but I was wondering if there are any other common external events that would cause context loss like this. I am seeing the exact same problem (both in 2D and 3D) using Cesium 1.20 on Windows 10 using Chrome.
Is the advice from 2015 still valid here? What else could cause context loss, we aren't switching monitors but we are seeing a pop-up command window coincident with the context loss.