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

**URL:** https://www.finalbuilder.com/forums/t/fb-8-0-0-1258-project-with-many-run-script-actions-fails-when-run-via-fbcmd/3604
**Category:** Bugs
**Created:** [October 21, 2015, 1:46am UTC](https://www.finalbuilder.com/forums/t/fb-8-0-0-1258-project-with-many-run-script-actions-fails-when-run-via-fbcmd/3604 "2015-10-21T01:46:42Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![chillefeld](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/chillefeld/32/1333_2.png) [@chillefeld](https://www.finalbuilder.com/forums/u/chillefeld)
#### Post date: [October 21, 2015, 1:46am UTC](https://www.finalbuilder.com/forums/t/fb-8-0-0-1258-project-with-many-run-script-actions-fails-when-run-via-fbcmd/3604/1 "2015-10-21T01:46:42Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [October 22, 2015, 2:44am UTC](https://www.finalbuilder.com/forums/t/fb-8-0-0-1258-project-with-many-run-script-actions-fails-when-run-via-fbcmd/3604/2 "2015-10-22T02:44:09Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [October 23, 2015, 5:48am UTC](https://www.finalbuilder.com/forums/t/fb-8-0-0-1258-project-with-many-run-script-actions-fails-when-run-via-fbcmd/3604/3 "2015-10-23T05:48:20Z")

</div>

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

---

<div class="post-metadata">

### Author: ![chillefeld](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/chillefeld/32/1333_2.png) [@chillefeld](https://www.finalbuilder.com/forums/u/chillefeld)
#### Post date: [October 23, 2015, 8:56am UTC](https://www.finalbuilder.com/forums/t/fb-8-0-0-1258-project-with-many-run-script-actions-fails-when-run-via-fbcmd/3604/4 "2015-10-23T08:56:28Z")

</div>

The official downloads page still points to build 1258 [https://www.finalbuilder.com/downloads/finalbuilder](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.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [October 23, 2015, 11:55am UTC](https://www.finalbuilder.com/forums/t/fb-8-0-0-1258-project-with-many-run-script-actions-fails-when-run-via-fbcmd/3604/5 "2015-10-23T11:55:23Z")

</div>

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.
