Tab refreshes in middle of experiment for several participants

Dear all,

A few of my participants (around 10%) have indicated that in the middle of their session, their browser tab refreshes, causing them to have to start all over again with the experiment. The experiment takes between 30-45 in total minutes so it’s really a hassle to restart if you were close to the end. What could be causing this?

All help is much appreciated

That could be a memory issue. Do you have a lot of resources or things changing Each Frame?

18 resources get downloaded when opening the experiment, those mostly contain jpg’s with intructions and a couple of excel files with stimuli that get randomized in a number of consecutive loops. In those loops, some variables indeed get reset each frame. I don’t think I can get around those resets though.

When you mean variables get reset, does that affect what’s on screen.

The key online is to avoid setting something on frames where it hasn’t actually changed.

This thread may also help. PsychoJS platform version 2020.1 - Memory Leak in Visual Stimulus Setters

In the image attached, you can see what I put in the ‘Each Frame’ tab. I’m not sure if this applies to the link you posted.

‘displayneg_memory’ and ‘displaypos_memory’ are variables to assign text stimuli onset times (used in the ‘start’ box of their respective text stimuli). Which stimuli gets shown depends on whether they made the right choice (keuze.corr) in the previous component of the loop.

Why are you setting these variables every frame? You could set them in EndRoutine of the routine containing keuze

Do you have a text component set to update every frame?

Thanks for the help! If I recall, it only worked when I put it in the Each Frame tab. I will try and adjust it again if you think this might be causing the problem? I have no text components set to update very frame.

If it’s setting a “Set every repeat” text component it will only work in Begin Routine if the code component comes above the text component.