Welcome! Log In Create A New Profile

Advanced

Crashing online

Posted by aboharbf 
Crashing online
September 25, 2019 10:33AM
Running experiments today, the 2nd experiment I ran, Monkeylogic crashed right at the end of a trial (fixation dot was stuck in the brief pause with reward delivery). I end up needing to end the MATLAB process to resume. No issues occured with the first experiment. Same Monkeylogic files were used. Any idea what the issue may be? Let me know what I should do to gather more info which may be of use

Edit: When I say 'crashed', I mean 'freezes' - MATLAB is open, as are the 3 Monkeylogic associated windows, but I can't change anything.I'm going to try upgrading MATLAB on that machine to the latest version to (it is currently 2018b) and seeing if the crash doesn't happen in simulation mode.

Edit2: Upgraded to 2019b, ran in simulation mode without issue (seemingly). Will add things here if I run into anymore problems tomorrow.
Re: Crashing online
September 25, 2019 06:57PM
I don't think it is related to the MATLAB version or simulation mode. I need to replicate the problem myself. Is this the task you shared with me a few days ago?
Re: Crashing online
September 26, 2019 09:19AM
After updating to 2019b, I haven't run into any issues today, while running for more blocks. the machine previously had 2018a. The task is the same one from a few days ago.

Edit: Spoke a bit too soon, Crashed ~6 minutes into my 3rd run. Using the same task and files but different stimuli.
Re: Crashing online
September 26, 2019 10:28AM
Your task uses many movies. It seems that there is a deadlock created during movie presentation.

I have two questions. Was the task stopped at the same stage of trials in those two crashes? Are you using a hard disk or solid state disk?
Re: Crashing online
September 26, 2019 11:53AM
I believe so, after every trial, there is a brief pause following the reward where the eye signal visualization on the Control screen freezes. In the normal cause, this pause lasts something like 500 ms to 1 sec, and then the next stimulus begin. In the freeze cause, it just hangs there, leaving the subject's screen blank. I am also recording during the ITI in these runs, I have 2 bhv2s where this occured today (though neither has a Trial record structure, as that seems to only be built once you end the task). As far as hard drives, I believe the machine has a non-SSD, but I'll double check.
Re: Crashing online
September 26, 2019 05:23PM
Thanks for the information. Please give me some time to look into this.

How many trials do you run and how much memory does your computer have?

-----

I have tested your task. It seems that there is a memory leak. Since I don't see it in a simple version of a task that I made to test your movies, there may be something in the way that your task is written, but I don't know yet.

In the mean time, please restart MATLAB between experiments so that the leaks are not accumulated.
Re: Crashing online
September 27, 2019 12:47PM
I take back what I said about memory leaks above. I did further tests, but your task just used more memory and it was not a leak.

Since I cannot replicate the problem, would you do a test for me? Change mgl\mgladdmovie.m like the following and see if the problem occurs again.
% Line 10 of mgladdmovie.m
FROM: if ~exist('buffering_time','var'), buffering_time = 2; end
TO: if ~exist('buffering_time','var'), buffering_time = 3; end
Re: Crashing online
September 27, 2019 02:33PM
So first run today, Crashed at 219 trials, changed this line of code and got to 252 without issue. Hope it holds up! I'll update at the end of the day.

Edit: Was able to do another run of 300 trials, and another of 150 after without issue. Seems like this fix got the problem.
Re: Crashing online
September 30, 2019 11:58AM
Sounds good. Please keep me posted if you run into the same problem.

I think the issue may be related to the speed of reading stimulus files. I have talked to many people who use stimuli of massive size and often the problem was that their HDDs were not fast enough. Your movies are short but not compressed, so the HDD might fail to keep up.

Even so, you should see an error message, not a stalled computer, so I will look into this further when I have time. It is just that I ran your task on two of my computers (old, slow one running Win7 and new one running Win10) over 4,000 and 2,000 trials respectively, but failed to recreate the issue (both have SSDs).
Re: Crashing online
October 07, 2019 09:54AM
I ran your task on a slow computer with a slow HDD over 6,000 trials but failed to replicate the problem you mentioned. I begin to think that you should look for the source of the problem somewhere else. Have you tried updating video codecs?
Re: Crashing online
October 08, 2019 01:46PM
No I haven't, but I will give this a shot. the problem has yet to re-emerge since the suggested change, and if it does I will likely just move the files from the HDD to the SSD.
Re: Crashing online
November 11, 2020 06:27PM
Hello Jaewon,

I came across similar problems today! I created 4 scenes with movies in each trial. Once the monkey keep failing the initial fixation, it re-create new scenes, it will just freeze, experimenter's screen shows trajectory of eye tracking. I have to restart matlab to exit and re-run.

If I change the code to only have 1 scene with 1 movie, then the problem is gone. The computer only has HDD. I updated the codec no use. Matlab was 2017a.

I fixed it by increasing the iti, and increasing the wait time for wait-then-hold, so that the recreation of 4 scenes with movies are less frequent.

I wonder, is it possible I don't need to re-create the scenes on each trial? I want to run scenes created from the previous trial if the monkey was not doing that trial.

best,
Haoran
Re: Crashing online
November 11, 2020 07:49PM
I don't understand the problem from your description. You had better explain with your code. You can't run scenes created from previous trials.

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.