Flash Error 5005 Unknown Error Optimizing Byte Code -- UPDATED

Posted by Tres Mon, 09 Feb 2009 20:56:00 GMT

When working on a larger project with Actionscript 3 I started seeing this error while building.

The appearance of the error was related to a new class I was writing & when debugging, the error consistently occurred when certain lines in the new class were not commented & wouldn’t happen when they were.

This is a nightmare scenario for me… ye olde ‘unknown error.’ I began to have the sinking feeling that I had stumbled upon some deep bug that would halt everything & I’d spend the next hours trying to find some workaround… and then I could only hope that it wouldn’t happen again.

A simple restart of Flash got things running right again.

Update:

Turns out that the restart didn’t solve the problem. It helped, but I was still seeing the error cropping up.

To fix the problem you’ve got to set the JAVATOOLOPTIONS environment variable to ‘-Xmx1024M’

To set this on OS X, just point your property list editor to ~/.MacOSX/environment.plist. If you’re not showing hidden files in the Finder, you can do this via the shell with the following:

open ~/.MacOSX/environment.plist 

then create a new item. Set the key to

JAVA_TOOL_OPTIONS

and set the value to

-Xmx1024

To make this active, you’ll need to log out and log back in.

Posted in ,  | Tags , , , ,

Comments are disabled