| Reference | Downloads | Github

Black screen appears during task; stops experiment

URL of experiment: Sign in · GitLab

Description of the problem:


I have an experiment with several tasks including a 8 minute multiple-choice timed vocabulary task. About 45-90 seconds into the task, the screen goes black and when exiting full screen “initializing experiment” is displayed. If I rapidly answer the questions, the task otherwise works correctly.

The radio button labels are created from 5 separate text components reading from columns in the conditions file; using the conditions variables as the slider labels produced a ‘(variable) is not defined’ error.

The only custom code is for the timer, which seems to be working properly.

No javascript error appears in the console, I’ve tried clearing my browser cache and closing tabs.

Image of experiment when working:

And builder view for the task:

Is it possible that there are too many changing components at once? Any help would be very much appreciated.

That definitely sounds like the memory leak issue. Make sure you don’t update components Each Frame when they aren’t actually changing. You can also try the fix here PsychoJS platform version 2020.1 - Memory Leak in Visual Stimulus Setters

It was indeed the memory leak issue - replacing the import statements in the js script resolved the issue.