Experiment slows down and eventually crashes, with no error messages when running script


Experiment slows down and eventually crashes, with no error messages...
Author
Message
Amrit
Amrit
Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)
Group: Forum Members
Posts: 4, Visits: 42
Hello,

I am facing a confusing issue when attempting to run a millisecond script either on my desktop or as a web script. 
No error message ever pops up but the experiment starts to slow down and then eventually crashes. 

The structure of each trial is simple. 2 mp4s play and then a response is waited for. However, it seems that after some number of trials (about 70 on my laptop, about 150 on my desktop), a long lag (about 15s) starts to appear between trials, and eventually between videos. The experiment as a whole is using 24 mp4's, each of which are less than 200 KB. I haven't faced this issue when using a near identical script that made use of only jpgs (images) or .wav files (audio clips). So the issue seems to be with trying to present movies specifically. 

The difference between the laptop and the desktop (and the lack of any error messages) makes me think it might be an issue of processing power but I am not sure.

Has anyone dealt with this issue before or have an idea of how to deal with it?  
I can share a script and stimuli if needed to replicate the issue. 

Thank you! 
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
Amrit - 10/11/2019
Hello,

I am facing a confusing issue when attempting to run a millisecond script either on my desktop or as a web script. 
No error message ever pops up but the experiment starts to slow down and then eventually crashes. 

The structure of each trial is simple. 2 mp4s play and then a response is waited for. However, it seems that after some number of trials (about 70 on my laptop, about 150 on my desktop), a long lag (about 15s) starts to appear between trials, and eventually between videos. The experiment as a whole is using 24 mp4's, each of which are less than 200 KB. I haven't faced this issue when using a near identical script that made use of only jpgs (images) or .wav files (audio clips). So the issue seems to be with trying to present movies specifically. 

The difference between the laptop and the desktop (and the lack of any error messages) makes me think it might be an issue of processing power but I am not sure.

Has anyone dealt with this issue before or have an idea of how to deal with it?  
I can share a script and stimuli if needed to replicate the issue. 

Thank you! 

Sounds like an issue of memory build-up over the course of many trials and eventual resource exhaustion. I'm not sure there's a way to mitigate that, I'm afraid.

I've seen something similar with a script once that relied on playing between 8 to 12 or so videos in parallel in each trial, a situation for which (the Windows in particular) video APIs really aren't built. That script, too, would develop a noticeable lag after a number of trials and crash eventually as RAM / video RAM on the given system ran out. One potential mitigation strategy would be to break the script up into several smaller scripts / chunks, with each only running a relatively low number of trials (say: 30 to 50 in your case) and run them in sequence (either via <batch> or -- in an offline setting -- via a small command line script, which would be even better). That may prevent the build-up from reaching critical mass.

Edited 5 Years Ago by Dave
Amrit
Amrit
Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)Associate Member (124 reputation)
Group: Forum Members
Posts: 4, Visits: 42
Dave - 10/11/2019
Amrit - 10/11/2019
Hello,

I am facing a confusing issue when attempting to run a millisecond script either on my desktop or as a web script. 
No error message ever pops up but the experiment starts to slow down and then eventually crashes. 

The structure of each trial is simple. 2 mp4s play and then a response is waited for. However, it seems that after some number of trials (about 70 on my laptop, about 150 on my desktop), a long lag (about 15s) starts to appear between trials, and eventually between videos. The experiment as a whole is using 24 mp4's, each of which are less than 200 KB. I haven't faced this issue when using a near identical script that made use of only jpgs (images) or .wav files (audio clips). So the issue seems to be with trying to present movies specifically. 

The difference between the laptop and the desktop (and the lack of any error messages) makes me think it might be an issue of processing power but I am not sure.

Has anyone dealt with this issue before or have an idea of how to deal with it?  
I can share a script and stimuli if needed to replicate the issue. 

Thank you! 

Sounds like an issue of memory build-up over the course of many trials and eventual resource exhaustion. I'm not sure there's a way to mitigate that, I'm afraid.

I've seen something similar with a script once that relied on playing between 8 to 12 or so videos in parallel in each trial, a situation for which (the Windows in particular) video APIs really aren't built. That script, too, would develop a noticeable lag after a number of trials and crash eventually as RAM / video RAM on the given system ran out. One potential mitigation strategy would be to break the script up into several smaller scripts / chunks, with each only running a relatively low number of trials (say: 30 to 50 in your case) and run them in sequence (either via <batch> or -- in an offline setting -- via a small command line script, which would be even better). That may prevent the build-up from reaching critical mass.

Okay! This is along the lines of what I thought might be happening.
For our purposes I think we can simplify the script. 
I was posting to see if others had a different idea of what might be going on.

Thanks for your help Dave!
Much appreciated,
Amrit
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search