[open] Problem with video memory/ texture corruption at the end of experiment
Dear all,
Recently I started working with Open Sesame and find it very nice to work with! When I was debugging my experiment, I ran into a video memory problem (I think!) and was hoping the forum could give me some advice how to fix this.
In brief, the experiment is about measuring approach/avoidance behavior. The participant has to move a stickman towards or away from a stimulus. Depending on prior instructions and the type of stimulus, the participant receives specific feedback after each trial and block.
Now the problem:
The experiment works exactly as I want it to work, however, after approximately 500 trials (9 blocks), the stimuli are not presented properly on the screen anymore:
1. the little stickman starts flickering or disappears from the screen
2. the feedback screen is not presented anymore after each trial
3. text is missing in the block feedback screen
4. the experiment doesn't close immediately when using the Esc button
I tried the Psycho and Legacy back-end: Psycho resulted in most problems with stimulus presentation+feedback presentation. Using the Legacy back-end the stimuli were presented properly, however, feedback after each trial was not given anymore at the end of the experiment. Also, I auto-ran the experiment on different PC's, but both gave the same errors.
Thanks in advance for your help!
Joanne
Comments
Hi Joanne,
While I don't know specifically what's causing your problem, it sounds like
so you're probably right, your poor computer is running out of memory.
Without seeing the code you're using to run the experiment (I presume you're using inline python, because it sounds quite complicated), I can only give some blind suggestions. I would suggest you do tell us more about how each trial is actually programmed though.
Consider redefining your canvas at the start of each block
from openexp.canvas import canvas
my_canvas = canvas(exp)
Look for other variables/objects that get set once, and then linger for the rest of the experiment. I think you can clear them with
my_big_variable = None
Eoin
To add to what Eoin says: it sounds like you might be initializing a new canvas object every time the stick figure moves (or with every new trial). With animated stimuli and a lot of trials, the trick is to create a single sketchpad at the start of your experiment, and manipulate this as the experiment progresses. That is: clear it and redraw its contents.
This has helped me run an OpenSesame-based game on very ancient computers in the past.
Good luck!
Edwin