Matlab BUG

Matlab BUG
Dear David, Denis and Allen,

I just loaded up the new version of the toolbox (I still have a renamed directory with the previous version on the computer). All of a sudden every program that calls SCREEN gets this error:

Error -17 in SCREEN 'Gamma'. Screen 0, bits 10
The programs still run OK, but before and after the main code runs, the screen loses all greys and goes black and white only.
Below is the results of screen test, which shows the error.

Many thanks,

Tony Jack

»screentest
ScreenTest
*** Maurizio Corbetta's PowerMac3,3/500, Mac OS 9.1 **********************
G4, 500 MHz, memory bus 100 MHz, 58.548 Mflop/s
Psychtoolbox 2.51, 5 July 2002, Matlab 5.2.1.1421
*** Screen 0 *************************************************************
Error -17 in SCREEN 'Gamma'. Screen 0, bits 10
Error -17 in SCREEN 'Gamma'. Screen 0, bits 10
ATI Radeon 7200, retail, PCI
ATY,RADEONp (.Display_Rage128 version 1.0b25) in slot SLOT-D
10 bit dacs. 1600x1200 85 Hz. (56,60,65,67,70,72,75,76,85,90,100,120 Hz avail)
Prefs: cscGetClutBehavior,  DacBits 10, DipPriorityAfterSetClut,
MinimumSetClutPriority 2.
 -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
Error -17 in SCREEN 'Gamma'. Screen 0, bits 10
Error -17 in SCREEN 'Gamma'. Screen 0, bits 10
Error -17 in SCREEN 'Gamma'. Screen 0, bits 10
Error -17 in SCREEN 'Gamma'. Screen 0, bits 10
pixel size           >                 8    16    32     bits
pages           >                      1     1     1
CopyWindow (ie CopyBits)           20    20    20     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
Error -17 in SCREEN 'Gamma'. Screen 0, bits 10
Error -17 in SCREEN 'Gamma'. Screen 0, bits 10
Error -17 in SCREEN 'Gamma'. Screen 0, bits 10
Error -17 in SCREEN 'Gamma'. Screen 0, bits 10
 -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
SetClut waits for blanking (i.e. ~85 Hz) if parameters have these values:
           prioritySequence
   79 Hz:            >    0/0
   86 Hz:            >    7/0
SetClut doesn't wait for blanking if parameters have these values:
           prioritySequence
  302 Hz:            >    7/7
The following parameters don't affect whether SetClut waits for blanking:
            >     clutEntries         pixelSize
 -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
SetGamma waits for blanking (i.e. ~85 Hz) if parameters have these values:
           prioritySequence         pixelSize
   82 Hz:            >    0/0            >     16
   86 Hz:            >    7/0            >     16
   80 Hz:            >    0/0            >     32
   86 Hz:            >    7/0            >     32
SetGamma doesn't wait for blanking if parameters have these values:
           prioritySequence         pixelSize
  302 Hz:            >    0/0            >      8
  295 Hz:            >    7/0            >      8
  306 Hz:            >    7/7            >      8
  283 Hz:            >    7/7            >     16
  282 Hz:            >    7/7            >     32
The following parameters don't affect whether SetGamma waits for blanking:
            >     clutEntries
********************************************************************* >*****
»
-- 
-------------------------------------
Dr Anthony I. Jack
Washington University Campus Box 8225
4525 Scott Avenue
St Louis, Missouri 63110
Tel (314) 747 1726
Fax (314) 362 6110
Email: ajack@...
http://www.nil.wustl.edu/labs/corbetta/personnel/ajack.html
Tony,

The only difference I can see between our
systems is the ROM. I have ROM# 113-77701-126.

http://www.ati.com:80/support/drivers/mac/atimacrom901.html


I'm a little surprised that 10bit DAC's are supported
without it. See Ben Singer's HISTORY note.

http://www.cvs.rochester.edu/people/b_singer/Radeon10BitGamma/

