Drawformattedtext error

Hello everybody,

I have an unsolved problem on my computer, my code work in other ones. Run the code without DrawFormattedText is ok (I displayed some picture in other parts of the code).

Here is the code to display the text:

Screen('Preference', 'SkipSyncTests', 0);   %I tryed this part with 0 or 1 but none of them work.
ScreenNumber=max(Screen('Screens'));
[w,wrect] = Screen('OpenWindow',ScreenNumber(end),[0 0 0]);%2400 x 1040
cycleRefresh=Screen('GetFlipInterval', w);
vbl=Screen(w, 'Flip');
[width, height]=Screen('WindowSize', w);
Screen('TextSize',w, 25); % SET TEXT SIZE HERE
Screen('TextFont', w, 'Times');
Screen('TextStyle', w, 1);
Textcolor=[255 255 255];
DrawFormattedText(w, 'Start experiment','center','center',Textcolor);

Here is the message error:

win = 10

Error in function TextBounds: Usage error

The external text renderer plugin failed to render the text string for some reason! % Very helpfull ^^

Error using Screen Usage:

[normBoundsRect, offsetBoundsRect, textHeight, xAdvance] = Screen(‘TextBounds’, windowPtr, text [,x] [,y][,yPositionIsBaseline] [,swapTextDirection]);

Error in DrawFormattedText (line 295) theight = RectHeight(Screen(‘TextBounds’, win, tstring));

Error in SCRIPT_PROSOC_CommentSerialObj (line 102) DrawFormattedText(w, ‘Start experiment’,‘center’,‘center’,Textcolor);

Did you install gstreamer? See help drawtextplugin (i think, typing from memory) for how to try to get it to work

Yes I did. It still did not work. Thank you for the help. I was wondering if it is not a problem of configuration with my screen. Sometimes I have this message

----- ! PTB - ERROR: SYNCHRONIZATION FAILURE ! -----

One or more internal checks (see Warnings above) indicate that synchronization
of Psychtoolbox to the vertical retrace (VBL) is not working on your setup.

You don’t provide info about your operating system and setup, etc. as required (see Psychtoolbox-3 - Psychtoolbox Forum), so hard to judge, but:

The sync failure is unrelated. If it happens frequently then is points to a buggy or misconfigured display driver, iow. your visual stimulation timing is broken. Happen a lot on MS-Windows with Intel graphics, and on various broken macOS operating systems. help SyncTrouble.

The specific error message you observe usually happens if no suitable font can be found, due to some problems with the libfontconfig library or its fontconfig database. Happens especially often on some macOS machines due to Apples shoddy operating system, less often on MS-Windows, essentially never on Linux. Cfe. External text renderer plugin failed to render the text string (Windows)

Make sure you use the latest PTB Beta, as it contains the latest workarounds for operating system bugs. If you’d need further assistance from myself, help PsychPaidSupportAndServices.

-mario