Difference in behavior of webcore release and debug mode, issue when using TSpeechWebSynthesis component in release deploy mode.

I am using last version of TMS WebCore:

I noticed that there is different behavior in debug and release mode when there is a
TSpeechWebSynthesis component on the form.

For the same http server nginex for both versions,
I got always the error in release mode when created the form (in a container component).

the first time that the form.create is called occurs:

ClinicalBook_FrontEnd4.js:9453 Uncaught ReferenceError: VoicesReady is not defined
but the form is created and works well.

next time that the same form is created, occurs other fail message related on console, now with more information:
ClinicalBook_FrontEnd4.js:9453 Uncaught ReferenceError: VoicesReady is not defined

  • at populateVoiceList (ClinicalBook_FrontEnd4.js:9453:38)*
  • at Object.GetVoices (ClinicalBook_FrontEnd4.js:9456:10)*
  • at Object.Create$1 (ClinicalBook_FrontEnd4.js:9400:34)*
  • at Object.c.$create (ClinicalBook_FrontEnd4.js:328:19)*
  • at Object.LoadDFMValues (ClinicalBook_FrontEnd4.js:40593:74)*
  • at Object.CreateNewForm (ClinicalBook_FrontEnd4.js:15784:13)*
  • at Object.DoFormLoad (ClinicalBook_FrontEnd4.js:15539:12)*
  • at XMLHttpRequest.cb (ClinicalBook_FrontEnd4.js:254:28)*

when this error occurs the creating process seems be stopped and the form is not showed.

When I remove the TSpeechWebSynthesis component from the form and of course its usage, the problem goes away.

The issue does not occurs in debug mode.

I refined the issue until it could be characterized easily:

A) create a formmain + a Webpanel1 to be an container to other: form1 + button to create a new form1
B) create a form1 with TSpeechWebSynthesis + button components +
onbuttonclick event
call WebSpeechSynthesis1.Speak('Hello ! Please, urgent, I need this issue solved ! Thank you in advance !');


procedure TFormMain.WebButton1Click(Sender: TObject);
Procedure Sucess(AForm : TObject );
writeln('Form create on container');
Form1 := TForm1.CreateNew( FormMain.WebPanel1.ElementId ,
@sucess );

We've seen this issue and it is due to code optimization that happens when compiling in release mode.
We've applied a fix for this issue. Next update will address this.
As a workaround for now, turn off Optimization in the TMS WEB Core project settings.

Thank you Bruno !