However it may now be incorporated in the ROM extender. But
the new drivers may subltly rely on the latest ROM. Could
you run Cluttest so we can see what it's doing.

Also the advantage of the Radeon lies more in 3D performance
(i.e. OpenGL) then 2D performance and 10bit DAC resolution.
If you are more interested in showing moving stimuli the
Rage128Pro with it's high CopyWindows rate would be better.
Take care,

Doug Taylor

--- In psychtoolbox@y..., "dr_a_jack" <ajack@n...> wrote:
> This is very helpful, many thanks. Both of these suggestions
> proved effective. (re. colour inversion - strangely the card became
> more sensitive to pixel value than it was before - so it no longer
> tolerated my using the wrong screen setting).
>
> However...
> There is another (hopefully) minor bug that started with all this
> updating, and which has not been solved. The mouse cursor
> leaves behind little squares of incorrectly coloured screen, giving
> a very patchy appearance.
>
> Also...
> I just want to ask about a bug which was there before any of this
> started, and still occasionally occurs. That is, sometimes I get a
> print manager error at the end of executing a program - although
> I don't knowingly make any print calls during the program.
>
> Tony
>
> --- In psychtoolbox@y..., Denis Pelli <denis.pelli@n...> wrote:
> > dear tony
> >
> > don't be discouraged. it all looks fine. your upgrade greatly
> > improved the functioning of your Radeon 7200 graphics card.
> The only
> > problem that arose is that the driver name has changed (from
> > .Display_Rage128 to .Display_RADEON). PrepareScreen
> failed to
> > recognize the new name, so it didn't configure things correctly,
> i.e.
> > it didn't enable priority dipping.
> >
> > The fix is simple. Go to PrepareScreen and change this line
> (near 154):
> >
> > if strcmp(card.driverName,'.Display_Rage128') | isATIRadeon
> >
> > to this:
> >
> > if strcmp(card.driverName,'.Display_Rage128') |
> > strcmp(card.driverName,'.Display_RADEON') | isATIRadeon
> >
> > then close the file and type "clear all". Now your Radeon 7200
> should run fine.
> >
> > As far as I can tell from the ScreenTest report, the Rage128Pro
> is
> > working fine too. You say that you're getting a negative image,
> but
> > the LoadClut test performed by ScreenTest passed. I'd guess
> that the
> > card and driver are ok, and that your program is assuming a
> > particular pixelSize that is different from the current pixelSize.
> >
> > best
> >
> > denis
> >
> > At 10:08 PM +0000 7/30/02, dr_a_jack wrote:
> > >With regard to my problem with the Radeon 7200 after
> upgrading
> > >psychtoolbox:
> > >
> > >Denis Peli's advice (change PrepareScreen.m) worked
> without
> > >apparent hitch (see 1st screen test result below).
> > >
> > >I then updated the driver as kindly suggested by Doug Taylor
> (I
> > >had to update from OS 9.1 to 9.2.2 before I could do this).
> This
> > >speeded up copybits from 20 to 36 MB/s (see second screen
> > >test). However, it also caused synchronisation problems (see
> > >second Screen test, movie programs and flickertest). There
> was
> > >also some anomalous screen inversion, as before. As a
> result
> > >my experiment is again inoperable, because it doesn't wait
> for
> > >the screen to refresh (and I have a subject coming tomorrow).
> > >
> > >Incidentally, I noticed that the computer also has a native
> > >graphics card, which has less video memory but runs
> copybits
> > >much more quickly. I wonder if there is any advantage to
> using
> > >the 'better' video card, or if I should just use the faster native
> card.
> > >Unfortunately, the native card has even more severe inversion
> > >problems, making my experiment mysteriously run as black
> on
> > >white instead of white on black (see final set of screentest
> and
> > >flickertest results, preceded by system description of card).
> > >
> > >I would be grateful for any solution, involving either video card,
> > >that might allow me to run a subject at 3pm tomorrow, or as
> > >soon as possible thereafter.
> > >
> > >Many thanks,
> > >
> > >Tony
> > >
> > >
> > >
> > >» PCI
> > >
> > >SLOT-D
> > >Display card
> > >Card type: display
> > >Card name: ATY,RADEONp
> > >Card model: ATY,RADEON
> > >Card ROM #: 113-77701-119
> > >Card revision: 0
> > >Card vendor ID: 1002
> > >VRAM size: 32 MB
> > >
> > >After first fix (change to Psychtoolbox code):
> > >
> > >ScreenTest
> > >*** Maurizio Corbetta's PowerMac3,3/500, Mac OS 9.1
> > >**********************
> > >G4, 500 MHz, memory bus 100 MHz, 79.825 Mflop/s
> > >Psychtoolbox 2.51, 5 July 2002, Matlab 5.2.1.1421
> > >*** Screen 0
> > >*************************************************************
> > >ATI Radeon 7200, retail, PCI
> > >ATY,RADEONp (.Display_Rage128 version 1.0b25) in slot
> > >SLOT-D
> > >8 bit dacs. 1600x1200 85 Hz.
> > >(56,60,65,67,70,72,75,76,85,90,100,120 Hz avail)
> > >Prefs: cscGetClutBehavior, DipPriorityAfterSetClut,
> > >MinimumSetClutPriority 2.
> > > - - - - - - - - - - - - - - - - - - - - - - - =
-=
> -
> > >pixel size 8 16 32 bits
> > >pages 1 1 1
> > >CopyWindow (ie CopyBits) 20 20 20 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. ~85 Hz) if parameters have
> these
> > >values:
> > > prioritySequence
> > > 80 Hz: 0/0
> > > 86 Hz: 7/0
> > >SetClut doesn't wait for blanking if parameters have these
> > >values:
> > > prioritySequence
> > > 303 Hz: 7/7
> > >The following parameters don't affect whether SetClut waits
> for
> > >blanking:
> > > clutEntries pixelSize
> > > - - - - - - - - - - - - - - - - - - - - - - - =
-=
> -
> > >SetGamma waits for blanking (i.e. ~85 Hz) if parameters have
> > >these values:
> > > prioritySequence pixelSize
> > > 81 Hz: 0/0 16
> > > 86 Hz: 7/0 16
> > > 81 Hz: 0/0 32
> > > 86 Hz: 7/0 32
> > >SetGamma doesn't wait for blanking if parameters have
> these
> > >values:
> > > prioritySequence pixelSize
> > > 303 Hz: 0/0 8
> > > 295 Hz: 7/0 8
> > > 306 Hz: 7/7 8
> > > 283 Hz: 7/7 16
> > > 283 Hz: 7/7 32
> > >The following parameters don't affect whether SetGamma
> waits
> > >for blanking:
> > > clutEntries
> >
> >*********************************************************************
> *
> > >****
> > >
> > >After updating driver:
> > >
> > >ScreenTest
> > >*** Maurizio Corbetta's PowerMac3,3/500, Mac OS 9.2.2
> > >********************
> > >G4, 500 MHz, memory bus 100 MHz, 80.017 Mflop/s
> > >Psychtoolbox 2.51, 5 July 2002, Matlab 5.2.1.1421
> > >*** Screen 0
> > >*************************************************************
> > >ATI Radeon 7200, retail, PCI
> > >ATY,RADEONp (.Display_RADEON version 1.0f59) in slot
> > >SLOT-D
> > >10 bit dacs. 1600x1200 85 Hz.
> > >(56,60,65,67,70,72,75,76,85,90,100,120 Hz avail)
> > >Prefs: cscGetClutBehavior, DacBits 10, UseHighGammaBits.
> > > - - - - - - - - - - - - - - - - - - - - - - - =
-=
> -
> > >pixel size 8 16 32 bits
> > >pages 1 1 1
> > >CopyWindow (ie CopyBits) 36 36 36 MB/s
> > >SetClut suppresses ints. for 0.0 0.0 0.0 frames
> > >LoadClut vs. GetClut? ( 8 bits) == == ==
> > >LoadClut vs. GetClut? (10 bits) == == ==
> > > - - - - - - - - - - - - - - - - - - - - - - - =
-=
> -
> > >SetClut waits for blanking (i.e. ~85 Hz) if parameters have
> these
> > >values:
> > > prioritySequence
> > > 79 Hz: 0/0
> > > 86 Hz: 7/0
> > >SetClut doesn't wait for blanking if parameters have these
> > >values:
> > > prioritySequence
> > > 303 Hz: 7/7
> > >The following parameters don't affect whether SetClut waits
> for
> > >blanking:
> > > clutEntries pixelSize
> > > - - - - - - - - - - - - - - - - - - - - - - - =
-=
> -
> > >SetGamma waits for blanking (i.e. ~85 Hz) if parameters have
> > >these values:
> > > prioritySequence pixelSize
> > > 78 Hz: 0/0 16
> > > 86 Hz: 7/0 16
> > > 81 Hz: 0/0 32
> > > 86 Hz: 7/0 32
> > >SetGamma doesn't wait for blanking if parameters have
> these
> > >values:
> > > prioritySequence pixelSize
> > > 306 Hz: 0/0 8
> > > 304 Hz: 7/0 8
> > > 307 Hz: 7/7 8
> > > 283 Hz: 7/7 16
> > > 283 Hz: 7/7 32
> > >The following parameters don't affect whether SetGamma
> waits
> > >for blanking:
> > > clutEntries
> >
> >*********************************************************************
> *
> > >****
> > >»
> > >MovieDemo.m is only 45 lines, plus comments. Read it to
> see
> > >how easy it is to show movies.
> > >
> > >The movie was shown twice, running over by -0 frames in the
> > >first and
> > >-220 frames in the second showing. The first showing may
> have
> > >been jerky, due to
> > >interruptions. The second showing used RUSH to minimize
> > >interruptions, to
> > >make the movie run smoothly. See MovieTearDemo and
> RUSH.
> > >
> > >Movie size is 320 by 240
> > >Showed 75 on/off frames (plus 1 dummy frame) in 0.469
> > >seconds.
> > >321.7 image copies/sec
> > >Missed 0 frames during movie. This should be 0 if movie
> > >is keeping up with the frame rate. The image copies/sec
> > >calculation
> > >is accurate only if no frames are missed. Run ScreenTest to
> > >determine
> > >how large a movie you can show at the frame rate.
> > >
> > >The movie was shown twice. The second showing used
> RUSH
> > >to raise priority
> > >to minimize interruptions. See RUSH.
> > >
> > >
> > >»flickertest
> > >FlickerTest
> > >*** Screen 0
> > >*************************************************************
> > >ATI Radeon 7200, retail, PCI
> > >ATY,RADEONp (.Display_RADEON version 1.0f59) in slot
> > >SLOT-D
> > >10 bit dacs. 1600x1200 85 Hz.
> > >(56,60,65,67,70,72,75,76,85,90,100,120 Hz avail)
> > >Prefs: cscGetClutBehavior, DacBits 10, UseHighGammaBits.
> > > - - - - - - - - - - - - - - - - - - - - - - - =
-=
> -
> > >WaitBlanking is using blanking interrupt to synch with 85 Hz
> > >display:
> > > 85 Hz: priority 0
> > > 85 Hz: priority 1
> > > - - - - - - - - - - - - - - - - - - - - - - - =
-=
> -
> > >WaitBlanking is using SetClut to synch with 85 Hz display:
> > > 79 Hz: priority 0
> > > 81 Hz: priority 1
> > >200 Hz: priority 2
> > >200 Hz: priority 7
> >
> >*********************************************************************
> *
> > >****
> > >
> > >
> > >
> > >
> > >Other display card
> > >»
> > >SLOT-A (AGP)
> > >Display card
> > >Card type: display
> > >Card name: ATI,Rage128Pd
> > >Card model: ATI,Rage128Pro
> > >Card ROM #: 113-72701-125
> > >Card revision: 0
> > >Card vendor ID: 1002
> > >VRAM size: 16 MB
> > >
> > >
> > >
> > >ScreenTest
> > >*** Maurizio Corbetta's PowerMac3,3/500, Mac OS 9.2.2
> > >********************
> > >G4, 500 MHz, memory bus 100 MHz, 79.881 Mflop/s
> > >Psychtoolbox 2.51, 5 July 2002, Matlab 5.2.1.1421
> > >*** Screen 0
> > >*************************************************************
> > >ATI Rage128Pro
> > >ATY,Rage128Pd (.Display_Rage128 version 1.0.1b45) in slot
> > >SLOT-A
> > >8 bit dacs. 1600x1200 85 Hz.
> > >(56,60,65,67,70,72,75,76,85,90,100,120 Hz avail)
> > >Prefs: cscGetClutBehavior, DipPriorityAfterSetClut,
> > >MinimumSetClutPriority 2.
> > > - - - - - - - - - - - - - - - - - - - - - - - =
-=
> -
> > >pixel size 8 16 32 bits
> > >pages 1 1 1
> > >CopyWindow (ie CopyBits) 180 181 182 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. ~85 Hz) if parameters have
> these
> > >values:
> > > prioritySequence
> > > 82 Hz: 0/0
> > > 86 Hz: 7/0
> > >SetClut doesn't wait for blanking if parameters have these
> > >values:
> > > prioritySequence
> > > 304 Hz: 7/7
> > >The following parameters don't affect whether SetClut waits
> for
> > >blanking:
> > > clutEntries pixelSize
> > > - - - - - - - - - - - - - - - - - - - - - - - =
-=
> -
> > >SetGamma waits for blanking (i.e. ~85 Hz) if parameters have
> > >these values:
> > > prioritySequence pixelSize
> > > 82 Hz: 0/0 16
> > > 86 Hz: 7/0 16
> > > 84 Hz: 0/0 32
> > > 86 Hz: 7/0 32
> > >SetGamma doesn't wait for blanking if parameters have
> these
> > >values:
> > > prioritySequence pixelSize
> > > 306 Hz: 0/0 8
> > > 305 Hz: 7/0 8
> > > 307 Hz: 7/7 8
> > > 283 Hz: 7/7 16
> > > 283 Hz: 7/7 32
> > >The following parameters don't affect whether SetGamma
> waits
> > >for blanking:
> > > clutEntries
> >
> >*********************************************************************
> *
> > >****
> > >»flickertest
> > >FlickerTest
> > >*** Screen 0
> > >*************************************************************
> > >ATI Rage128Pro
> > >ATY,Rage128Pd (.Display_Rage128 version 1.0.1b45) in slot
> > >SLOT-A
> > >8 bit dacs. 1600x1200 85 Hz.
> > >(56,60,65,67,70,72,75,76,85,90,100,120 Hz avail)
> > >Prefs: cscGetClutBehavior, DipPriorityAfterSetClut,
> > >MinimumSetClutPriority 2.
> > > - - - - - - - - - - - - - - - - - - - - - - - =
-=
> -
> > >WaitBlanking is using blanking interrupt to synch with 85 Hz
> > >display:
> > > 85 Hz: priority 0
> > > 85 Hz: priority 1
> > > - - - - - - - - - - - - - - - - - - - - - - - =
-=
> -
> > >WaitBlanking is using SetClut to synch with 85 Hz display:
> > > 85 Hz: priority 0
> > > 85 Hz: priority 1
> > > 85 Hz: priority 2
> > > 85 Hz: priority 7
> >
> >*********************************************************************
> *
> > >****
> > >»
> > >»
> > >
> > >
> > >
> > >http://psychtoolbox.org
> > >POST a message to: psychtoolbox@y...
> > >UNSUBSCRIBE by sending a blank message to:
> > >psychtoolbox-unsubscribe@y...
> > >
> > >Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
Hi
I recently install the Psychtoolbox, but i can't call any function because these error displayed:
 
