| Reference | Downloads | Github

Experiment freezing for some participants

URL of experiment:

Description of the problem:
I am running an experiment online and recruiting participants using Prolific. My experiment has 12 counterbalances (versions) and I am randomly assigning participants to each using the program provided by @wakecarter here Updating Conditions File for Each Participant.

When I opened the experiment to participants, about 25 out of 170 of those who took it, messaged me saying that it froze and would not advance (they would type in the word and press enter, like they should and the screen would not change, although they could erase the word or add to it; some also said they tried pressing a bunch of different keys and that did not work either and some even tried redoing the experiment and that it got stuck on the same screen). For all participants the experiment froze on the same part: the task is learning two passages and taking a test after each passage, and it froze in the second test. For most participants, it was on the first screen of the second test but there were some that said it was on a different screen in the second test. Additionally, most of the people who complained, encountered the problem in one or two versions of the experiment, although there were people who encountered it in another version.

I ran through those versions several times to try to recreate the issue, but could not. I saw that some other people were having the same problem: Task crashed or froze for 30% of online participants, Pavlovia: black screen and unable to continue (RAM issues), Online study crashes on Windows Chrome. The participants for whom the experiment crashed said they were all using chrome.

My experiment does have to load about 175 objects, do you guys think that is the reason this is happening? Could there be any other reasons? Why is it always in the same place in the experiment?

Are you updating the screen every frame, or only when the information changes?

I have a code for typing (so that the words show up on the screen) and a word for timing (so that in 4 of the 12 versions the first test is 2 minutes long) and both of those have a part that is in Each Frame:

I don’t think I can see a TestResponse.text command that runs if not key is pressed.

However, I can see Test1loop.finished=true; which needs to be changed to trials.finished=true; and superfluous Test1loop.finished=false; and continueRoutine=true; both of which have no effect.

In reference to the TestResponse.text command when no key is pressed, I don’t know if it matters, but TestResponse is an actual text component. I am very new to coding and the typing code was given to me, so I don’t know too much about it. Is the text component making up for the fact that there is no code for when no key is pressed or do I need to add a code for that?

And thanks for the suggestion on the Test1loop code, I will make those adjustments. Why is using trials.finished better than using Test1loop.finished? I just want to know to understand coding better.

TestResponse.text = TestResponse.text+TestResponseAdd; is a command to update the contents of the text component TestResponse. If you still run this command when TestResponseAdd is empty then you are wasting resources which can lead to memory errors in online experiments.

Should I add the following then?

if (TestResponseAdd == undefined) {


if (TestResponseAdd == undefined) {
      TestResponse.text = TestResponse.text;

or something else?

If you strip out all of the cases of .text= in your code then you could just end on

if (TestResponseAdd != undefined) {
      TestResponse.text = TestResponse.text + TestResponseAdd;

However, personally I’ve not tried reading the current value of .text and have instead used something like:

if (TestResponseAdd != undefined) {

I’m not sure if in JS != should be !== since I leave that kind of detail to the auto translate.

Thanks! I’ll try that out. Do you know if there is a way to see how much memory is being used while I’m running an experiment online?

Never mind, I found it. If anyone else would like to know, you click on the three dots in Google Chrome, select “More Tools”, and click “Task Manager”.

1 Like