Strange error after update 2.4.5 (with source)

Hello Bruno and TMS Team,
I have a strange error after update from 2.4.1 to 2.4.5.
The compiler in Preprocessor phase shows: "[Fataler Fehler] Argument außerhalb des Bereichs"

The error appeared on our big project.
I then created a new WebCore project and only added this one unit. I was able to reproduce the error.
The entire project is in the attachment

If I uninstall WebCore 2.4.5 and install the previous version 2.4.1, everything works normally again.

Oh, I work on Delphi 11.3 !!

Kind regards
Thomas (33.9 KB)

We could reproduce this. We're investigating.

We applied a fix but you can also solve this with changing your code:

procedure TWebBasisForm.WebFormClose(Sender: TObject; var Action: TCloseAction);
  Action := TCloseAction( caFree);


procedure TWebBasisForm.WebFormClose(Sender: TObject; var Action: TCloseAction);
  Action := TCloseAction.caFree;

Are you sure?
I think I had previously run a test with this line commented out.
But I can't test it until tomorrow.

I informed of our findings here.

I have updated to today.
It seems to work.

But now I have to turn off the optimization because several problems/errors arise with the optimization turned on.

After dealing with the first two problems (methods were eliminated) I gave up looking further because it looked like a lot of effort.

Unfortunately, the project.js file is now much larger. From 1.8 MB it is now 5.1 MB in size. But everything works again.

We haven't changed anything wrt optimization. This is actually the external terser tool responsible for this that was not changed for quite some time.
So, if you encounter an issue with optimization, please share details so we can investigate.

I have an object with methods.
Some methods are only called in an "asm" scope.
These are currently being optimized away.

I have to say that I had about a 4-week break in development because of the Christmas holidays and the annual financial statements.

For such functions, do dummy calls from Object Pascal code, like

if (1 < 0) then MyProc;

and the optimizer will include MyProc