WebGL context lost error in Chrome browser on Macs
Dear OSweb experts,
I am running an experiment with many trials and many visual elements via JATOS and subjects report that the experiment crashes sometimes. The console mentions:
WebGL: CONTEXT_LOST_WEBGL: loseContext: context lost
start:1 WebGL: CONTEXT_LOST_WEBGL: loseContext: context lost
We cannot reproduce the error in Chrome on Windows computers and suspect that the error is specific for users that run the experiment in Chrome on a Mac computer.
Although Chrome is using quite some RAM (up to 1.5 GB) there is sufficient memory available on the computer. So the RAM issue mentioned here https://forum.cogsci.nl/discussion/6697/ram-overload-when-running-in-osweb seems not to be the source of our error. Moreover, we use the latest version of OpenSesame 3.3.10 so according to that forum thread the issue was solved already in an earlier version of OSWeb.
The post here https://forum.cogsci.nl/discussion/5677/osweb-fails suggests reducing the resolution of the images might fix the problem. We have several PNGs (57 in this experiment), many used for instructions, and some to show a "rotating" response deadline count-down wheel with transparent background. We use a background of 1024x768 and do some stretching of images of size 1067x1067 but I cannot imagine this causes the issue. File size are never higher than 100KB.
After the error the experiment continues in the background and some data is logged but no stimuli are visible on the screen. The browser just shows a blank screen.
Any suggestions for a fix? Perhaps I can use part of the code mentioned here? https://stackoverflow.com/questions/61020416/how-to-handle-webgl-context-lost-webgl-errors-more-gracefully-in-pixijs
For now, I will ask Mac users to use Safari and I will check whether that by-passes the problem.
EDIT: Indeed the experiment does not crash this time in Safari, although it uses up to 6 GB memory. I reported this issue here https://forum.cogsci.nl/discussion/6697/ram-overload-when-running-in-osweb
Thanks for the help!
Best, Henk