0

I'm running a script on a PC (windows 7) with dual monitors, and every time when I open a new on-line window, Matlab freezes (not responding to mouse or keyboard inputs, only to calling windows task manager and switching tasks).
For what I've checked, only Screen('Openwindow') has this problem; other screen functions work fine. This failure never happens in single monitor situation. Here's my script:

screeninfo.pos = get(0,'MonitorPositions');
if size(screeninfo.pos,1)<2
   fprintf('cannot find two monitors! \n');
   return;
end
[screeninfo.window, screeninfo.rect] = Screen('OpenWindow',0, [900 900 1000],screeninfo.pos(2,:));

Anyone has a clue?

Ryan K
  • 3,985
  • 4
  • 39
  • 42

1 Answers1

0

Psychtoolbox 3.0.10 is ancient. You should update to the latest and greatest. More importantly, when you open a window, any input (keyboard/mouse) goes to the opened screen, not matlab, unless you specifically focus matlab with alt-tab. cntr+C is an exception that makes matlab stop execution of the script, also when a PTB window is open.

If your matlab is on another screen than where the PTB window is opened, things should work normally. But if you start interacting with the matlab interface which a PTB window is open, all guarantees of proper timing of the PTB window are gone.