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

**URL:** <https://psychtoolbox.discourse.group/t/external-text-renderer-plugin-failed-to-render-the-text-string-windows/1327>\
**Category:** Uncategorized\
**Created:** [January 21, 2019, 3:18pm UTC](https://psychtoolbox.discourse.group/t/external-text-renderer-plugin-failed-to-render-the-text-string-windows/1327 "2019-01-21T15:18:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![skang](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@skang](https://psychtoolbox.discourse.group/u/skang)\
**Post date:** [January 21, 2019, 3:18pm UTC](https://psychtoolbox.discourse.group/t/external-text-renderer-plugin-failed-to-render-the-text-string-windows/1327/1 "2019-01-21T15:18:07Z")

</div>

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.&nbsp;

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);&nbsp;%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&nbsp;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&nbsp;such as libfreetype.dll

Any help would be much appreciated!

---

<div class="post-metadata">

**Author:** ![mariokleiner](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@mariokleiner](https://psychtoolbox.discourse.group/u/mariokleiner)\
**Post date:** [January 22, 2019, 4:59pm UTC](https://psychtoolbox.discourse.group/t/external-text-renderer-plugin-failed-to-render-the-text-string-windows/1327/2 "2019-01-22T16:59:54Z")

</div>

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:  

[https://github.com/Psychtoolbox-3/Psychtoolbox-3/issues/429](https://github.com/Psychtoolbox-3/Psychtoolbox-3/issues/429)  

  

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@...](mailto:skang@...) [PSYCHTOOLBOX] \<[PSYCHTOOLBOX@yahoogroups.com](mailto: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!

---

<div class="post-metadata">

**Author:** ![dcnieho](https://avatars.discourse-cdn.com/v4/letter/d/779978/32.png) [@dcnieho](https://psychtoolbox.discourse.group/u/dcnieho)\
**Post date:** [January 22, 2019, 7:17pm UTC](https://psychtoolbox.discourse.group/t/external-text-renderer-plugin-failed-to-render-the-text-string-windows/1327/3 "2019-01-22T19:17:14Z")

</div>

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@...](mailto:mario.kleiner.de@...) [PSYCHTOOLBOX] \<[PSYCHTOOLBOX@yahoogroups.com](mailto: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:  
> > 
> > [https://github.com/Psychtoolbox-3/Psychtoolbox-3/issues/429](https://github.com/Psychtoolbox-3/Psychtoolbox-3/issues/429)  
> > 
> >   
> > 
> > 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@...](mailto:skang@...) [PSYCHTOOLBOX] \<[PSYCHTOOLBOX@yahoogroups.com](mailto: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!
