1 Reply Latest reply on Dec 17, 2010 9:07 AM by Eisley79

    Flash limitations, Invisible Compiler Errors, swc files...

    Eisley79

      This question is for expert users of Flash CS4/CS5 and actionscript.   Please do not comment or offer suggestions if you have no experience  with these errors or their causes.


      ===================================================

      Question:

      =======

      Publishing  an extremely complex file can sometimes result in a blank swf being  created, and no compiler errors being shown even though some may exist.   Are there any suggested methods for dealing with this?

       

      =======

      Details:

      =======

      Those who have written flash files with large actionscript components  will be familiar with needing to set the JAVA_TOOL_OPTIONS evinronment  variable in order to prevent the Flash compiler from crashing due to  memory limits.  The majority of the files in question require this as a  bare minimum in order to be compiled at all.

       

      The project in question involves several main "launcher" components,  in addition to hundreds of "modules".  The modules themselves are being  developed in a distributed manner by several programmers.  Each module  can be executed as a standalone swf, for testing and production  purposes.  Each module has a companion swc file which holds its assets  and exports them.  All of the modules make use of a shared custom code  library that sits on top of actionscript.

       

      The launcher program also uses the shared library code, and runs the  modules  (never more than one at a time, and clearing previously loaded ones  before loading a new one) inside of itself.  The launcher contains a  reference file(the class names typed in an include file, referencing all  of the available exported assets from the swcs) that makes all the  necessary assets available to the modules, such that any module can be  run at any time.

       

      ===========

      The Error:

      ===========

      Seemingly random in occurence, every now and then a file will  "compile blank".  Essentially, the compile time is very short, the swf  pops up as a blank white box, and there is absolutely nothing listed in  the "Compiler Errors" tab, nor in the output tab.  Sometimes closing  flash and relaunching it will bring the Compiler Error messages back,  though usually not.  More often opening the file on another computer in a  different copy of flash and compiling it again will show the errors.   The original computer will still not show anything, but the other  computer can be used to fix the error, and then the file will start  reporting errors again properly.

      However, sometimes, the file will "compile blank" on all computers,  and all copies of flash.  Then the only resort to find the hidden errors  and fix them, is to comment out the entire file, and slowly uncomment  out sections one at a time.  In this manner, the area where the hidden  errors are occuring can be determined, and the error found manually.

      Obviously this is an extremely frustrating situation, but one that can be "worked around".

       

      However, there are two more serious incarnations of this which cannot be as easily side stepped.

      1.) Sometimes certain computers/copies of flash will "compile blank" a  file that doesnt actually have errors in it.  The same file will  compile and work perfectly on one machine, and not on another.

      2.) The most severe of all...The two more complex components compile fine in cs4, but always "compile blank"  on cs5, no matter what.  The module files all compile much faster on  cs5 and work great.  However, the shared code library and the launcher  program cannot be compiled in cs5, though they compile fine in cs4.   Both compile blank every single time on cs5, with no errors reported.

       

       

       

      --Just as a side note here are the compile times on two different  types of computers, for cs4 and cs5, for the three types of compiled  files:

      =====================

      CS4 Compile time averages:

      =====================

       

      Dual Core - Pentium 4:

              Module File = 1-4 minutes

              Shared Code Library = 10+ minutes

              Launcher Program = Unusable

       

      6 Core AMD w 16 GBs of RAM:

               Module File = less than 10 seconds

               Shared Code Library = approx. 1 minute

               Launcher Program = 15-25 minutes

       

      =====================

      CS5 Compile time averages:

      =====================

      Dual Core - Pentium 4:

              Module File = less than 20 seconds

              Shared Code Library = 2-4 minutes

              Launcher Program = Compiles blank

       

      6 Core AMD w 16 GBs of RAM:

               Module File = less than 10 seconds

               Shared Code Library = less than 30 seconds

               Launcher Program = Compiles blank

       

       

      ========================================

      Summary:

      ========================================

      1.) Large and complex files in cs4 or cs5 can sometimes false compile, showing a blank swf, and no errors.

      2.) Large interlinked projects containing many swcs that can compile on cs4 always compile blank on cs5

       

      The issues involved "appear" to deal with interlinked swcs and swfs, memory, and compiler messages.

       

       

       

      The best solution i can think of would be some sort of verbose mode  setting, where the cs4/cs5 compilers can be set to trace all the actions  they are taking, either to a log file, or to the screen.  Rather than  simply giving a summary of the results, a real-time display of what is  occuring might lead to the actual bugs/issues.

       

       

      Eisley79

        • 1. Re: Flash limitations, Invisible Compiler Errors, swc files...
          Eisley79 Level 1

          For the future people who come searching this forum and find my thread.

           

          http://kb2.adobe.com/cps/405/kb405257.html

           

           

          Above is a link to adobe's official version of admitting this situation exists(and its true for cs5 as well).

           

           

          If you are reading this, and simply have a single large file that won't compile.  Attempt their solutions suggested.  Also, click the link in the comments by the user refering to a blog that helped him.

           

          That will explain the JAVA_TOOL_OPTIONS memory issue (which you can find many explanations on google as well).

           

          If however, you are working with a large number of separate swf's that load each other, and share assets and are getting the REAL problem, neither adobe's solutions, nor the JAVA_TOOL_OPTIONS will correct the problem for you.  My best suggestion to you is, have one SWF launch the next one, and break your project into pieces.  Whatever the parent SWF needed to have, can be either copied into all the children SWFs, or into several "brother" SWFs which share the loaded children SWFs, (and can actually be successfully compiled).  Then as you move from brother to brother, they can be made to appear as if they were actually ONE file, loading the children, instead of several launching each other, and sharing the loading duties.

           

          and as far as adobe is concerned, if i told you what i thought of you, i would get this post deleted...and myself banned.

           

          Anyone considering doing Enterprise level projects in Flash, DONT.  I wanted to use JAVA, but my company went with flash.  I am stuck working around it constantly, and would have been better off coding foundation classes to mimic whatever functionality we needed from flash into java.

           

          Maybe when actionscript 4 comes along, it will magically bring with it true object oriented programming, and Adobe will spend the time and money to make a real working compiler.  Somehow i doubt it.