Recently I had a strange output error message in Flash CS4.
"5005: Unknown Error optimizing byte code"
This is a really “interesting” error message that Flash throws in the Output panel and unfortunately there is no other explanation accompanying the message.
Reason :
"Extremely large Flash applications may compile incorrectly (Flash CS3, Flash CS4 Professional)"
This is a known issue with the JVM compiler inside of Flash authoring. Adobe is considering possible solutions.
Solution :
There are some solutions suggested for this problem over the internet. However I am listing only the one's which works and omitting the rest.
1. Turn off the Optimizer and then recompile.
You can turn the Optimizer off from the Publish Settings dialog box, select Settings for the “ActionScript 3.0″ option and in that dialog box disable the “Reduce file size and increase performance” option. You can do this whenever you are working on a very large project and get this error message. In the rest of the cases, you should leave this option checked.
Unfortunately it is only in CS3 but not in CS4.
2. Increase java VM heap memory size
To do that in Windows: right click on my computer -> properties -> advanced -> environment variables -> make a new variable:
JAVA_TOOL_OPTIONS
and add this value:
-Xmx1024M
Then restart Flash or logout/restart the system.
There was an issue when I opened Flash CS4 after the restart. I got the message:
“Error initializing Java Runtime Environment. You may need to reinstall Flash.”
I had to change the value from -Xmx1024M to -Xmx256M (or -Xmx128M). A value of -Xmx512M and higher causes every time the error “Error initializing JRE. You may need to reinstall Flash”.
After I set up the variable "JAVA_TOOL_OPTIONS" with value "-Xmx256M" everything started working fine.
|
My Blog Title
|