Copy link to clipboard
Copied
After running into problems implementing the new compiler on our game, I eventually cornered the problem to the Nape Physics library we're using for one of our games, http://napephys.com/. Nape is build with haxe (https://github.com/deltaluca/nape) and then we include their release swc in our game.
If you just reference their Vec2 class in a completely vanilla project,
package
{
import flash.display.Sprite;
import nape.geom.Vec2;
public class Napey extends Sprite
{
public function Napey()
{
Vec2
}
}
}
The compiler breaks with the error message (if you do a release build with FlashBuilder) of
Error occurred while packaging the application:
0 compile-abc 0x00960428 PrintStackTrace(void*) + 40
1 compile-abc 0x009608a1 SignalHandler(int) + 449
2 libsystem_platform.dylib 0x981aadeb _sigtramp + 43
3 libsystem_platform.dylib 0xffffffff _sigtramp + 1743082047
4 compile-abc 0x00054143 halfmoon::AbcBuilder::initStmt(unsigned int) + 147
5 compile-abc 0x00058197 halfmoon::AbcBuilder::visitInstr(unsigned char const*, avmplus::ActionBlockConstants::AbcOpcode, unsigned int, unsigned int, int) + 10055
6 compile-abc 0x00050b25 halfmoon::AbcBuilder::visitBlock(halfmoon::AbcBlock*) + 757
7 compile-abc 0x0005015f halfmoon::AbcBuilder::visitBlocks(nanojit::Seq<halfmoon::AbcBlock*>*) + 63
8 compile-abc 0x000c3626 halfmoon::parseAbc(avmplus::MethodInfo*, halfmoon::Lattice*, halfmoon::InfoManager*, nanojit::Allocator&, halfmoon::AbcGraph*, avmplus::Toplevel*, avmplus::AbcEnv*, halfmoon::ProfiledInformation*, halfmoon::Context&) + 182
9 compile-abc 0x000c4338 halfmoon::JitWriter::writeEpilogue(avmplus::FrameState const*) + 216
10 compile-abc 0x0012c96b avmplus::NullWriter::writeEpilogue(avmplus::FrameState const*) + 27
11 compile-abc 0x00186459 avmplus::Verifier::verify(avmplus::CodeWriter*) + 1273
12 compile-abc 0x0000500f compile_abc::CompilerCore::emitPoolToModule(compile_abc::PoolInfo&, compile_abc::LLVMModule*) + 927
13 compile-abc 0x00004450 compile_abc::CompilerCore::compile() + 5184
14 compile-abc 0x00002d5f compile_abc::CompilerCore::run(int, char**) + 1471
15 compile-abc 0x00005cb2 main + 66
16 compile-abc 0x00001935 start + 53
Stack dump:
0. Program arguments: /Developer/sdks/air13_sdk_mac/lib/aot/bin/compile-abc/compile-abc -mtriple=armv7-apple-ios -filetype=obj -sdk /Developer/sdks/air13_sdk_mac/lib/aot/lib/avmglue.abc -fields /Developer/sdks/air13_sdk_mac/lib/aot/lib/air-fields.arm-air.txt -O3 -abc-file-list=/Developer/workspaces/flashbuilder/Napey/bin-release-temp/AOT/AOTBuildOutput1711762008250639824.tmp/ABCFilesList.txt
/var/folders/p4/yvrhr8x138dbcz1wf62vm63w0000gn/T/cmd2520693073807039707.tmp: line 2: 85874 Bus error: 10 "/Developer/sdks/air13_sdk_mac/lib/aot/bin/compile-abc/compile-abc" "-mtriple=armv7-apple-ios" "-filetype=obj" "-sdk" "/Developer/sdks/air13_sdk_mac/lib/aot/lib/avmglue.abc" "-fields" "/Developer/sdks/air13_sdk_mac/lib/aot/lib/air-fields.arm-air.txt" "-O3" "-abc-file-list=/Developer/workspaces/flashbuilder/Napey/bin-release-temp/AOT/AOTBuildOutput1711762008250639824.tmp/ABCFilesList.txt"
Compilation failed while executing : compile-abc
Which, as far as I can tell, doesn't give any great hints as to where the actual problem is.
The project, and those temp files from the abc compilation are at https://www.dropbox.com/s/bd9eabtkfxl5l6p/Napey.zip. Nape is kind of pivotal for our game, and to replace it with something else would require a huge amount of work and effort, so getting this fixed would be a big deal for us.
Has the new compiler been tested with building with haxe libraries and such?
Copy link to clipboard
Copied
Hi,
Thanks for reporting the issue. We have fixed this issue and it should be available in next pre-release build.
Thanks
Govinda Gupta
Copy link to clipboard
Copied
Huge thanks, Govinda quick responses, and quick fix like that is crazy appreciated.
Is there any chance that the error reporting, or logging, when the compiler breaks could be improved also? We have a big enough project, and trying to find what was going wrong where, was a long arduous task. We had disabled all the ANEs, because we'd heard that might be a compiler breaker, then disabled all the compiler defines, but completely forgot about third-party swcs, and only caught Nape after trying nearly everything else.
Copy link to clipboard
Copied
I'm not sure exactly what the name of the fix would have been, so I'm just wondering, did this get into the 13 release that was just announced, http://forums.adobe.com/message/6282299#6282299, or no?
Copy link to clipboard
Copied
Unfortunately no. However, we plan to make another release in a couple of weeks time and that will contain the fix for Nape.
Copy link to clipboard
Copied
This seems all good and fixed with the early 14.0 release. Thanks so much for looking into and fixing this issue.