psychojs
psychojs copied to clipboard
repeated playing of sound eventually causes crash
I have an oddball experiment that plays a sound in a loop.
If the sound plays more than ~2-300 times it causes the experiment to crash.
An example experiment can be found here: https://gitlab.pavlovia.org/Bollaking/audio-oddball
The loop is adjusted with a code component but the crash also occurs if the loop is controlled with a conditions file.
I have also tried sounds of duration more than 0.5 and less than 0.5 seconds. So it is not dependent of the sound being explicitly "stopped"
Crash happens in Chrome and Opera browsers.
There is nothing I can see in the developer console although there are a lot of logging messages that variables are undefined...
I have attached the logs here run.pavlovia.org-1626315196863.log
Correction. The experiment does not crash the sounds just stop playing. I demonstrated this by adding text to the screen in each loop. the text continued to display until the full 400 loops were displayed, and the experiment ended normally.
Also sometimes the sound quality deteriorates before the sound stops playing altogether.
@bollaking Thanks for flagging
@bollaking Sorry, would it be possible to give me developer access to the repo you link to, so I can investigate some more? Thanks
I think I am having the same problem in this experiment: https://gitlab.pavlovia.org/erkamil/staircaserdk
We repeatedly play a sound as feedback after each trial. After ~100 trials, the sound plays with decreased quality for a couple of trials and then stops playing. I could also give you developer access if it helps.
Is there anything I can do to debug this? Thanks for your help!
@dominikstrb Yes of course, no problem, thanks for flagging
Cool, I added you as a developer, if you want to have a look. If the project is too cluttered to find the issue with the sound, I can provide a minimal working example.
Alright, thanks, let me take a look
Sorry @dominikstrb I tried the project you link to and have been unable to spot any audio feedback during trials, must be I'm missing something
@bollaking I can confirm the issue and it seems boilerplate JS / code generation related. Interestingly, using the same Sound instance across trials only fails when the pitch is different. Please bare with me while I look for a fix, x
I'm experiencing a similar issue currently with running an oddball paradigm with two different pitch tones (1000 tones total in the paradigm). The tones play fine to start with and after a few minutes the tones sound glitches. Is there a fix on the way?