"Cannot read property "lose context" of null"

URL of experiment: https://pavlovia.org/run/cmfo/free-gen-task/html/

Description of the problem: My participant was not able to run the task because these errors started to occur. The task was working normally for most people but this participant got the following errors:

“Cannot read property “lose context” of null”
“Cannot read property “style” of null”

What should I do to prevent it from happening again?

1 Like

Are you updating something every frame?

Yes, but so are other tasks. I think there is a problem with Pavlovia as everything was working well until last week. Most tasks give some error or stop running. What is going on with the site?

Hi @cat500, the same happened to me, only once to one participant. Did you figure out what it was? Thank you!

Same thing happened to one of my participants as well! This person said they got about an hour through before this. The screen went gray, they emailed me, and I told them to press ‘esc’ (not “x” out, to save partial data) and that is when the “lose context” error came up.
https://run.pavlovia.org/juliaschorn/pdm21/html

Lose context is indicative of a memory loss, which I think happens most often when the screen is being updated every frame instead of only when it changes.

Got it, that makes sense. Right now I have a break routine that should come after a certain number of trials so in Begin Routine I have: trialCount = (trialCount + 1);

And at each frame I have:
if ((((trialCount === 160) || (trialCount === 320)) || (trialCount === 480))) { continueRoutine = true; } else { continueRoutine = false; }

Is there a way to change this so that the experiment doesn’t need to be updated every frame?

That’s not the type of Each Frame code that might cause a memory error since it isn’t changing the display.

Do you have any components set to update every frame?

I don’t think I do, but it could be my stimulus- it is a movie file (.mp4) that is only 3s long and silent. It was meant to be a gif but that only worked in PsychoPy, not Pavlovia. The trial ends when the participant presses a key.

It is set every repeat (not every frame) however I did check ‘loop playback’- could that be it? Would the only solution be to not loop it?