Cesium losing webgl context in Chrome

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

I’ve been seeing an issue(crash) with our Cesium application recently, so I decided to run a Cesium demo app to see if the same problem existed. After running the node server and the Cesium Inspector demo, and I got a similar error which I believe is caused by the same problem(see attached image). Cesium is losing the webgl context. I did recently upgraded to Windows 10. I’m wondering if anyone else has seen this problem with Windows 10/Chrome/Cesium?

WebGL: CONTEXT_LOST_WEBGL: loseContext: context lost

It is possible that my company’s security is causing this issue. By default webgl is disabled, and I have to get an exemption just to enable webgl. Maybe there’s a script or whatever that is causing chrome to drop the context(or even if something like this is possible)

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

http://localhost:8080/Apps/CesiumViewer/index.html?inspector=true&view=-81.18158504165955%2C28.395942560141968%2C156363.545237802%2C359.628079772951%2C-89.5344277060082%2C0

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

NA

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

Cesium 1.38

Windows 10

Google Chrome is up to date

Version 62.0.3202.94 (Official Build) (64-bit)

I started a three.js application and I got the same issue, the webgl context was lost. This issue is not unique to Cesium which is good news.

Does anyone know if the following method has been implemented?

https://www.khronos.org/webgl/wiki/HandlingContextLost

Scott

Hi Scott,

Yes, this is a WebGL problem as a whole. I did open an issue in GitHub here for handling lost WebGL contexts more gracefully.

Thanks!

Gabby

I found a solution to this problem and thought I would post what I found.

It turns out that there are some settings in the Nvidia
Control Panel that allow chrome to access the video card. I’m not sure
if this was something unique to my windows 10 computer or not, but here’s what
I did to fix the problem.

Open the Nvidia Control Panel from the Windows Control
Panel.

Under the 3D Settings entry click the Manage 3D Settings.

In the content area select the Program Settings tab.

Under #1 Select Google Chrome.

Under #2 Select the High Perfomance NVIDIA Processor.

Click the Add button next to the Chrome drop down.

Restart Chrome and then go to any webgl application.

See image if needed.

Scott

Awesome, thanks for following up with a solution, Scott!