14 Replies Latest reply: Feb 1, 2012 4:25 AM by Ninarama RSS

    Flash CS5.5 - Out of memory

    XanaRaquel Community Member

      Hi,

       

      I have a project here that, all of the sudden, I can't export the SWF. The first couple of times it gave me and "out of memory" error in the Java subsystem or something and to change the value of memory in the jvm.ini. I did but nothing changed.

       

      When I do ctrl+enter to test the movie, I see the "exporting SWF movie" process dialog and after like 3 minutes Flash crashes. It doesn't give an error now. It just closes.

       

      I notice that when I open the project, Flash is using  408Mb of RAM. When I export, it jump to 1.5Gb, stays there for a bit and then crashes.

       

      A log is also generated. These are the first lines:

       

      #

      # A fatal error has been detected by the Java Runtime Environment:

      #

      # java.lang.OutOfMemoryError: requested 655360 bytes for GrET in C:\BUILD_AREA\jdk6_18\hotspot\src\share\vm\utilities\growableArray.cpp. Out of swap space?

      #

      #  Internal Error (allocation.inline.hpp:39), pid=2024, tid=432

      #  Error: GrET in C:\BUILD_AREA\jdk6_18\hotspot\src\share\vm\utilities\growableArray.cpp

      #

      # JRE version: 6.0_18-b07

      # Java VM: Java HotSpot(TM) Client VM (16.0-b13 mixed mode windows-x86 )

      # If you would like to submit a bug report, please visit:

      #   http://java.sun.com/webapps/bugreport/crash.jsp

      #

       

       

      What can I do to fix this issue?

      If anyone from Adobe want, I can send the full log file.

       

      Using Windows 7 Pro 64 Bits, 4 Gb of RAM.

        • 1. Re: Flash CS5.5 - Out of memory
          kglad MVP

          create a new directory that has no sub-directories, save your fla in that new directory using a new name for you fla.  then publish using the default swf path/name.

           

          if that failsl how large is your fla?

          • 2. Re: Flash CS5.5 - Out of memory
            XanaRaquel Community Member

            kglad, tried what you  suggested. The same happens.

            The FLA is currently 176Mb.

             

            I've found a temporary fix.  If I put  “-Xmx64m” in the jvm.ini Flash  is able to export although it won’t play in the SWF player after the export. I  have to do it manually. The huge problem is that Flash gets really unstable  after that and crashes at the simplest thing.

            So it isn’t a really good  temporary fix but at least I can export. But I sense that I’ll have big  problems later when exporting to a QuickTime movie so… any other tips/ideas to  fix this?

            • 3. Re: Flash CS5.5 - Out of memory
              kglad MVP

              you're in danger of loosing all your work if you don't take precautions.

               

              first thing, save your currently working fla in a backup directory so can go back to it if all else fails will trying to fix your problems.

               

              then, start removing all assets that are not needed in your fla and that can be loaded.  that would include all bitmaps, sounds and video.  that should result in a fla that's dramatically smaller and manageable.

               

              re-organize your project to load those assets instead of including them in your fla.

              • 4. Re: Flash CS5.5 - Out of memory
                XanaRaquel Community Member

                Believe me; I’ve already lost all my work, when it was about finished, but due to another issue. I’m currently creating that same project from scratch but I’m having this new issue now.

                The reason why the FLA is so big it’s because there’s a 90Mb wave file in it and I need to see it in the timeline for easy mouth synchronization.

                 

                I've already deleted all unused bitmaps, movie clips, etc.

                 

                I don’t really think the problem is there because, like I said at the beginning of this post, this is the second attempt at a project that has almost finished. It had more bitmaps, more movie clips, a bigger timeline and the same wave file back then and there was no memory errors and it exported just fine. (expect the last time when it crashed and somehow corrupted the fla file and I lost everything)

                 

                I’ll try later to compress the wave to mp3 and import that to the project to see if the changes anything but I doubt it. Plus it might create an offset in the timeline. Flash doesn’t like sound files in the timeline

                • 5. Re: Flash CS5.5 - Out of memory
                  kglad MVP

                  convert that wav file to an mp3.  that should save over 80mb.

                   

                  that still leaves 100mb that can't be all vectors.  you have some other objects in your fla consuming space.

                  • 6. Re: Flash CS5.5 - Out of memory
                    XanaRaquel Community Member

                    There are some png images too but all them together barely reaches 5 Mb.

                    I saved as uncompressed document and noticed something. All the things in the project’s library are in the LIBRARY folder that’s created. In the bin folder, that is also created, all the same files are there, but with a different extension. So it’s all the library files * 2. That’s why the size goes to 179Mb.

                     

                    I’ve put the mp3 instead of the wave file, the size went down to 112 Mb, but like I predicted, nothing changed. The same weird thing still happens: the RAM usage goes way up, hangs a bit and then crashes.

                    • 7. Re: Flash CS5.5 - Out of memory
                      kglad MVP

                      save as a compressed fla.

                      • 8. Re: Flash CS5.5 - Out of memory
                        XanaRaquel Community Member

                        Saving as a compressed fla doesn't make a diference.

                         

                        Ok, I’ve  fixed the problem the same way I've always fixed these “out of memory” problems  on other programs:

                        Opened the  Flash.exe in an editor, checked the option in the header “App can handle >  2Gb address spaces” and voila! Everything works fine now.

                         

                        I’m pretty  sure this isn’t a good solution but it’s way better than the temporary fix I’ve  found. Flash still goes up to 1.5Gb RAM usage when exporting but continues with the exporting and plays the swf afterwards.

                         

                        I'm still open to suggestons on how to fix this properly.

                        • 9. Re: Flash CS5.5 - Out of memory
                          kglad MVP

                          what editor did you use?

                          • 10. Re: Flash CS5.5 - Out of memory
                            XanaRaquel Community Member

                            CFF Explorer. I open Flash.exe, go to file header and change the characteristics.

                            • 11. Re: Flash CS5.5 - Out of memory
                              kglad MVP

                              what's wrong with that?  looks like a good solution with no downside (assuming you made a backup of flash.exe).

                              • 12. Re: Flash CS5.5 - Out of memory
                                XanaRaquel Community Member

                                Yes, I made a backup.

                                Well, there shouldn’t be anything wrong on doing this but if that’s the case why haven’t Adobe done that to Flash.exe themselves? The only reason I see is that this may cause problems in x86 systems because Flash may try to use more RAM than the system can handle (the 3.5Gb limit). Mine being x64 is probably ok.

                                I’m no expert so I can’t really tell.

                                • 13. Re: Flash CS5.5 - Out of memory
                                  Ninarama Community Member

                                  Wow, I've been struggeling with this "out of memory" bug so much the last year, it really jepoardized the whole development - so we moved as much away from the Flash IDE as we could (using FlashDevelop and only prepared the assets in the IDE).

                                  I will also try this, I've already downloaded the CFF explorer (very interesting stuff btw!) and changed the >2gb flag already.

                                  Usually, this bug would appear after some importing into flash and having other Adobe products open like Photoshop, Illustrator or Bridge, not with a fresh booted system (that's also why the guys from support couln't reproduce my problems). Yes I've been in contact with the support department over half a year about this issue!

                                   

                                  In the past, programs just told you "I'm out of memory" and just would not totally corrupt and destroy the document at the same time. Instead, they would leave you a chance to save your work or free some memory and continue. That's not the case with Flash anymore...

                                   

                                  Well, I'll be testing, wish me luck!

                                  • 14. Re: Flash CS5.5 - Out of memory
                                    Ninarama Community Member

                                    For those who goole this (no one may be even get back to this thread).

                                     

                                    Yes, the method worked. For some time. It just makes Flash CS5 work LONGER without the dreaded errors. But after some time, they will re-appear and mess-up your work and you will again lose all your work due tue "out of memory" or Flash wildly copying instances of symbols into oblivion and corrupting its own memory.

                                    The only way to get things "back on track" is to re-start the whole computer.

                                    Is ther any way to "reset" things without restarting the whole machine? It's a bit tedious to get the whole working environment back from the scratch.

                                    Yay, Flash CS5 still sucks. After the "hack" it just takes longer until your work just gets destroyed by the application you created it with.