[Open] Memory leak when using PsychoPy back end
Hello all.
I'm working on a visual search experiment that has about 800 trials in total. I've already generated the stimuli so all OpenSesame is doing is displaying these images in a random order. Timing is critical, so I've chosen to use the PsychoPy back end, however, after a certain number of trials (about 300 or so) OpenSesame throws a runtime error and crashes.
I ran some more tests whilst watching memory usage, and everything seems to be ok for about 200 trials, but after that the program seems to be no longer freeing memory and continues to eat RAM till it hits about 1.5GBs before the runtime error shows up again.
I've tested with Expyriment, however it won't even open when I run the experiment and crashes out straight away. Legacy allows me to run the experiment in it's entirety but timing is critical so I'd prefer having the blocking flip that PsychoPy and Expyriment offer. I've also attempted to run as a separate process to no avail and tried to use pygame instead of pyglet in the PsychoPy back end settings but that also throws an error about font not having a dpi property.
If I have less trials PsychoPy will work, but I'd prefer to have one experiment rather than split it into 4 different experiments of varying trials (this also messes up with the randomness of the stimulus display).
Any help in getting around this issue would be great.
Comments
Hi,
It sounds like the stimuli are not freed from memory after being shown. But you'll have to be a bit more specific so that we can say more about it. How are you exactly presenting the stimuli? Are you using a
sketchpad
and, if so, what does your experimental structure look like? Or are you using aninline_script
to present your stimuli and, if so, what does it look like?By the way, if this is a manual response time experiment, I wouldn't worry too much about the added temporal jitter of the legacy back-end. It's really only an issue if you want to do super finegrained things, like ERP analyses or gaze-contingent eye-tracking stuff. Personally, I would in most cases prefer stability over a marginal gain in temporal precision.
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!