WebGL rendering errors in Google Chrome

2074
6
09-05-2019 01:12 AM
RomanKönig
New Contributor III

We are sporadically experiencing WebGL rendering issues on one of our development computers in Google Chrome.

The whole screen switches to black for a few seconds and after that the Google Chrome (newest version 76) displays an emtpy map. We are using a 2D MapView, layer types are MapImageLayer, FeatureLayer and VectorTileLayer.

We are using JS API 4.11.

Until now we couldn't find any relation between the displayed layers and the error occuring. 

I just wanted to ask if anyone else has experienced something like this and maybe has hints for pinning down the issue.

Google Chrome dev tools shows an error:

requestAnimationFrame (async)
f @ dojo.js:formatted:11387
h @ dojo.js:formatted:11359
l @ dojo.js:formatted:11354
requestAnimationFrame (async)
f @ dojo.js:formatted:11387
h @ dojo.js:formatted:11359
l @ dojo.js:formatted:11354
VM1907:103 Uncaught TypeError: Failed to execute 'shaderSource' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLShader'.
at a._loadShader (eval at <anonymous> (eval at <anonymous> (dojo.js:6)), <anonymous>:103:238)
at a.initialize (eval at <anonymous> (eval at <anonymous> (dojo.js:6)), <anonymous>:93:457)
at a.bindProgram (eval at <anonymous> (eval at <anonymous> (dojo.js:6)), <anonymous>:647:240)
at q._drawFill (eval at <anonymous> (eval at <anonymous> (dojo.js:6)), <anonymous>:133:20)
at q.render (eval at <anonymous> (eval at <anonymous> (dojo.js:6)), <anonymous>:127:371)
at p._renderFill (eval at <anonymous> (eval at <anonymous> (dojo.js:6)), <anonymous>:105:215)
at p.renderBucket (eval at <anonymous> (eval at <anonymous> (dojo.js:6)), <anonymous>:99:20)
at h.doRender (eval at <anonymous> (eval at <anonymous> (dojo.js:6)), <anonymous>:73:163)
at p.hitTest (eval at <anonymous> (eval at <anonymous> (dojo.js:6)), <anonymous>:103:301)
at h._hitTest (eval at <anonymous> (eval at <anonymous> (dojo.js:6)), <anonymous>:87:191)
a._loadShader @ VM1907:103
a.initialize @ VM1907:93
a.bindProgram @ VM1907:647
q._drawFill @ VM2007:133
q.render @ VM2007:127
p._renderFill @ VM2007:105
p.renderBucket @ VM2007:99
h.doRender @ VM2007:73
p.hitTest @ VM2007:103
h._hitTest @ VM2007:87

After restarting the browser everything works fine again using the same code and layers, so the problem seems not to be directly related to our application.

0 Kudos
6 Replies
mgeorge
Esri Contributor

Sorry Roman König‌ I personally haven't seen this error, but it does look like something WebGL related. Do you know if you can still reproduce this on 4.12? Also what kind of map interaction results in this error? Do you consistently get it just from loading the map, or does it require you to zoom in/out or pan? 

0 Kudos
RomanKönig
New Contributor III

Thanks for your reply, Matt.

At the Moment we are working with the 4.11 API, so i cannot tell if it also happens on 4.12.

The problem occurs on a daily basis, say once whilst developing 7 hours with the API. Until now we couldn't pin it down to any specific action that triggers the problem.We are adding/removing, setting visibility of Layers in a MapView and it happens not only on interacting with the view but e.g. when adding a layer.

We'll keep trying to figure out if there is a pattern in occuring this error, just wanted to ask if it is a known problem and anyone else has also seen this.

0 Kudos
mgeorge
Esri Contributor

Hmm we did change the way the hittest works for 4.13, so it might be better next release. There may be some kind of race condition here. Do you know what hardware the affected device is using? (CPU/GPU)

0 Kudos
mgeorge
Esri Contributor

One more thing Roman König‌, if you have a large number of tabs with the API open at the same time, that can result in rendering contexts getting lost and various WebGL errors popping up; the max number of WebGL contexts is unfortunately shared across all tabs in the browser. 

0 Kudos
RomanKönig
New Contributor III

Hi Matt, 


the hardware specs of the affected system are:

- OS: MS Windows 10 Pro
- CPU: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz, 3601 MHz, 4 Kern(e), 8 logische(r) Prozessor(en)

- RAM: 16.0 GB 
- GPU: Intel(R) HD Graphics 630, 1.00 GB

Multiple browser tabs opened should not be the case. There's only one browser tab opened with the application using the js api.

0 Kudos
mgeorge
Esri Contributor

Thanks Roman, that helps narrow things down. I'll keep note of your machine, and if we see others running into the same issue on that device we'll try to get access to one and see if we can reproduce. It may also help to check and see if your drivers are up to date. Going to dig through and see if we've encountered any similar reports. 

0 Kudos