Crash when stopping many microphone recordings

I’m trying to create a routine where there are two tasks, in one of them - participants would be recorded with a microphone. The idea is they’d be recorded for 60 seconds but would be able to end the recording sooner (by pressing a button) and advance to the next trial.

The program keeps crashing after a random number of trials with the following error from Python, and without much additional info:
Process finished with exit code -1073740940 (0xC0000374)

I’ve tried recreating a very simplified version of the routine with the builder:
*Stage 1: a 60-sec recording which can be stopped by pressing ‘space’
*Stage 2: simply presenting a polygon, this can be forwarded as well by pressing ‘space’
*Loop over these two stages 25 times

And as described, here as well the program would crash with the same error.
This happens when I try to stop each recording sooner than expected, for example after 5-10 seconds. Usually around the 8-10 trials the crash would occur.
When I tried waiting for a full minute rather than stopping the recordings, this error still occurs from time to time, but much less frequently.

Not sure if this is relevant but I’m attaching the builder’s .psyexp and .py files, and screenshots of the builder.
multi_mic_test.psyexp (10.6 KB) (16.9 KB)

Hopefully someone knows what’s the cause of this?
Thanks :slight_smile:

Hi There,

Please can you let us know what psychopy version you are running and what operating system?


I’m using Windows 10 Home Edition (64-bit)
Psychopy 2020.2.3

Sorry for omitting this info in the first place.

For anyone else who may encounter similar issues, this code snippet seems to be a more stable alternative for recording throughout the experiment: