Looped movie stimulus freezing at random times

Hi!

I am running an experiment where participants watch a series of movie clips (~2min each) and then perform free recall and forced-choice recognition tasks. They complete this procedure 3 times. For each video, participants can press the spacebar which saves 4 frames from the video to be used later as targets in the recognition task.

When I have been running the study (in person), for some participants, one of the videos freezes, while the audio continues to work. Sometimes, the audio for the next video will play even though the screen is still frozen. The freeze does not always happen at the same place (e.g., sometimes it happens during the 2nd block while other times it happens during the 3rd), so the issue doesn’t seem to be the number of videos viewed or anything like that.

I have tried making sure that all the videos are properly downloaded on the testing computer but to no avail. Any help on this issue would be greatly appreciated! I am happy to share my code/other materials if that would be helpful.

EDIT for more context: Since the participants can choose when they want to move to the next video, it seems to work without freezing when the participants don’t spend as much time watching the videos. Is this potentially a memory issue within PsychoPy?

Also, just to provide more context, when the experiment freezes and I have to force exit it, the runner indicates: “Experiment ended with exit code -9” whereas when I normally force quit the Experiment the runner indicates: “Experiment ended with exit code -15.” Not sure what this could mean but wanted to note it.

As far as I know, exit code -9 usually means that you experiment was ended by another program in the background of your device. Can you try exiting all other programs that may be open and rerunning?

Hi! Thank you for the suggestion. I tried it, but unfortunately I still am experiencing the same issue. I also tried to troubleshoot by stripping my experiment down to the core function (playing 18 video clips in a loop specified by an Excel spreadsheet) and even then I am getting the same issue. I even tried reducing all my video file sizes by lowering the resolution & converting the audio format to Opus instead of AAC (which they were originally) but PyschoPy is still freezing!

Hi!

Happy to say I figured it out! Using macOS Activity Monitor, I saw that over time the memory usage of the experiment was ramping way up, and whenever it reached ~3GB, the screen froze. After troubleshooting I figured out that it wasn’t the movies that were causing the problem at all but the text stimulus I was using (as part of the experiment participants see a countdown indicating when the video will end). In the end, my issue was very similar to the one from this post:

https://discourse.psychopy.org/t/runtimeerror-cant-start-new-thread-experiment-crashes-near-the-end/6828/2?u=ashwin