Flex 4.6 IOS Compiler

2

I've recently updated my Flex SDK version to 4.6 in the hopes that my IOS application's performance will improve. Unfortunately I cannot successfully compile my application in the "standard" compile mode (The super slow one). From what I can see from the error log produced by Java (The ADL compiler from adobe is written in Java) I'm running out of memory.

The compiler is using a lot of memory (1.5GB) but that is not near the physical limit of my PC which has 4GB installed. I'm running a 64bit version of Windows 7 (Edit: Problem is reproducable using the 32 and 64bit java runtimes).

Any idea folks? Posted below is the error log:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (0xe06d7363), pid=1376, tid=2248
#
# JRE version: 6.0_16-b01
# Java VM: Java HotSpot(TM) Client VM (14.2-b01 mixed mode windows-x86 )
# Problematic frame:
# C  [KERNELBASE.dll+0xb9bc]
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

---------------  T H R E A D  ---------------

Current thread (0x001ca000):  JavaThread "main" [_thread_in_native, id=2248, stack(0x021b0000,0x02330000)]

siginfo: ExceptionCode=0xe06d7363, ExceptionInformation=0x19930520 0x0232f750 0x498174a4 

Registers:
EAX=0x0232f6b8, EBX=0x00400000, ECX=0x00000003, EDX=0x00000000
ESP=0x0232f6b8, EBP=0x0232f708, ESI=0x498e666c, EDI=0x789e0020
EIP=0x7562b9bc, EFLAGS=0x00000216

Top of Stack: (sp=0x0232f6b8)
0x0232f6b8:   e06d7363 00000001 00000000 7562b9bc
0x0232f6c8:   00000003 19930520 0232f750 498174a4
0x0232f6d8:   49babe44 49babe44 789e0020 00400000
0x0232f6e8:   498e666c 0232f6f8 496ecad0 498e6aa0
0x0232f6f8:   0232f738 496e5542 00000008 496e3a0e
0x0232f708:   0232f740 496e3439 e06d7363 00000001
0x0232f718:   00000003 0232f734 e06d7363 00000001
0x0232f728:   00000000 00000000 00000003 19930520 

Instructions: (pc=0x7562b9bc)
0x7562b9ac:   0c eb 03 89 45 c0 8d 45 b0 50 ff 15 5c 11 62 75
0x7562b9bc:   c9 c2 10 00 cc cc cc cc cc 8b ff 55 8b ec 56 8b 


Stack: [0x021b0000,0x02330000],  sp=0x0232f6b8,  free space=1533k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [KERNELBASE.dll+0xb9bc]
C  [llvm.dll+0x443439]
C  [llvm.dll+0x4429d5]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  llvm.llvmJNI.WriteModuleToFile(Ljava/lang/String;JLllvm/Module;J)V+0
j  llvm.LLVM.WriteModuleToFile(Ljava/lang/String;Lllvm/Module;J)V+7
j  com.adobe.air.ipa.AOTCompiler.writeBitcode(Ljava/lang/String;Lllvm/Module;)Ljava/io/File;+52
j  com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcodeImpl()V+721
j  com.adobe.air.ipa.BitcodeGenerator.main([Ljava/lang/String;)V+114
v  ~StubRoutines::call_stub

---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0x006fc400 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3292, stack(0x48e90000,0x49010000)]
  0x0070e800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3408, stack(0x48e00000,0x48e50000)]
  0x006fbc00 JavaThread "Attach Listener" daemon [_thread_blocked, id=2632, stack(0x48c40000,0x48dc0000)]
  0x006fb800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=1248, stack(0x48a80000,0x48c00000)]
  0x006cbc00 JavaThread "Finalizer" daemon [_thread_blocked, id=4940, stack(0x488c0000,0x48a40000)]
  0x006c7400 JavaThread "Reference Handler" daemon [_thread_blocked, id=1628, stack(0x48740000,0x488c0000)]
=>0x001ca000 JavaThread "main" [_thread_in_native, id=2248, stack(0x021b0000,0x02330000)]

Other Threads:
  0x006c3800 VMThread [stack: 0x003a0000,0x003f0000] [id=3968]
  0x00717400 WatcherThread [stack: 0x49050000,0x490a0000] [id=2552]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
 def new generation   total 72576K, used 34430K [0x04330000, 0x091f0000, 0x091f0000)
  eden space 64512K,  52% used [0x04330000, 0x0640fd70, 0x08230000)
  from space 8064K,   9% used [0x08230000, 0x082efd50, 0x08a10000)
  to   space 8064K,   0% used [0x08a10000, 0x08a10000, 0x091f0000)
 tenured generation   total 967936K, used 820706K [0x091f0000, 0x44330000, 0x44330000)
   the space 967936K,  84% used [0x091f0000, 0x3b368958, 0x3b368a00, 0x44330000)
 compacting perm gen  total 12288K, used 5389K [0x44330000, 0x44f30000, 0x48330000)
   the space 12288K,  43% used [0x44330000, 0x448736f0, 0x44873800, 0x44f30000)
No shared spaces configured.

