External text renderer plugin failed to render the text string (Windows)

Hello,


since a couple of days, I cannot render text anymore using the external text renderer plugin (GStreamer). This issue appeared suddenly (it worked fine the day before) and has persisted ever since. I do not recall installing any updates or making changes to any component (Windows, Matlab, Psychtoolbox, drivers,..) before the problem occurred. 


Any call to e.g. Screen('DrawText'...) or Screen('TextBounds'...) results in a crash with the error message "The external text renderer plugin failed to render the text string for some reason!" (see attachment).

Here is some example code that produces the error (unless I force PTB to use the inbuilt legacy text renderer).


close all;

clearvars;

sca;

PsychDefaultSetup(2);

Screen('Preference','SkipSyncTests',0);

Screen('Preference','TextRenderer',1); %if I set this to 0, it works

screens = Screen('Screens');

screenNumber = max(screens);

[window, windowRect] = PsychImaging('OpenWindow', screenNumber, BlackIndex(screenNumber));

Screen('DrawText',window,'HelloWorld',100,100,WhiteIndex(screenNumber));

Screen('Flip',window);

KbStrokeWait;

sca;


I am using Matlab R2016a on Windows 10, Psychtoolbox version 3.0.14 and GStreamer version 1.14.4, which is recognized (PsychStartup: Adding path of installed GStreamer runtime to library path. [D:\gstreamer\1.0\x86_64\bin]).


I've tried rebooting, reinstalling GStreamer and removing several files associated with problems such as libfreetype.dll

Any help would be much appreciated!

Well, something must have changed on your end, maybe some automatic Windows-10 operating system update? Windows-10 updates of the last year or so have a reputation of breaking all kind of weird things. That error message is generally triggered if the drawtext plugin can't find or successfully load a suitable text font for some reason. You should see warning messages from the plugin in those error cases, but that in turn may not work on Matlab + Windows iff the messages printed to stdout would get redirected by Matlab into Nirvana.

Maybe follow the procedure to reset fontconfig's font cache, e.g., here and then restart Matlab and retry:

Other than that, you could set Screen('Preference','Verbosity', 16) and see if that produces any debug output related to libptbdrawtext_ftgl. Or maybe start matlab.exe -nojvm, maybe that would allow printing of relevant debug output?

Btw. in general, Psychtoolbox 3.0.14 is no longer supported.
-mario

On Mon, Jan 21, 2019 at 5:48 PM skang@... [PSYCHTOOLBOX] <PSYCHTOOLBOX@yahoogroups.com> wrote:

Hello,


since a couple of days, I cannot render text anymore using the external text renderer plugin (GStreamer). This issue appeared suddenly (it worked fine the day before) and has persisted ever since. I do not recall installing any updates or making changes to any component (Windows, Matlab, Psychtoolbox, drivers,..) before the problem occurred.


Any call to e.g. Screen('DrawText'...) or Screen('TextBounds'...) results in a crash with the error message "The external text renderer plugin failed to render the text string for some reason!" (see attachment).

Here is some example code that produces the error (unless I force PTB to use the inbuilt legacy text renderer).


close all;

clearvars;

sca;

PsychDefaultSetup(2);

Screen('Preference','SkipSyncTests',0);

Screen('Preference','TextRenderer',1); %if I set this to 0, it works

screens = Screen('Screens');

screenNumber = max(screens);

[window, windowRect] = PsychImaging('OpenWindow', screenNumber, BlackIndex(screenNumber));

Screen('DrawText',window,'HelloWorld',100,100,WhiteIndex(screenNumber));

Screen('Flip',window);

KbStrokeWait;

sca;


I am using Matlab R2016a on Windows 10, Psychtoolbox version 3.0.14 and GStreamer version 1.14.4, which is recognized (PsychStartup: Adding path of installed GStreamer runtime to library path. [D:\gstreamer\1.0\x86_64\bin]).


I've tried rebooting, reinstalling GStreamer and removing several files associated with problems such as libfreetype.dll

Any help would be much appreciated!

I remember trying quite hard once to get output from the plugin to stdout to show up anywhere, but failed (windows, kinda recent matlab). So if you manage to do that, i'd be all ears.

Cheers,
Dee

On Tue, Jan 22, 2019 at 6:02 PM Mario Kleiner mario.kleiner.de@... [PSYCHTOOLBOX] <PSYCHTOOLBOX@yahoogroups.com> wrote:


Well, something must have changed on your end, maybe some automatic Windows-10 operating system update? Windows-10 updates of the last year or so have a reputation of breaking all kind of weird things. That error message is generally triggered if the drawtext plugin can't find or successfully load a suitable text font for some reason. You should see warning messages from the plugin in those error cases, but that in turn may not work on Matlab + Windows iff the messages printed to stdout would get redirected by Matlab into Nirvana.

Maybe follow the procedure to reset fontconfig's font cache, e.g., here and then restart Matlab and retry:

Other than that, you could set Screen('Preference','Verbosity', 16) and see if that produces any debug output related to libptbdrawtext_ftgl. Or maybe start matlab.exe -nojvm, maybe that would allow printing of relevant debug output?

Btw. in general, Psychtoolbox 3.0.14 is no longer supported.
-mario

On Mon, Jan 21, 2019 at 5:48 PM skang@... [PSYCHTOOLBOX] <PSYCHTOOLBOX@yahoogroups.com> wrote:

Hello,


since a couple of days, I cannot render text anymore using the external text renderer plugin (GStreamer). This issue appeared suddenly (it worked fine the day before) and has persisted ever since. I do not recall installing any updates or making changes to any component (Windows, Matlab, Psychtoolbox, drivers,..) before the problem occurred.


Any call to e.g. Screen('DrawText'...) or Screen('TextBounds'...) results in a crash with the error message "The external text renderer plugin failed to render the text string for some reason!" (see attachment).

Here is some example code that produces the error (unless I force PTB to use the inbuilt legacy text renderer).


close all;

clearvars;

sca;

PsychDefaultSetup(2);

Screen('Preference','SkipSyncTests',0);

Screen('Preference','TextRenderer',1); %if I set this to 0, it works

screens = Screen('Screens');

screenNumber = max(screens);

[window, windowRect] = PsychImaging('OpenWindow', screenNumber, BlackIndex(screenNumber));

Screen('DrawText',window,'HelloWorld',100,100,WhiteIndex(screenNumber));

Screen('Flip',window);

KbStrokeWait;

sca;


I am using Matlab R2016a on Windows 10, Psychtoolbox version 3.0.14 and GStreamer version 1.14.4, which is recognized (PsychStartup: Adding path of installed GStreamer runtime to library path. [D:\gstreamer\1.0\x86_64\bin]).


I've tried rebooting, reinstalling GStreamer and removing several files associated with problems such as libfreetype.dll

Any help would be much appreciated!