5 Replies Latest reply on Mar 17, 2014 7:43 AM by sinious

    JVM error when compiling for ios

    jkouts

      I ve created a large project concerning the implementation of a book.

      The application consist of a main container (book) which loads external swf (pages).

      Each page may contain certain activities e.g.multiple choice and drag and drop exercises.

       

      The problem is that everything was going fine with the external swf loading until the number of swf came to a point where this error comes up.

      When I RANDOMLY remove some swf then the project compiles just fine even with the AppStore deployment type.

       

      I tried editing the jvm.ini with higher values for java heap memory (e.g. -Xmx4096m) but nothing happened.

      I even used several jvm commands to disable garbage collection (e.g. -XX:+DisableExplicitGC) but still the error appears.

       

      The main swf is 500kb and the current number of external swf is 130 and their total size is 50mb so it's almost 400kb each.

      I've tested in different machines one with 4gb ram and an i3 cpu and another with 6gb ram and an i7 cpu.

      I've reinstalled flash and used the latest updates along with the air 4 sdk.

       

      Could anyone help me with this?

      Is there a different way to publish the ipa file?

       

      Thank you.

      Untitled-1.jpg

        • 1. Re: JVM error when compiling for ios
          sinious Most Valuable Participant

          Even if you package with adt itself, that's all Flash is actually automating for you. That said, I've had some strange unexplained compile time issues that adt has resolved. Here's Adobe info on compiling from adt directly:

           

          http://help.adobe.com/en_US/air/build/WS901d38e593cd1bac1e63e3d128cdca935b-8000.html

           

          Make sure you're using the latest version of the AIR SDK, you can grab it here:

          http://www.adobe.com/devnet/air/air-sdk-download.html

           

          You will find the adt command in the SDK folder "bin". I'd recommend adding it to your systems environment path for ease. See if that builds your app.

           

          Note you may need some extra files Flash may be creating for you if you're stripping ABC from the SWFs or externally host any:

          https://blogs.adobe.com/airodynamics/2013/03/08/external-hosting-of-secondary-swfs-for-air -apps-on-ios/

          1 person found this helpful
          • 2. Re: JVM error when compiling for ios
            jkouts Level 1

            Sinious thanks for your answer.

             

            I tried compiling from adt and it worked using this command line script.

             

            @set java_cmd="C:\Program Files\Common Files\Adobe\Adobe Flash CC\jre\bin\java.exe"

            @set java_param=-Xmx8192m -jar

            @

            @set adt_cmd="C:\Program Files\Adobe\Adobe Flash CC\AIR4.0\lib\adt.jar"

            @set target=ipa-test

            @

            @set cert=samples.p12

            @set cert_pass=12345

            @set provisioning=samples.mobileprovision

            @

            @set build_file=Testing.ipa

            @set desc_files=Testing-app.xml

            @set files=Testing.swf assets externalSWF

            @

            %java_cmd% %java_param% %adt_cmd% -package -target %target% -storetype pkcs12 -keystore %cert% -storepass %cert_pass%  -provisioning-profile %provisioning% %build_file% %desc_files% %files%

            @

            pause

             

            Still there is now a different problem.

            When trying to compile more than a certain number of external swfs (eg. 350) then the process never ends. The java.exe  process consumes all of my memory and it is just stuck there for hours( I've waited for it to compile for nearly 10 hours before I killed the java.exe process). When I randomly remove some swfs then everything goes fine and the process finishes after nearly half an hour or so.

             

            The pc i'm using has an i7 processor with 16gb of ram and the java process consumes it all even though i've set a limit using the -Xmx8192m command.

            Is there a problem with the xmx command?

            Do i need even more ram to compile a larger number of swfs.

            Is there a way to monitor the java process in order to catch any errors that occur or maybe use any different java params to control ram usage limits?

             

            Thank you for your help.

            • 3. Re: JVM error when compiling for ios
              sinious Most Valuable Participant

              That is an absurdly large number of SWFs. I'd question how you're approaching your project.

              • 4. Re: JVM error when compiling for ios
                jkouts Level 1

                The project consists of a main container which loads external swfs to serve as a book's pages. Those external swf may contain interactive exercises, video and audio activities. It is a multiplatform project for both ios and android but also for desktop. In addition each external swf must be able to be used indepenently in order to be distributed through an LMS platform.

                 

                Still I've found a solution to my problem. It seemed that the -Xmx parameter was causing the problem cause when I lowered the value the project was published after an hour or so.

                Maybe I was allowing too much memory to be used for the max java heap size.

                 

                Thanks anyway.

                • 5. Re: JVM error when compiling for ios
                  sinious Most Valuable Participant

                  Strange unless you're compiling more than one thing at once, I've only seen it cause an issue being too low, as it seems you know.

                   

                  Either way glad you got it fixed up and good luck!