Dynamic libraries:
0x00400000 - 0x00424000     C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\jre\bin\java.exe
0x77850000 - 0x779d0000     C:\Windows\SysWOW64\ntdll.dll
0x76e30000 - 0x76f40000     C:\Windows\syswow64\kernel32.dll
0x75620000 - 0x75666000     C:\Windows\syswow64\KERNELBASE.dll
0x76cf0000 - 0x76d90000     C:\Windows\syswow64\ADVAPI32.dll
0x74f90000 - 0x7503c000     C:\Windows\syswow64\msvcrt.dll
0x75460000 - 0x75479000     C:\Windows\SysWOW64\sechost.dll
0x75960000 - 0x75a50000     C:\Windows\syswow64\RPCRT4.dll
0x74f30000 - 0x74f90000     C:\Windows\syswow64\SspiCli.dll
0x74f20000 - 0x74f2c000     C:\Windows\syswow64\CRYPTBASE.dll
0x7c340000 - 0x7c396000     C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\jre\bin\msvcr71.dll
0x6d800000 - 0x6da8b000     C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\jre\bin\client\jvm.dll
0x750d0000 - 0x751d0000     C:\Windows\syswow64\USER32.dll
0x75680000 - 0x75710000     C:\Windows\syswow64\GDI32.dll
0x75c80000 - 0x75c8a000     C:\Windows\syswow64\LPK.dll
0x76d90000 - 0x76e2d000     C:\Windows\syswow64\USP10.dll
0x744d0000 - 0x74502000     C:\Windows\system32\WINMM.dll
0x755c0000 - 0x75620000     C:\Windows\system32\IMM32.DLL
0x75ca0000 - 0x75d6c000     C:\Windows\syswow64\MSCTF.dll
0x72180000 - 0x721cc000     C:\Windows\system32\apphelp.dll
0x6d7b0000 - 0x6d7bc000     C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\jre\bin\verify.dll
0x6d330000 - 0x6d34f000     C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\jre\bin\java.dll
0x6d290000 - 0x6d298000     C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\jre\bin\hpi.dll
0x75670000 - 0x75675000     C:\Windows\syswow64\PSAPI.DLL
0x6d7f0000 - 0x6d7ff000     C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\jre\bin\zip.dll
0x492a0000 - 0x49922000     C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\sdks\4.6.0\lib\aot\lib\llvm.dll
0x67b10000 - 0x67bfb000     C:\Windows\system32\dbghelp.dll

VM Arguments:
jvm_args: -Xss1500K -Xms256m -Xmx1024m 
java_command: com.adobe.air.ipa.BitcodeGenerator C:\Users\RICHAR~1.WAL\AppData\Local\Temp\AOT1326714613716\AOTBuildOutput8039785360254652711.tmp\BitcodeGenerator_opts.ser C:\Users\RICHAR~1.WAL\AppData\Local\Temp\AOT1326714613716\AOTBuildOutput8039785360254652711.tmp\ABCFiles
Launcher Type: SUN_STANDARD

Environment Variables:
PATH=C:/Program Files (x86)/Adobe/Adobe Flash Builder 4.6/jre/bin/client;C:/Program Files (x86)/Adobe/Adobe Flash Builder 4.6/jre/bin;C:/Program Files (x86)/Adobe/Adobe Flash Builder 4.6/jre/lib/i386;C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Git\cmd;C:\Program Files\TortoiseGit\bin
USERNAME=xxxx
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 42 Stepping 7, GenuineIntel



---------------  S Y S T E M  ---------------

OS: Windows 7 Build 7601 Service Pack 1

CPU:total 4 (8 cores per cpu, 2 threads per core) family 6 model 42 stepping 7, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, ht

Memory: 4k page, physical 4177336k(605728k free), swap 4194303k(4050044k free)

vm_info: Java HotSpot(TM) Client VM (14.2-b01) for windows-x86 JRE (1.6.0_16-b01), built on Jul 31 2009 11:26:58 by "java_re" with MS VC++ 7.1

time: Mon Jan 16 11:52:17 2012
elapsed time: 119 seconds
java
apache-flex
memory
flex4.6
asked on Stack Overflow Jan 16, 2012 by Richard Walton • edited Jan 24, 2012 by cwallenpoole

4 Answers

2

Your VM arguments are:

jvm_args: -Xss1500K -Xms256m -Xmx1024m

which is probably why you're running out of heap space.

Try tweaking your memory settings when you start Flex.

answered on Stack Overflow Jan 16, 2012 by Nachi • edited May 23, 2017 by Community
0

I'm running a 64bit version of Windows 7.

Try to use Java x64 binaries for compiling.

answered on Stack Overflow Jan 23, 2012 by focus
0

There is such kind of tool like http://visualvm.java.net/

Similar to Apple's profiler utilities, you can use it to connect to your Eclipse session and record the memory usage to prove previous posts or you could determine the point of fail during compilation into the ARM binaries.

Alternative way could be to try ANT compiler with specific options.

Or at least make a proof-of-fail project and make it public, so people could test it too.

answered on Stack Overflow Mar 16, 2012 by Eugene
0

Even if you have big physical RAM it not means that it is enough. The Flex using a lot of memory to compile and size may (or may not) depends on the size of project you made. Windows have good technics for swapping memory to use hard disk space to extend RAM. Please ensure that you have enough free disk space and setup swapping to use that disk. Please check swap/paging settings in windows using this instruction: http://helpx.adobe.com/x-productkb/global/set-virtual-memory-paging-default.html

P.S. I had same issue and to solve it I just free up several gigabytes of space in system drive, after which compilation in Flex for iOS was fine.

answered on Stack Overflow Nov 9, 2013 by Oobe

User contributions licensed under CC BY-SA 3.0