I am making a program where I need to play files many times. When I play a file, it plays, but after 2 seconds the program closes with exit code -1073741819. Code: " from pydub import AudioSegment from pydub.playback import play while True: file_name = "sound.wav" sound = AudioSegment.from_wav(file_name) play(sound) sound.close() " Error: "Process finished with exit code -1073741819 (0xC0000005)" As you can see I tried adding: "sound.close()", but it doesn't help. I noticed that the program closes because of the line that plays the file: "play(sound)".I looked at other posts and realized that this error is caused by memory overflow. I tried adding the line: "time.sleep(0.1)" at the end of while. Didn't help.Thanks!