FB 8.0.0.1258 Project with many Run Script actions fails when run via FBCMD

Hi,

I have been havin some trouble converting our FB7 build scripts to FB8 and I have now been able to find a cause.
As part of our build we execute another FB project which contains many Run Script actions with Javascript to do a lot of string concatenation. This included project fails when it is run from FBCMD but works fine when executed directly from the IDE.
I have also been able to reproduce this error in a seperate FB script which does nothing but loop 5000 times and add a text to a FinalBuilder variable through Javascript like this:

  myVar += ‘This is just some random text. Nothing to see here\n’;

When I execute this script from the IDE it works fine but when I run it via the FBCMD it fails with this error after a few thousand iterations:

Error Executing script : BeforeAction
EOutOfMemory
Out of memory
Line: 2
Char : 3
Error in BeforeScript : JavaScript, This Action did not execute.

This appears to be related to the size of the variable. When I add a longer text the script fails earlier. The same script works fine with FB 7.

This is currently a show-stopper for our switch to FB 8 so I hope this can get resolved soon.

Regards,
Christoph

Hi Christoph

Thanks for the report, we can reproduce the problem here and are investigating the problem.

Hi Christoph

We just released an updated which includes the fix for this issue.

The official downloads page still points to build 1258 https://www.finalbuilder.com/downloads/finalbuilder
But by entering the download url by hand I downloaded the new release and I can confirm that it fixed the error.

Thank you for the fix.

Apologies, I edited the downloads page but aparently dotnetnuke didn’t actually save my edit!

Thanks for confirming it’s fixed, it was a strange bug to find. I plan to blog about it as it was a delphi compiler codegen issue with reference counting… which I knew about years ago, I guess I assumed it would be fixed by now, but aparently not. I did also grep the rest of the code to make sure we had no other exposure to this issue.