Matlab hangs randomly when accessing psychtoolbox in a loop

I am running some behavioral experiments and using psychtoolbox to present sinusoidal gratings on the screen and then activating water delivery using a NIDAQ board. This happens for multiple trials and is therefore in a loop. The problem I am facing is that Matlab will randomly hang within the loop and using print statements I have narrowed down the problem to executing the "flip" command. I have tried many of the recommended solutions including reinstalling Matlab and Psychtoolbox. This code was working and now doesnt and nothing has changed on the computer. Since Matlab hangs and it says that the PTB window is unresponsive I simply have to quit Matlab and restart and thus I have no access to the error.


Has this error been reported? Any suggestions / debugging ideas ?


Thanks!


Anu

I don't think we know of a bug like you describe it.
Operating system? Windows? PTB 3.0.14 installed and up to date? System and gpu specs? Debug output (use the "diary on" command)? Sample code that fails? Multi-display setup?

Something has changed on your system, maybe some setting, maybe some operating system update?
-mario

XX---In PSYCHTOOLBOX@yahoogroups.com, <anubhuthi@...> wrote :

I am running some behavioral experiments and using psychtoolbox to present sinusoidal gratings on the screen and then activating water delivery using a NIDAQ board. This happens for multiple trials and is therefore in a loop. The problem I am facing is that Matlab will randomly hang within the loop and using print statements I have narrowed down the problem to executing the "flip" command. I have tried many of the recommended solutions including reinstalling Matlab and Psychtoolbox. This code was working and now doesnt and nothing has changed on the computer. Since Matlab hangs and it says that the PTB window is unresponsive I simply have to quit Matlab and restart and thus I have no access to the error.


Has this error been reported? Any suggestions / debugging ideas ?


Thanks!


Anu

try putting your code in:

try
% your code here
catch ME
sca;
rethrow(ME);
end

Perhaps an error occurs, and you're stuck with an open screen

Cheers,
Dee

On Tue, Apr 11, 2017 at 11:19 PM, mario.kleiner@... [PSYCHTOOLBOX] <PSYCHTOOLBOX@yahoogroups.com> wrote:


I don't think we know of a bug like you describe it.
Operating system? Windows? PTB 3.0.14 installed and up to date? System and gpu specs? Debug output (use the "diary on" command)? Sample code that fails? Multi-display setup?

Something has changed on your system, maybe some setting, maybe some operating system update?
-mario

XX---In PSYCHTOOLBOX@yahoogroups.com, <anubhuthi@...> wrote :

I am running some behavioral experiments and using psychtoolbox to present sinusoidal gratings on the screen and then activating water delivery using a NIDAQ board. This happens for multiple trials and is therefore in a loop. The problem I am facing is that Matlab will randomly hang within the loop and using print statements I have narrowed down the problem to executing the "flip" command. I have tried many of the recommended solutions including reinstalling Matlab and Psychtoolbox. This code was working and now doesnt and nothing has changed on the computer. Since Matlab hangs and it says that the PTB window is unresponsive I simply have to quit Matlab and restart and thus I have no access to the error.


Has this error been reported? Any suggestions / debugging ideas ?


Thanks!


Anu