OS X El Capitan: Screen DrawText hangs

Hi,

after upgrading the development machine to OS X 10.11 „El Capitan“ (would of course not use it on the lab machine), Screen DrawText appears to hang. This is reproducible on a colleague’s machine:

w = Screen('Openwindow',0, [0 0 0], [0 0 640 480]);
Screen('DrawText',w,'Gnu’,100,100); % does not return, and does not have any effect
Screen('Flip‘, w);

DriftDemo and other demos not using text work fine. FontBook does not report any problems.


MacBookPro10,1
MATLAB Version: 8.4.0.150421 (R2014b)
Operating System: Mac OS X Version: 10.11.1
PTB Version: 3.0.12 - Flavor: beta - Corresponds to SVN Revision 7030


Any ideas?

Thanks,
Jochen
XX---In PSYCHTOOLBOX@yahoogroups.com, <laubrock@...> wrote :

Hi,

after upgrading the development machine to OS X 10.11 „El Capitan“ (would of course not use it on the lab machine), Screen DrawText appears to hang. This is reproducible on a colleague’s machine:

w = Screen('Openwindow',0, [0 0 0], [0 0 640 480]);
Screen('DrawText',w,'Gnu’,100,100); % does not return, and does not have any effect
Screen('Flip‘, w);

DriftDemo and other demos not using text work fine. FontBook does not report any problems.


MacBookPro10,1
MATLAB Version: 8.4.0.150421 (R2014b)
Operating System: Mac OS X Version: 10.11.1
PTB Version: 3.0.12 - Flavor: beta - Corresponds to SVN Revision 7030


Any ideas?

-> Hi Jochen, don't worry about that one, patience is the key. The first time Screen('DrawText') is executed after a major OSX update, the fontconfig library (which is used by the new text renderer to enumerate and select fonts) has to rebuild its font database, enumerating all the new fonts in the system. That can take a while, easily a minute and there isn't any feedback during that time, so the script appears to hang. Time to grab some tea, or maybe better a cup of coffee, because as research showed, a watched tea kettle never boils. The "new" textrenderer is actually a port of the Linux text renderer, so it provides text rendering which is consistent with Linux (and much faster and mostly more bug free). It does require X11 "XQuartz" to be installed.

-> Less fun is if you need to use certain non-standard fonts on OSX 10.11, e.g., the font for japanese glyphs, used in DrawHighQualityUnicodeTextDemo, because somehow Apple managed to break enumeration or selection of some fonts on 10.11 with our new text renderer. The "solution" to that would be to use Screen('Preference', 'TextRenderer', 0); to switch to the old legacy renderer, which can use such fonts but has various other types of Apple created brokenness and is essentially unsupported if any trouble happens as far as i'm concerned.

best,
-mario



Thanks,
Jochen