Experiment keeps freezing
in OpenSesame
Hello,
I have a problem with the attached script. It plays short sounds and shows letters, nothing complicated. However, it keeps freezing more or less halfway through. I've already tried breaking up the experiment loops into smaller units rather than repeating them 3x each, but this doesn't help either. When I use two experimental loops with no repetitions, it works fine.
Does anyone have an idea what may be causing this? I'm running the script on OS 4.0 using a Windows desktop PC.
Thank you very much in advance,
Antje
Comments
Hello @Antje,
I suspect that this may be caused by some memory/cache limits; and that they may vary depending on the backend. When I tested your experiment, it did indeed crash a few trials after the break with xpyriment, and a bit earlier with legacy. With the PsychoPy backend, however, it ran to the end.
Try to switch the backend of your experiment to PsychoPy and see if this solution works for you as well?
Claire
Check out SigmundAI.eu for our OpenSesame AI assistant! 🤖
Dear @cvanbuck ,
Thank you for your reply. Indeed, the experiment runs through using PsychoPy, but the audio is completely messed up. It sounds like a chopped-off robot is speaking. In the end, I will use OS 3.3 to run the experiment. There are no problems in this version.
Thank you very much, again!
Antje
Dear @Antje,
during final test-runs of an experiment a colleague of mine had problems with the experiment freezing. After some extensive testing she found out that the repetitive definition of the same Keyboard-object causes this freeze. In her case defining the keyboard object and getting the response was done using Python.
So she was able to separate defining the keypress object (what keys are allowed and how long should be waited) and sampling the actual keypresses while being in a loop. While she was preparing the experiment with fewer repetitions there was no problem, but somewhere after ~ 125+ repetitions of the same keypress the problem occurs. If the Keyboard object is defined only once before the loops everything works fine, even with testing with up to 4.000 cycles.
The problem occurs on a MacBook (Apple silicon), multiple Windows 11 (standard installer) machines, Ubuntu 22.04 LTS and 24.04 LTS (using a recent anaconda install, multiple machines). One Windows 11 computer did not have that issue. Depending on the operating system the experiment either stalls indefinitely (for hours) or a key press is accepted after a minute or two and the experiment continues.
Preparing a stripped-down version of the experiment with one version that freezes and another that does not, is still a to-do, but in case someone has the same issue I am posting her findings in advance.
Sven