Hello all,
I'm using Psychtoolbox 2.54 and Matlab 7, with OS Windows XP
Professional.
I've created an 8 sec movie of a ball moving, by defining each frame
of the movie beforehand, and then running them all together using
Rush.
Here's part of my code:
==================================================
loop = {
'Screen(get(test,''window''),''WaitBlanking'');'
'Screen(get(test,''window''),''WaitBlanking'',prescreens);'
'for i=1:totalFrames;'
'Screen(get(test,''window''),''WaitBlanking'');'
'Screen(get(test,''window''),''FillRect'',background);'
'Screen(get(test,''window''),''FillOval'',stimulusColor
(i),r{i});'
'end;'
};
priorityLevel = MaxPriority(test.screenNumber,'WaitBlanking');
Screen('Screens');
Screen(test.window,'WaitBlanking',prescreens);
Rush(loop,priorityLevel);
============================================================
However at about the 5th trial (=block), the program crushes (not
before the screen and the ball, which were black & white, change
their colors to green and pink...) and the following message appears
on matlab window:
====================================================
??? Error during RUSH: Restore failed to restore the Direct Draw
Surface
Error in ==> Test.presentVisualMovie at 497
Rush(loop,priorityLevel);
Error in ==> Test.EvokeStimulus at 246
presentVisualMovie(test,block,stimulus);
??? Error while evaluating uicontrol Callback.
==========================================================
Does anyone knows what causes the call to Restore method of
directDraw surface?
I know DirectDraw is a java class belongs to DirectX, but I don't
know What are the relations between PsychToolBox and DirectX
many thanks in advance,
Hanna
I'm using Psychtoolbox 2.54 and Matlab 7, with OS Windows XP
Professional.
I've created an 8 sec movie of a ball moving, by defining each frame
of the movie beforehand, and then running them all together using
Rush.
Here's part of my code:
==================================================
loop = {
'Screen(get(test,''window''),''WaitBlanking'');'
'Screen(get(test,''window''),''WaitBlanking'',prescreens);'
'for i=1:totalFrames;'
'Screen(get(test,''window''),''WaitBlanking'');'
'Screen(get(test,''window''),''FillRect'',background);'
'Screen(get(test,''window''),''FillOval'',stimulusColor
(i),r{i});'
'end;'
};
priorityLevel = MaxPriority(test.screenNumber,'WaitBlanking');
Screen('Screens');
Screen(test.window,'WaitBlanking',prescreens);
Rush(loop,priorityLevel);
============================================================
However at about the 5th trial (=block), the program crushes (not
before the screen and the ball, which were black & white, change
their colors to green and pink...) and the following message appears
on matlab window:
====================================================
??? Error during RUSH: Restore failed to restore the Direct Draw
Surface
Error in ==> Test.presentVisualMovie at 497
Rush(loop,priorityLevel);
Error in ==> Test.EvokeStimulus at 246
presentVisualMovie(test,block,stimulus);
??? Error while evaluating uicontrol Callback.
==========================================================
Does anyone knows what causes the call to Restore method of
directDraw surface?
I know DirectDraw is a java class belongs to DirectX, but I don't
know What are the relations between PsychToolBox and DirectX
many thanks in advance,
Hanna