Tag Archives: eclipse

Fixing Out of Memory Errors for Flash Builder when using Mac OS Lion.

Sometimes when using Eclipse it is possible to receive the following error due to the application running out of memory:

Eclipse Out Of Memory Error

Eclipse Out Of Memory Error

This problem can be more frequent when working with projects that use a lot of libraries and a lot of files, or projects that have a large number of graphical assets. The solution is to to edit the eclipse.ini file and permit FlashBuilder access to larger amounts of RAM.

The eclipse.ini file can be found in OS Lion by navigating to the folder that Flash Builder was installed at which is normally the applications directory. Right or Ctrl + Click the Flash Builder application icon and select ‘Show Package Contents‘ from the menu.

Flash Builder Location

Flash Builder Location

Clicking the ‘Show Package Contents‘ button should open a folder. The eclipse.ini file can be found within the following directory: Contents > MacOS

eclipse.ini file location

eclipse.ini file location

Open the eclipse.ini file in your favourite text editor. You will need to edit a few of these parameters to enable higher memory. This information from the Adobe website describes the important parameters:

Xms Initial size (bytes) of the memory allocation pool. This value must be a multiple of 1024, greater than 1 MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes.
Xmx Maximum size (bytes) of the memory allocation pool. This value must a multiple of 1024, greater than 2 MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes.
XX:MaxPermSize Maximum size of Permanent Generation
XX:PermSize Initial size of Permanent Generation

Setting these values to higher amounts should stop the error from occurring. I normally set my arguments to the following, and do not often run into any problems:

-Xms512m
-Xmx1024m
-XX:MaxPermSize=256m
-XX:PermSize=64m

This should prevent any more out of memory errors. Experiment with the values, but remember to not set them to a value which your machine can not handle.

Using FDT with AS2.

FDT is a great tool for developing Actionscript. However, getting a version of FDT that works with AS2 can be quite tricky. There are not any links to directly download it from the Powerflasher FDT website. At the time of writing, they are promoting and exposing urls to download FDT5 only, with no download mirrors for previous versions. I dont think that FDT5 can build AS2 projects, so you need to install version 3.5.

To install FDT 3.5 can be a bit tricky if you do not know where to look. In Eclipse, click help > install new software.

Install new software in Eclipse

Install new software in Eclipse

Then you need to search for the location ‘http://fdt.powerflasher.com/update/’ FDT3.5 can be found here and installed directly into Eclipse, allowing you to work with AS2 applications again.

FDT 3.5

FDT 3.5