Flex 4.6 IOS 编译器
我最近将 Flex SDK 版本更新到 4.6,希望我的 IOS 应用程序的性能能够得到改善。不幸的是,我无法在“标准”编译模式(超慢模式)下成功编译我的应用程序。从 Java 生成的错误日志中可以看出(adobe 的 ADL 编译器是用 Java 编写的),我的内存不足。
编译器使用大量内存 (1.5GB),但这并未接近我安装了 4GB 的 PC 的物理限制。我正在运行 64 位版本的 Windows 7(编辑:使用 32 位和 64 位 java 运行时可以重现问题)。
大家有什么想法吗?下面贴出错误日志:
#
# 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
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您的虚拟机参数是:
这可能就是堆空间不足的原因。
启动 Flex 时尝试调整内存设置。
Your VM arguments are:
which is probably why you're running out of heap space.
Try tweaking your memory settings when you start Flex.
尝试使用 Java x64 二进制文件进行编译。
Try to use Java x64 binaries for compiling.
有这样一种工具,例如 http://visualvm.java.net/
类似于 Apple 的分析器实用程序,您可以可以使用它连接到您的 Eclipse 会话并记录内存使用情况以证明以前的帖子,或者您可以确定编译到 ARM 二进制文件期间的失败点。
另一种方法是尝试使用特定选项的 ANT 编译器。
或者至少制作一个失败证明项目并将其公开,以便人们也可以对其进行测试。
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.
即使您有很大的物理内存,也不意味着它就足够了。 Flex 使用大量内存进行编译,其大小可能(或可能不)取决于您所做的项目的大小。 Windows 有很好的技术来交换内存以使用硬盘空间来扩展 RAM。请确保您有足够的可用磁盘空间并设置交换来使用该磁盘。请使用以下指令检查 Windows 中的交换/分页设置:http://helpx.adobe.com/x-productkb/global/set-virtual-memory-paging-default.html
PS我有同样的问题,为了解决它,我只是释放了几GB的空间系统驱动器,之后在 Flex for iOS 中编译就可以了。
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.