Revision [1572]

Last edited on 2010-02-01 11:12:27 by AndrewWilson
Additions:
Q: If my script aborts with an error, I'm left with a dead Psychtoolbox window that prevents me from accessing the Matlab command window. How can I close the onscreen window in case of such an error?
A: There are different approaches. If Screen detects an error inside a Psychtoolbox MEX subcommand, it will automatically close all open windows and other resources. If your error is in regular Matlab code, e.g., your own code, or if you aborted your script via the CTRL + C keypress combo, you are left with such a dead window. The simplest way to close the window is to type blindly the command //sca//. //sca// is a little M-File which will close all windows (it's a quick and dirty way to access Screen('CloseAll')), show the mouse cursor again if it was hidden etc. If you don't get a reaction to that command, it may be that your hidden Matlab command window doesn't have the keyboard input focus. Try pressing Apple key + Tab key on OS/X, or ALT key + Tab key on Linux and Windows one or multiple times and retry typing //sca// + Enter key. This should eventually refocus the hidden Matlab command window, so the //sca// commands is really entered into the Matlab window and takes effect. If all this doesn't help, try pressing CTRL + C a couple of times before the Tab key -- it may be that your script is still running in the background, so it needs to be interrupted first.
~- If Matlab really doesn't respond to any of these measures any more due to some serious bug, you will need to kill it via the Windows taskmanager (//CTRL+ALT+DEL// key combo), Linux kill function (//CTRL+ALT+ESC// key combo, followed by a mouse click), or Mac OS/X Force quit function (//ALT+Apple key+ESC//). In that case you may want to use Matlabs //diary// command in a future Matlab session to store all Matlab output to a text file "diary.txt", so you can find out with a text editor what caused the severe crash of your script.
Deletions:
Q: If my script aborts with an error, i'm left with a dead Psychtoolbox window that prevents me from accessing the Matlab command window. How can i close the onscreen window in case of such an error?
A: There are different approaches. If Screen detects an error inside a Psychtoolbox MEX subcommand, it will automatically close all open windows and other ressources. If your error is in regular Matlab code, e.g., your own code, or if you aborted your script via the CTRL + C keypress combo, you are left with such a dead window. The simplest way to close the window is to type blindly the command //sca//. //sca// is a little M-File which will close all windows, show the mouse cursor again if it was hidden etc. If you don't get a reaction to that command, it may be that your hidden Matlab command window doesn't have the keyboard input focus. Try pressing Apple key + Tab key on OS/X, or ALT key + Tab key on Linux and Windows one or multiple times and retry typing //sca// + Enter key. This should eventually refocus the hidden Matlab command window, so the //sca// commands is really entered into the Matlab window and takes effect. If all this doesn't help, try pressing CTRL + C a couple of times before the Tab key -- it may be that your script is still running in the background, so it needs to be interrupted first.
~- If Matlab really doesn't respond to any of these measures anymore due to some serious bug, you will need to kill it via the Windows taskmanager (//CTRL+ALT+DEL// key combo), Linux kill function (//CTRL+ALT+ESC// key combo, followed by a mouse click), or Mac OS/X Force quit function (//ALT+Apple key+ESC//). In that case you may want to use Matlabs //diary// command in a future Matlab session to store all Matlab output to a text file "diary.txt", so you can find out with a text editor what caused the severe crash of your script.


Revision [1321]

The oldest known version of this page was created on 2008-04-10 18:28:26 by MarioKleiner
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki