为什么FDT在打包适用于iOS的Adobe AIR应用程序(.IPA)时显示Java堆错误 [英] Why Does FDT Show A Java Heap Error While Packaging an Adobe AIR app for iOS (.IPA)

查看:137
本文介绍了为什么FDT在打包适用于iOS的Adobe AIR应用程序(.IPA)时显示Java堆错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Adobe AIR创建一些Flash游戏。我尝试将其编译为.ipa文件(以在iPad设备上运行)。

I'm creating some flash game using Adobe AIR. I try to compile it into .ipa file (to run on iPad device).

该项目规模不大,但规模也不小(它使用6个swc库和很多未预编译的代码)。我尝试使用两种方法将游戏与Flash FDT 5.5打包:

The project is not big, but not small also (it uses 6 swc libraries and lot's of not precompiled code). I try to package my game with Flash FDT 5.5 using both methods:


  • fast -可以,但是性能很糟糕;

  • 标准-我的编译完成并出现以下错误:

  • fast - works ok, but the performance is terrible;
  • standard - my compilation finishes with following error:

包装失败!打包错误消息:拾取了
JAVA_TOOL_OPTIONS:-Xmx3072M线程主中的异常
java.lang.OutOfMemoryError:Java堆空间位于
java.util.TreeMap.put(未知源)位于
adobe.abc.Algorithms $ SetMap.get(Algorithms.java:225)在
adobe.abc.Algorithms.addUses(Algorithms.java:164)在
adobe.abc.Algorithms。 findUses(Algorithms.java:186)at
adobe.abc.GlobalOptimizer.cp(GlobalOptimizer.java:9381)at
adobe.abc.GlobalOptimizer.dce(GlobalOptimizer.java:9627)at

处的adobe.abc.GlobalOptimizer.sccp(GlobalOptimizer.java:4638)
处的adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:3514)at
adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java) :2215)at
adobe.abc.LLVMEmitter.optimizeABCs(LLVMEmitter.java:527)at
adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:337)at
com.adobe。 air.ipa.AOTCompiler.convertAbcToLlvmBitcodeImpl(AOTCompiler.java:510)
at co m.adobe.air.ipa.BitcodeGenerator.main(BitcodeGenerator.java:80)
拾取JAVA_TOOL_OPTIONS:-Xmx3072M编译失败,而
执行:ADT拾取了JAVA_TOOL_OPTIONS:-Xmx3072M拾取了
JAVA_TOOL_OPTIONS:-Xmx3072M

Packaging failed! Packaging error message: Picked up JAVA_TOOL_OPTIONS: -Xmx3072M Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.util.TreeMap.put(Unknown Source) at adobe.abc.Algorithms$SetMap.get(Algorithms.java:225) at adobe.abc.Algorithms.addUses(Algorithms.java:164) at adobe.abc.Algorithms.findUses(Algorithms.java:186) at adobe.abc.GlobalOptimizer.cp(GlobalOptimizer.java:9381) at adobe.abc.GlobalOptimizer.dce(GlobalOptimizer.java:9627) at adobe.abc.GlobalOptimizer.sccp(GlobalOptimizer.java:4638) at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:3514) at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:2215) at adobe.abc.LLVMEmitter.optimizeABCs(LLVMEmitter.java:527) at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:337) at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcodeImpl(AOTCompiler.java:510) at com.adobe.air.ipa.BitcodeGenerator.main(BitcodeGenerator.java:80) Picked up JAVA_TOOL_OPTIONS: -Xmx3072M Compilation failed while executing : ADT Picked up JAVA_TOOL_OPTIONS: -Xmx3072M Picked up JAVA_TOOL_OPTIONS: -Xmx3072M

我知道这是Eclipse开发中的常见问题。我试图以标准方式解决->增加Java堆大小。如您所见,我设置了3072M,应该足够了。

I know that this is common issue with Eclipse devlopment. I tried to solve that in standard way -> increase java heap size. As you can see I've set 3072M which should be sufficient.

当我尝试编译较小的项目时,它可以正常工作。我不知道现在该怎么做:(。有什么想法吗?

When I try to compile smaller projects it works fine. I've got no idea what to do now :(. Any ideas?

推荐答案

经过深入调查后,我找到了解决方案

After deep investigation I've found a solution. It was NOT due to any enviromnent configuration, but, as @Alan said, Adobe's packager was running into problems. As I suppose, it was meeting problems while 'optimalization' phase.

这是一个非常有用的论坛主题: http://forums.adobe.com/message / 4445973#4445973

Here's a forum topic that was really usefull: http://forums.adobe.com/message/4445973#4445973

我的项目使用的是NAPE物理引擎,我在那找到: http://deltaluca.me.uk/forum/index.php/m/2148/0ce4c49cc2c79979154c56737d2978a4/ 人们遇到了问题在我的情况下,编译时间是无穷大;),以Java的内存不足异常结束。解决方案是使用最新的NAPE构建,作者对此进行了一些优化。

My project was using NAPE physic engine. As I found there: http://deltaluca.me.uk/forum/index.php/m/2148/0ce4c49cc2c79979154c56737d2978a4/ people meet problems with compilation time. In my case the compilation time was infinity ;), what ended with java's out of memory exception. The solution was to use newest NAPE build, which was a little bit optimalized by the author. This 'small optimalization' made my project working.

总结:如果您有类似的问题,只需检查您的代码即可。尝试找到一些巨大的功能/方法,而Adobe的打包程序很难优化这些功能/方法。

To sum up: if you have similiar problem, just check your code. Try to find some huge functions/methods, which Adobe's packager finds hard to optimalize.

这篇关于为什么FDT在打包适用于iOS的Adobe AIR应用程序(.IPA)时显示Java堆错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