# Error with &quot;ScreenTest&quot; with Psychtoolbox 2.5 (Mac iBook, Mac OS X, OS 9.2 (Classic mode))

**URL:** <https://psychtoolbox.discourse.group/t/error-with-quot-screentest-quot-with-psychtoolbox-2-5-mac-ibook-mac-os-x-os-9-2-classic-mode/1404>\
**Category:** Uncategorized\
**Created:** [June 27, 2002, 2:37am UTC](https://psychtoolbox.discourse.group/t/error-with-quot-screentest-quot-with-psychtoolbox-2-5-mac-ibook-mac-os-x-os-9-2-classic-mode/1404 "2002-06-27T02:37:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [June 27, 2002, 2:37am UTC](https://psychtoolbox.discourse.group/t/error-with-quot-screentest-quot-with-psychtoolbox-2-5-mac-ibook-mac-os-x-os-9-2-classic-mode/1404/1 "2002-06-27T02:37:33Z")

</div>

I get the a fatal error message (see below) when I run "ScreenTest".  
It fails when calling "gestalt" to determine if "PopCharPro" is   
installed.  
I have tried almost all of the other demos, and they seem to work fine.  
  
This is a Mac iBook, running Mac OS X (10.1.5),  
and running MATLAB 5.2 in Mac OS 9.2 (Classic Environment).  
  
If anyone knows a fix or workaround, please let me know.  
  
thanks,  
 David Jones  
  
  
  
ScreenTest  
\*\*\* David Jones's Classic Mac OS Compatibility/600, Mac OS   
9.2 \*\*\*\*\*\*\*\*\*\*\*  
G3, 600 MHz, memory bus 100 MHz, 71.455 Mflop/s  
Psychtoolbox 2.5, 25 June 2002, Matlab 5.2.0.3084  
Gestalt returned error code -5551  
??? Non-zero error code returned by Gestalt!  
  
Error in ==\> Cytochrome:Applications:Lab:MATLAB   
5.2:Toolbox:matlab:MacOS:gestalt.mex  
Error in ==\> Cytochrome:Applications:Lab:MATLAB   
5.2:Toolbox:PsychToolbox:PsychOneliners:IsPopCharProInstalled.m  
On line 28 ==\> g=gestalt('PopÇ');  
  
Error in ==\> Cytochrome:Applications:Lab:MATLAB   
5.2:Toolbox:PsychToolbox:PsychOneliners:DescribeComputer.m  
On line 113 ==\> if IsPopCharProInstalled  
  
Error in ==\> Cytochrome:Applications:Lab:MATLAB   
5.2:Toolbox:PsychToolbox:PsychTests:ScreenTest.m  
On line 426 ==\> DescribeComputer;  
  
  
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   
- -  
Prof. David Jones, Dept of Electrical and Computer Engineering  
McMaster University, 1280 Main Street West, Hamilton, Ontario, CANADA  
email: [djones@...](mailto:djones@...) phone: (905) 525-9140 ext.24689  
web: www.ece.mcmaster.ca/~djones fax: (905) 524-0340

---

<div class="post-metadata">

**Author:** ![denispelli](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@denispelli](https://psychtoolbox.discourse.group/u/denispelli)\
**Post date:** [June 27, 2002, 8:19am UTC](https://psychtoolbox.discourse.group/t/error-with-quot-screentest-quot-with-psychtoolbox-2-5-mac-ibook-mac-os-x-os-9-2-classic-mode/1404/2 "2002-06-27T08:19:00Z")

</div>

> \>I get the a fatal error message (see below) when I run "ScreenTest".  
> \>It fails when calling "gestalt" to determine if "PopCharPro" is  
> \>installed.  
> \>I have tried almost all of the other demos, and they seem to work fine.  
> \>  
> \>This is a Mac iBook, running Mac OS X (10.1.5),  
> \>and running MATLAB 5.2 in Mac OS 9.2 (Classic Environment).  
> \>  
> \>If anyone knows a fix or workaround, please let me know.  
> \>  
> \>thanks,  
> \> David Jones  
> \>  
> \>  
> \>  
> \>ScreenTest  
> \>\*\*\* David Jones's Classic Mac OS Compatibility/600, Mac OS  
> \>9.2 \*\*\*\*\*\*\*\*\*\*\*  
> \>G3, 600 MHz, memory bus 100 MHz, 71.455 Mflop/s  
> \>Psychtoolbox 2.5, 25 June 2002, Matlab 5.2.0.3084  
> \>Gestalt returned error code -5551  
> \>??? Non-zero error code returned by Gestalt!  
> \>  
> \>Error in ==\> Cytochrome:Applications:Lab:MATLAB  
> \>5.2:Toolbox:matlab:MacOS:gestalt.mex  
> \>Error in ==\> Cytochrome:Applications:Lab:MATLAB  
> \>5.2:Toolbox:PsychToolbox:PsychOneliners:IsPopCharProInstalled.m  
> \>On line 28 ==\> g=gestalt('PopÇ');  
> \>  
> \>Error in ==\> Cytochrome:Applications:Lab:MATLAB  
> \>5.2:Toolbox:PsychToolbox:PsychOneliners:DescribeComputer.m  
> \>On line 113 ==\> if IsPopCharProInstalled  
> \>  
> \>Error in ==\> Cytochrome:Applications:Lab:MATLAB  
> \>5.2:Toolbox:PsychToolbox:PsychTests:ScreenTest.m  
> \>On line 426 ==\> DescribeComputer;  
> \>  
> \>  
> \>- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
> \>- -  
> \>Prof. David Jones, Dept of Electrical and Computer Engineering  
> \>McMaster University, 1280 Main Street West, Hamilton, Ontario, CANADA  
> \>email: [djones@...](mailto:djones@...) phone: (905) 525-9140 ext.24689  
> \>web: www.ece.mcmaster.ca/~djones fax: (905) 524-0340

dear david  
  
you'll solve your problem by upgrading MATLAB from 5.2 to 5.2.1.   
Mathworks fixed this bug in gestalt in the final release. The upgrade   
is free, available for download. We recommend it.  
[http://psychtoolbox.org/mac.html#matlabPatch](http://psychtoolbox.org/mac.html#matlabPatch)  
  
we'll also change our code to check for the MATLAB version before   
calling gestalt, since we want ScreenTest to be robust, able to   
operate in a wide range of conditions.  
  
thanks for the report.  
  
best  
  
denis

---

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [June 28, 2002, 12:41am UTC](https://psychtoolbox.discourse.group/t/error-with-quot-screentest-quot-with-psychtoolbox-2-5-mac-ibook-mac-os-x-os-9-2-classic-mode/1404/3 "2002-06-28T00:41:34Z")

</div>

I upgraded Matlab to 5.2.1 and now "ScreenTest" fails in SetClutWaitTest.  
  
This is a Mac iBook, running Mac OS X (10.1.5)  
and running MATLAB 5.2.1 in Mac OS 9.2 (Classic Environment).  
  
I am attaching the error messages below.  
  
I am also including a few details about current variable settings  
from the MATLAB debugger when I set a breakpoint at line 72 in   
SetClutWaitTest.m  
I am hoping this might help track down the source of the problem,  
for anyone knows the inner workings of SetClutWaitTest.  
  
-- David Jones  
  
- - - - - - - - - - - - - - - - - - - - - - - - -  
  
»screentest  
ScreenTest  
\*\*\* David Jones's Classic Mac OS Compatibility/600, Mac OS   
9.2 \*\*\*\*\*\*\*\*\*\*\*  
G3, 600 MHz, memory bus 100 MHz, 69.599 Mflop/s  
Psychtoolbox 2.5, 25 June 2002, Matlab 5.2.1.1421  
\*\*\* Screen   
0 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
Classic Mac OS Compatibility/600 Macintosh 4A   
(.Display\_Video\_Apple\_BB200 version 1)  
8 bit dacs. 1024x768 60 Hz.  
Prefs: SetClutDriverWaitsForBlanking 0.  
 - - - - - - - - - - - - - - - - - - - - - - - -   
-  
WARNING: GDSetEntries: pixelSize is 16, so start 0 and count 255 must be   
in range 0 to 32.  
WARNING: GDSetEntries: pixelSize is 16, so start 0 and count 255 must be   
in range 0 to 32.  
pixel size 8 16 32 bits  
pages 1 1 1  
CopyWindow (ie CopyBits) 56 50 60 MB/s  
SetClut suppresses ints. for 0.4 0.1 -0.0 frames  
LoadClut vs. GetClut? ( 8 bits) == == ==  
LoadClut vs. GetClut? (10 bits) no no no  
 - - - - - - - - - - - - - - - - - - - - - - - -   
-  
SetClut waits for blanking (i.e. ~60 Hz) if parameters have these values:  
 prioritySequence clutEntries pixelSize  
 83 Hz: ??? Bad cell reference operation.  
  
Error in ==\> Cytochrome:Applications:Lab:MATLAB   
5.2.1:Toolbox:Psychtoolbox 2.50:PsychTests:SetClutWaitTest.m  
On line 72 ==\> fprintf('%17s ',setClut.value{d}{s(d)});  
  
Error in ==\> Cytochrome:Applications:Lab:MATLAB   
5.2.1:Toolbox:Psychtoolbox 2.50:PsychTests:ScreenTest.m  
On line 643 ==\> SetClutWaitTest(screenNumber);  
  
Error in ==\> Cytochrome:Applications:Lab:MATLAB   
5.2.1:Toolbox:Psychtoolbox 2.50:PsychTests:ScreenTest.m  
On line 428 ==\> ScreenTest(screenNumber);  
  
»  
- - - - - - - - - - - - - - - - - - - - - - - - -  
  
ScreenTest  
\*\*\* David Jones's Classic Mac OS Compatibility/600, Mac OS   
9.2 \*\*\*\*\*\*\*\*\*\*\*  
G3, 600 MHz, memory bus 100 MHz, 58.933 Mflop/s  
Psychtoolbox 2.5, 25 June 2002, Matlab 5.2.1.1421  
\*\*\* Screen   
0 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
Classic Mac OS Compatibility/600 Macintosh 4A   
(.Display\_Video\_Apple\_BB200 version 1)  
8 bit dacs. 1024x768 60 Hz.  
Prefs: SetClutDriverWaitsForBlanking 0.  
 - - - - - - - - - - - - - - - - - - - - - - - -   
-  
WARNING: GDSetEntries: pixelSize is 16, so start 0 and count 255 must be   
in range 0 to 32.  
WARNING: GDSetEntries: pixelSize is 16, so start 0 and count 255 must be   
in range 0 to 32.  
pixel size 8 16 32 bits  
pages 1 1 1  
CopyWindow (ie CopyBits) 55 48 60 MB/s  
SetClut suppresses ints. for 0.0 0.0 -0.0 frames  
LoadClut vs. GetClut? ( 8 bits) == == ==  
LoadClut vs. GetClut? (10 bits) no no no  
 - - - - - - - - - - - - - - - - - - - - - - - -   
-  
SetClut waits for blanking (i.e. ~60 Hz) if parameters have these values:  
 prioritySequence clutEntries pixelSize  
 92 Hz:  
  
K\>\>setClut  
  
setClut =  
  
 parameter: {1x4 cell }  
 value: {1x4 cell }  
 ndims: 3  
 rate: [3x2x3 double]  
  
K\>\>setClut.value  
 {1x3 cell} {1x2 cell} {1x3 cell} {1x1 cell}  
  
K\>\>d  
  
d =  
  
 1  
 2  
 3  
  
K\>\>setClut.value{d}  
  
ans =  
  
 '0/0' '7/0' '7/7'  
  
  
ans =  
  
 'one' 'all'  
  
  
ans =  
  
 '8' '16' '32'  
  
K\>\>s(d)  
  
ans =  
  
 2 2 1  
  
K\>\>setClut.value{d}{s(d)}  
??? Bad cell reference operation.  
  
K\>\>  
  
  
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   
- -  
Prof. David Jones, Dept of Electrical and Computer Engineering  
McMaster University, 1280 Main Street West, Hamilton, Ontario, CANADA  
email: [djones@...](mailto:djones@...) phone: (905) 525-9140 ext.24689  
web: www.ece.mcmaster.ca/~djones fax: (905) 524-0340

---

<div class="post-metadata">

**Author:** ![denispelli](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@denispelli](https://psychtoolbox.discourse.group/u/denispelli)\
**Post date:** [June 28, 2002, 1:49am UTC](https://psychtoolbox.discourse.group/t/error-with-quot-screentest-quot-with-psychtoolbox-2-5-mac-ibook-mac-os-x-os-9-2-classic-mode/1404/4 "2002-06-28T01:49:00Z")

</div>

> \>I upgraded Matlab to 5.2.1 and now "ScreenTest" fails in SetClutWaitTest.  
> \>  
> \>This is a Mac iBook, running Mac OS X (10.1.5)  
> \>and running MATLAB 5.2.1 in Mac OS 9.2 (Classic Environment).  
> \>  
> \>I am attaching the error messages below.  
> \>  
> \>I am also including a few details about current variable settings  
> \>from the MATLAB debugger when I set a breakpoint at line 72 in  
> \>SetClutWaitTest.m  
> \>I am hoping this might help track down the source of the problem,  
> \>for anyone knows the inner workings of SetClutWaitTest.  
> \>  
> \>-- David Jones  
> \>  
> \>- - - - - - - - - - - - - - - - - - - - - - - - -  
> \>  
> \>»screentest  
> \>ScreenTest  
> \>\*\*\* David Jones's Classic Mac OS Compatibility/600, Mac OS  
> \>9.2 \*\*\*\*\*\*\*\*\*\*\*  
> \>G3, 600 MHz, memory bus 100 MHz, 69.599 Mflop/s  
> \>Psychtoolbox 2.5, 25 June 2002, Matlab 5.2.1.1421  
> \>\*\*\* Screen  
> \>0 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
> \>Classic Mac OS Compatibility/600 Macintosh 4A  
> \>(.Display\_Video\_Apple\_BB200 version 1)  
> \>8 bit dacs. 1024x768 60 Hz.  
> \>Prefs: SetClutDriverWaitsForBlanking 0.  
> \> - - - - - - - - - - - - - - - - - - - - - - - -   
> \>-  
> \>WARNING: GDSetEntries: pixelSize is 16, so start 0 and count 255 must be  
> \>in range 0 to 32.  
> \>WARNING: GDSetEntries: pixelSize is 16, so start 0 and count 255 must be  
> \>in range 0 to 32.  
> \>pixel size 8 16 32 bits  
> \>pages 1 1 1  
> \>CopyWindow (ie CopyBits) 56 50 60 MB/s  
> \>SetClut suppresses ints. for 0.4 0.1 -0.0 frames  
> \>LoadClut vs. GetClut? ( 8 bits) == == ==  
> \>LoadClut vs. GetClut? (10 bits) no no no  
> \> - - - - - - - - - - - - - - - - - - - - - - - -   
> \>-

dear david  
  
the bug that you were writing about was reported earlier today and is   
already fixed. (thanks for the diagnostic help anyway.) i'm enclosing   
the fixed SetClutWaitTest.m  
  
however, i am puzzled by the WARNING at the beginning of your   
ScreenTest. It shouldn't be there. I've enhanced the warning messages   
slightly in SCREEN.mex. Could you send a new ScreenTest, using the   
new files enclosed?  
  
best  
  
denis

---

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [July 1, 2002, 5:37pm UTC](https://psychtoolbox.discourse.group/t/error-with-quot-screentest-quot-with-psychtoolbox-2-5-mac-ibook-mac-os-x-os-9-2-classic-mode/1404/5 "2002-07-01T17:37:06Z")

</div>

When I run "WaitBlankingTest" the first time, it apparently succeeds.  
When I run it a second time, I get the following error message:  
  
 ??? An error occurred while restoring screens before Matlab flushes   
SCREEN.mex.  
 WaitBlanking can't wait. Your video driver's SetClut doesn't wait for  
 blanking, so you need to turn off SCREEN Preference  
 WaitBlankingAlwaysCallsSetClut.  
  
I get the same error message in MacOS 9.2.2  
and OS X (10.1.5, Classic mode).  
  
I'm running PsychToolbox 2.5 with the latest updates.
