Dear Mario and friends
I get the following error a lot. PsychImaging fails when I try to open a window. Usually I clear all and then I’m fine for days. However, the error message doesn’t actually say what the problem it is. It merely says read the error above, yet no error appeared above. I’m pasting the print out. Below it i’m printing my code that called PsychImaging. I use this code every day, so I’d have thought it’s solid. But now I’m not so sure. I flagged the mysterious sentence by “****************”
Best
Denis
PRINT OUT
runCrowdingBeta
…
PTB-INFO: Connection to Psychtoolbox kernel support driver instance #0 (Revision 1) established.
PTB-INFO: Disconnecting from kernel driver instance #0 for detected Intel GPU for safety reasons. setenv(‘PSYCH_ALLOW_DANGEROUS’, ‘1’) to override.
…
Total of 16000 trials should take about 1600 minutes to run.
:: Your screen resolution is at its native maximum 2560 x 1600. Excellent!
Using default microphone.
PTB-INFO: Using modified PortAudio V19.6.0-devel, revision unknown
PsychPortAudio initialized. Will use CoreAudio for audio.
PTB-INFO: New audio device -1 with handle 0 opened as PortAudio stream:
PTB-INFO: For 1 channels Capture: Audio subsystem is Core Audio, Audio device name is Built-in Microphone
PTB-INFO: Real samplerate 48000.000000 Hz. Input latency 52.666667 msecs, Output latency 0.000000 msecs.
Open and close WaitForSpeech took 1.2 s.
1146: Calling MacDisplaySettings. … Done (2.5 s)
1162: OpenWindow. … Error using Screen
See error message printed above. ****************
Error in PsychImaging (line 2210)
[win, winRect] = Screen(‘OpenWindow’, screenid, clearcolor, winRect, pixelSize,
numbuffers, stereomode, multiSample, imagingMode, specialFlags, clientRect,
fbOverrideRect, vrrParams);
Error in OpenWindow (line 23)
[window,r]=PsychImaging(‘OpenWindow’,o.screen,white);
Error in CriticalSpacing (line 1164)
window=OpenWindow(oo(1));
Error in runCrowdingBeta (line 288)
ooo{block}=CriticalSpacing(ooo{block});
> MY CODE TO CALL PSYCHIMAGING
>
> function [window,r]=OpenWindow(o)
> % [window,r]=OpenWindow(o);
> % Moved this into a subroutine so that we can reuse the same code when we
> % close and reopen the window to flip the screen horizontally, when we use
> % a mirror.
> white=255;
> % Detect HiDPI mode, e.g. on a Retina display.
> screenBufferRect=Screen('Rect',o.screen); % What the software sees.
> screenRect=Screen('Rect',o.screen,1); % What the observer sees.
> o.hiDPIMultiple=RectWidth(screenRect)/RectWidth(screenBufferRect);
> if true
> PsychImaging('PrepareConfiguration');
> if o.flipScreenHorizontally
> PsychImaging('AddTask','AllViews','FlipHorizontal');
> end
> if o.hiDPIMultiple~=1
> PsychImaging('AddTask','General','UseRetinaResolution');
> end
> % Mario says the virtual frame buffer makes the back buffer more
> % reliable, for better performance.
> PsychImaging('AddTask','General','UseVirtualFramebuffer');
> if o.useFractionOfScreenToDebug==0
> [window,r]=PsychImaging('OpenWindow',o.screen,white);
> else
> screenBufferRect=Screen('Rect',o.screen); % What the software sees.
> r=round(o.useFractionOfScreenToDebug*screenBufferRect);
> r=AlignRect(r,screenBufferRect,'right','bottom');
> [window,r]=PsychImaging('OpenWindow',o.screen,white,r);
> end
> else
> [window,r]=Screen('OpenWindow',o.screen,white,screenBufferRect);
> end
>
> model: 'MacBook10,1'
> modelDescription: 'MacBook (Retina, 12-inch, 2017)'
> manufacturer: 'Apple Inc.'
> psychtoolbox: 'Psychtoolbox 3.0.16'
> matlab: 'MATLAB 9.6 (R2019a)'
> system: 'macOS 10.14.6'
> hostName: 'Denis-MacBook'
> userName: 'Denis Pelli'
> MACAddress: '8c:85:90:c5:2d:4e'
> screenMex: 'Screen.mexmaci64 Dec 16 2019'
> screens: 0
> screen: {[0]}
> size: {[2560 1600]}
> maxSize: {[2560 1600]}
> mm: {[259 161]}
> openGLRenderer: {'Intel(R) HD Graphics 615'}
> openGLVendor: {'Intel Inc.'}
> openGLVersion: {'2.1 INTEL-12.10.17'}
> psychtoolboxKernelDriver: 'PsychtoolboxKernelDriver 1.1'
> drawTextPlugin: 1
> psychPortAudio: 1
> summary: 'MacBook10,1-macOS-10.14.6-PTB-3.0.16'