Error: WebGL: Exceeded 16 live WebGL contexts for this principal, losing the least recently used one

ε祈祈猫儿з 提交于 2019-12-18 18:36:22

问题


I have a JavaScript using the THREE.js package, I made some changes, saw the error, and undid all of the changes I have made.

However, the following error remained:

Error: WebGL: Exceeded 16 live WebGL contexts for this principal, losing the least recently used one.

A google-search did not reveal something useful (16 hits!).

Anyone has any idea what is going on? Maybe this error has nothing to do with my script, but with the browser itself?


回答1:


In my case, the solution was as simple as closing the browser window, opening a new one and reloading your project. The error appears only after I've reloaded my project in the same window more than 16 times.




回答2:


I'm seeing this error in FireFox (55) it's happened across a number of small test projects I've been working on.

The only solution I've found is to close and reopen FireFox, which leads me to believe that something isn't getting cleared out upon a page refresh. I've also noticed that leaving my browser open over night can result in very poor performance the following day until I reboot my PC. Perhaps either a Threejs issue or a FireFox (55) one when dealing with WebGL.

I'm going to continue investigating it as I work.




回答3:


There is a fixed number of WebGL context instances available in Chromium, 16: https://code.google.com/p/chromium/issues/detail?id=226868

It is possible you've either got 17+ tabs open simultaneously or you have one or context with a combined pixel resolution greater than 16 * 1024 * 1024.



来源:https://stackoverflow.com/questions/33800600/error-webgl-exceeded-16-live-webgl-contexts-for-this-principal-losing-the-lea

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!