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?
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With