Experiment with movie components crashing at random

Computer: 2023 MacBook Air, Apple M2 Pro Chip, 32 GB RAM
OS: macOS Ventura, version 13.4.1
PsychoPy version (e.g. 1.84.x): 2023.1.3, but running in version 2022.2.5
(Working in Builder)

What did you try to make it work?: In this experiment, there’s an exposure phase and test phase. Each iteration of the exposure loop is supposed to play a new video and a new separate audio file, both set using a conditions file. Participants then have the option to replay that loop and see the video and hear the audio again, or press “space” and continue on. Each iteration of the test loop is supposed to play a video and participants click on two images, one at a time, to hear two separate audio files. Then they select the sound that matches the video they saw by clicking a star beneath the image corresponding to the sound they preferred.

For a while, this experiment ran smoothly, but it recently has begun crashing nearly every time we try to run it. It crashes at variable points during both the exposure phase and the test phase, and it always presents the same message:

We always receive this “Experiment ended with exit code -11” error. Because of this error, the random crashing, and the fact that movie components are involved, we suspect a memory issue of some sort. We reduced the size of all our videos, stopped dynamically resizing them in PsychoPy, and introduced a routine at the beginning of each iteration of the loop with an ISI component during which all images/videos for that iteration are loaded in. We also tried messing with the movie backend (trying ffplayer and moviepy so far). None of these fixes have worked—it’s still crashing just as randomly as ever.

We still suspect some sort of memory issue, maybe some sort of problem with the movie backend or the interaction between this OS and the version of PsychoPy that we’re using. But really, we’re stumped. Any and all help would be appreciated, and I’m happy to provide more documentation of the issue if necessary.

(This problem seems similar to the one discussed in this thread: VlcMovieStim causes experiment to crash by chance - #5 by Mae. However, our videos are much smaller—we have 31 of them, and they range from 101 to 425 KB in size.)

Do you have any code relating to if value == “circle”? If so, please could you show it, and also where variable value is defined.

Of course. I can’t find any code related to “circle”. That error has been appearing pretty much the whole time we’ve been working on this experiment, and it consistently appears at least dozens of times in the stdout of the Runner window. This has been happening even before the experiment starting crashing. Based off this thread Out-of-the-blue error: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison, we have so far been ignoring the FutureWarnings.

Hi,

Did you ever get to the bottom of this?
I’m also seeing this weird:
if value == "circle":
error reported on the Runner…Win 10, PsychoPy 2022.2.5

Doesn’t appear to stop things working for me - yet…

Best wishes,
Jon

Hi Jon,

Unfortunately, I never did fix this issue. I decided to just stop using movie components in this experiment and replace them with moving image components. Not the most satisfying solution, but it worked for this.

I’ll let you know if I ever do get to the bottom of this issue though!