Experiment crashes in the middle of running on pavlovia - shows white screen with sad face

URL of experiment: MOCAP Stimuli Final [PsychoPy]

Description of the problem: I’m running a study where participants listen to music. This music is played through the experiment on Pavlovia. For the first several participants, the task went smoothly. Then, for the last 2 participants, in the middle of the task the music stops playing and a white screen with a sad face in the corner pops up (see attached picture). This has never happened before (and the task has been tested many times). Just trying to troubleshoot why this is happening and if it’s something with PsychoPy/Pavlovia. Any help is appreciated

I think that means a memory issue. Did all the participants use the same laptop? Using an incognito tab might help – to reduce the effects of one run on the next one.

The participants are all on one laptop, yes. I’ll try using an incognito tab and see if that helps. Thank you

Also just a question, when you mean memory, do you mean the memory on the laptop? We’re also recording video of participants as they do the task at the same time on that laptop, so might that be affecting it as well?

Yes, simultaneous recording could be having an effect. Could you record using a second laptop?

Why are you using Pavlovia rather than a local experiment?

Unfortunately, due to the nature of our experiment setup, I don’t think it’d be possible to record using a different laptop as we are recording not only video but also the audio from the Pavlovia experiment that is coming through headphones.

The experiment wasn’t created on the laptop used to collect data, and so figured Pavlovia was the best option (especially since this hadn’t been an issue prior).

Do you happen to know why might this issue have arisen all of a sudden, but not with the first several participants?

Just wanted to update. Ran the study on incognito mode and no crashing occurred! Hopefully that solves the issue moving forward. Thanks for your help

Just as a second update. It ended up crashing again (same screen). First participant had no issue and then on the second participant it crashed in the middle. I ran the task on my own to see if too much memory was being taken up, and it stayed around 45%.

My recommendation would be to install PsychoPy on the machine and run it locally – if that will work with the recording software – or you might be able to get PsychoPy to make the recording itself (or were you already doing that?).

Thanks for the suggestion. We weren’t using PsychoPy as the recording software. Just so I can understand, what would the difference be between running it locally vs. through Pavlovia? How would that prevent it from crashing?

You wouldn’t be dependent on a Browser or Internet access. However, you would have to use .wav or .ogg sound files instead of .mp3 and you should test with your recording software.

Also – what version are you running the experiment in? If it’s quite old, then upgrading to a more recent version might help with online memory issues.

The audio files are already wav., so that won’t be an issue.

The PsychoPy version is 2022.2.4 (so pretty old). Perhaps I’ll try upgrading the software then resync the task with Pavlovia. If I update to a newer version, the task should still open and run, correct?

Also, if I run the task locally on the laptop, I would need to ensure all the files associated with the task (audio files, etc.) are also on that laptop, correct?

If you upgrade I would ensure it runs locally before testing online – or sync to a new folder so you can easily switch back to the old one if there’s an issue.

Yes, all files would need to be on the laptop to run it locally.

Alright, I think I’ll just try upgrading and see if that helps. Not sure what else to try besides running it locally. Hopefully it works and stops it from crashing randomly.

Upgrading the system shouldn’t affect the data that’s already been collected since it’s stored in the repository, right?

Also, if I run the task locally, where does the data save? Is the GitLab repository in Pavlovia (especially since I have some data files already in there), or something similar? Or does it just go to the downloads folder on the computer?

Hello @Ksab22

Non, it won’t affect the data you have collected as long as you sync properly. You can download the data just to be sure.

The data will be stored in a folder called data in your experiment folder. Running the experiment locally also gives you a higher temporal precision than running it online in a browser, see
Bridges, D., Pitiot, A., MacAskill, M. R., & Peirce, J. W. (2020). The timing mega-study: Comparing a range of experiment generators, both lab-based and online. PeerJ, 8, e9414.

Best wishes Jens

Hi there. I tried running the task on Pavlovia again. It ended up crashing once (when the task had loaded, but it hadn’t started - same white screen with sad face), and I got an error message (see below - IMG_0320). I couldn’t find anything else in the forum about this specific message. I’m guessing that error message is the issue.

-

Also, I tried running the task locally on the laptop (Windows Lenovo), and get the following error. Any insight into why this is happening is appreciated (see below). I couldn’t find anything on the forum either.

Thanks so much for your help.

I associate “lose context” with a WebGL memory error (like the sad face).

Your local error (which might possibly also encourage the online error) is that you have sound files being played at bitrates of both 44.1kHz and 48kHz. You should edit some of your files so they are all the same – or I might be able to share a pre-release version of PsychoPy 2025.1.0 with you that should fix this.

Thanks so much for the reply. I will try adjusting the bitrates and see if that solves the issue. Would I do this just by using an audio bitrate converter?

In terms of addressing the “lose context” error, I’m assuming the easiest way to fix this is to just run the task locally, correct?

I use Audacity to resample but yes anything suitable should work.

For the memory issue, unless you have any Each Frame code then the issue is probably related to the simultaneous video recording. You could try a webcam component within PsychoPy but I also think running locally will help.

Alright thanks. I’m familiar with Audacity so that works well.

For this task there’s no each frame code, so I assume then yes it’s probably related to simultaneous video recording. I will try getting it to work running locally.

Just one question, I have another task that has Each Frame code. If that task were to experience crashing on Pavlovia, would running it locally address that issue as well?

Each Frame code isn’t a problem in itself – but it’s easy to accidentally overload the system, for example by printing to the console every frame.