RAM overload when running in OSWeb
Dear all,
The experiment works fine in opensesame. When I run it in browser, it starts to increase the memory load and it continues to increase it at every trial until it crashes with a black screen, throwing the following error in the console:
"WebGL: CONTEXT_LOST_WEBGL: loseContext: context lost"
At first I thought it was a problem related to the hardware acceleration setting of the browser, then I noticed the abnormal memory load.
Setting disable_garbage_collection to 'yes' or 'no' doesn't fix the problem.
I add other info that might be of some help:
-At every trial the increase in memory load is roughly between 60 and 100 MB.
-The size of the images I use is 10 kb at most and the experiment shows 9 images in every trial. There are 17 images in total in the file pool.
-The problem appears running in OSWeb both locally and on Jatos.
-These are my system information:
Thanks for your attention.
Damiano
Comments
HI @DamianoG ,
What browser and operating system are you using? And could you attach the experiment here, or (even better) a simplified version of the experiment that also has this problem? That might shed some light on the issue.
— Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi @sebastiaan ,
I tried the experiment in the last version of Edge (87.0.664.47) and Chrome (87.0.4280.66). I also tried it with the different back-ends.
I attach an extremely simplified version that has the same problem:
Thank you for your help!
Damiano
Hi @DamianoG ,
I don't experience exactly the same issue, but I do see weird memory behavior. Specifically, as long as I keep the OSWeb tab active, things are fine, but if I switch to another tab, then memory consumption suddenly explodes from around 40 Mb to over a gigabyte. Could that also be the case for you? Or do you also see memory consumption growing if you keep the OSWeb tab focused?
I don't fully understand where this issue comes from, but it's certainly related to the fact that you use very large images and then scale them down on the
sketchpad. If you simply use smaller images to begin with, the issue will likely be gone or at least much reduced. (This leaves the question of why these large images cause this erratic behavior, but that's perhaps less relevant for you as long as the experiment works.)— Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi @DamianoG and others (@LouisaB ),
I had to learn some new JavaScript debugging tricks to get to the bottom of this 😎 but I think I managed to fix it. There's a pull request waiting for review and if @Daniel also agrees with this then we'll include with OpenSesame 3.3.6, which we will release in the coming days.
— Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi @sebastiaan,
that's great! I am really happy the issue I raised will eventually lead to some changes in the next update. Thank you very much for your effort!
For replying to your previous post:
-Simply use smaller images to begin with, the issue will likely be gone or at least much reduced.
I am going to reduce the size of the images as you suggested.
-Could that also be the case for you? Or do you also see memory consumption growing if you keep the OSWeb tab focused?
I have the same problem with only one tab opened (I tried it on Chrome).
Best,
Damiano
Dear everyone,
the problem has been solved by the new update. (3.3.6 Lentiform Loewenfeld, released on Dec 4, 2020)
Best,
Damiano
I am using OpenSesame 3.3.10 and I am currently running a long experiment in Safari on a Mac and the browser starts to consume up to 6 (!) GB of RAM whereas the entire experiment including images is < 2MB. Is it possible there is still another memory leakage?
Hi @HenkvanSteenbergen ,
@Fab reported a similar memory leak (which is not yet fixed as of OSWeb 1.3.0) in this discussion. Does it look like that's what you're running into? If so, maybe you can chip in that discussion. I really want to resolve this issue, but it's not trivial to find out where it comes from.
— Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Yes, very similar. I will chip in that discussion