DLL load failed for mex file C:\Psychotoolbox\toolbox\PsychToolbox\PsychBasic\Screen.dll
No se puede encontrar el módulo especificado.
??? Invalid MEX-file
 
Error in ==> C:\Psychotoolbox\toolbox\PsychToolbox\PsychDemos\GratingDemo.m
On line 15  ==> window=SCREEN(whichScreen,'OpenWindow');
Probably it's very trivial but i am an inexpert user of matlab.
Thanks for your attention
Hi,

I have attached a crashreport... I'm using Matlab release 13 under Win XP.

Yours,
Annette
That exhaustive crash report (probably an output option in MATLAB
you can turn off or adjust) is rather distracting as the first
thing you needed to see in it is at the very bottom where it says
there is a problem with:

Screen(window,'TextFont',serifFont);

Looking at the code you provided, looks like 'window' should be
replaced with 'Score' like all the other lines. And I'll assume
that 'Bookman Old Style' is a valid font on your system.

Daniel Shima
Vanderbilt Vision Research Center


--- In psychtoolbox@yahoogroups.com, Annette Horstmann
<horstman@n...> wrote:

> Error in ==>
z:\usr2\horstman\matlab\psychtoolbox_2_54\psychtoolbox\psychbasic\S
creen.dll
> Error in ==> Z:\usr2\horstman\Matlab\jakeFake\CurrentScore.m
> On line 35 ==> Screen(window,'TextFont',serifFont);
>
> This impressive crash was achieved with the following bit
> of code and using the Toolbox 2.54 under Win
>
> rect=CenterRect([0 0 (res(1,1)) (res(1,2))], Screen(0, 'Rect'));
>
> Score=SCREEN(0,'OpenWindow',[],rect);
> white=WhiteIndex(window);
> black=BlackIndex(window);
> gray=(white+black)/2;
> serifFont = 'Bookman Old Style';
>
> % Screen(Score,'FillRect',gray,rect);
> Screen(window,'TextFont',serifFont);
> Screen(Score,'TextSize',48);
> Screen(Score,'DrawText','SCORE',100,150,gray);
> GetClicks;
> Screen(Score,'Close');
Problem: During execution an exception is thrown and the program killed stating:
"problem in ...\toolbox\psychtoolbox\psychbasic\getchar.dll"
" Variable: 'timeoflastkeydown' is not defined"
 
Program: I don’t want to bother you with a long program. The exception appears after about 100 runs and is therefore difficult to repoduce.
 
ScreenTest:
****** PHILIPP running Windows XP Service Pack 2 ******
Single Intel undetected with 510MB RAM, 291MB free and 43% load.
DirectX 0.0 release 0.0
Psychtoolbox 2.54, 20 January 2004, Matlab 6.5.0.180913a (R13)
 -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
Blit rate in MB/s
depth:          8         16        32       
priority 0      866.4986  467.6169  417.7631 
priority 1      1004.1507 951.2075  892.7676 
priority 2      1002.8509 950.8659  896.7453
 
Please let me know what this variable is about and how I can get around this problem. Otherwise, is there another function I could use to get a character - no timing or other features necessary.
 
Regards,
Philipp Kallerhoff
 
 
Hallo Out there

I am trying to get to run a Mtlocalizer on a windows Pc. Sadly parts of
the script uses Psychtoolbox scripts that are not Supported under Windows.
It crashes as it tries to run the getsecstest -script. Is there any
work-around for such a problem? Needs my toolbox Version to be updated?

Thanks in advance for any Help

regards

Thomas Christophel
Department of Neuropsychology
Bremen University