Problem with openfl next (openfl and lime git versions)

Weird. I just tried the latest haxelib version of Flixel, with your sample code, shows here :confused:

EDIT: Wait, I might be recreating it now…

Just to be sure we have the same configuration. I have:
flixel 3.3.11
lime 2.6.5
openfl 3.3.6

Did you used my sample with the logo.png picture I posted here? Because I just tested it with a small 20x20 pixels png image and it didn’t crash so the size of the image might have a consequence
And don’t forget to use the -Dnext flag because haxeflixel use openfl legacy by default…

Thanks! I found it.

I was getting a crash because buffer.data.length was equal to 0. I think that the old Flixel (under circumstances) was creating an excessively large BitmapData, I’m getting 94601 here. The buffer allocation fails, and then it tried to fillRect() when the buffer didn’t match the length. I put a band-aid on it for now, but I’m sure there’s more we could do to add a little extra safety

Great. So had the patch to be applied in flixel or in openfl? If on openfl, I will just retrieve the latested version from git. If in flixel, we have to post a ticket on the haxeflixel forum so they make the change for the next public release…

I put the patch in Lime, to try and block it closer to the crash. It can also be fixed by whatever bug in Flixel is wanting to create BitmapData that large :wink:

1 Like

OK. Well I think I would have to see this with the flixel team cause your patch fixed the bug for the sample issue but my bigger apps still crash (with the same behaviour, crash as soon as I pass the mouse over the app window). So I think there is, at least, one other bug…
I might try to translate my apps to the developpment version of haxeflixel (4.x) even if it is probably ~1day work. But if it fix the issue (as lariusprime seems to say it works for him with the dev version) might be worth it (rather than trying to understand whatever other part of flixel 3.x is having issue. anyway flixel 3.x would be replaced by 4.x soon or later :wink: …).

OK. I spent time converting one of my 3.x haxeflixel app to haxeflixel 4.x (haxeflixel dev version) but it still crash with openfl next… Sigh (fortunately I choosed the smaller of my app in witch I had to change arround ~100 lines of code and not one of my bigger ones which would probably have take me 1 full day to convert :wink: )
So I guess I would have to investigate further to see what part of haxeflixel is incompatible with new version of lime… (sadly not an easy task as I have no error before the crash in my console output).
@singmajesty How did you trace the previous error to buffer.data.length==0? if I could have some stack trace of the error producing the crash, would definitively ease the task to isolate the new error(s)…

Right now, I have (I think?) Visual Studio 2013 Community Edition installed. On Windows, I get a message about the application crashing, then after “checking for solutions” it gives me a “Debug” button. When I click it it opens Visual Studio, and I see a stack trace. It doesn’t know all that happened in Neko (for example) but it does show the last CFFI calls made, so I can know it happened in lime_image_data_fill_rect, for example (or some other native method). This REALLY helps cut down the possibilities when digging in :smile:

Do you have anything you could share (even privately)?

Thanks :wink:

Along with JPEG and OGG loading issue on Android, I’ve also found a issue with hx_register_prim on Android, which makes all android apps you built crash.
Fix was simple but pretty difficult to find that…

This line causes JPEG loading issue on Android. (Same thing is done for OGG loading)

FILE_HANDLE::isFile() returns false on Android for some reason, and if this function returns false, JPEG loader tries to load the same file again with Bytes constructor (why?)
And as constructor doesn’t have return value, there is no way to know whether this second loading with Bytes failed or not.

If you change “if (file->isFile())” to “if (true)” it just works fine on Android. This problem also causes most android apps to crash.

You can only see stack trace for DLLs/EXEs that have debug information. hxcpp does not generate debug information for Release build by default, so you cannot see stack trace with official build on haxelib, which only have Release build without debug information.
If you build lime from source, and test you app with -debug then you can see stack trace in Visual Studio.

If something is a real file pointer, libraries can read “until the end” and it will be fine. In the case of Android, it’s a file read/write interface that is not a real file pointer. If you read “until the end” you may read past the end of the file.

Do you have an example of a specific that failed to work here on Android?

PiratePig eaxmple failed to work on my Android phone.
It should be possible to read file from APK with “FILE_HANDLE::getFile()” as it can get file descriptor somehow.

And I don’t think calling “lime::fopen()” twice makes sense. Looks like a bug.


OK. I installed visual studio and now I am able to have some stack trace of the error in the debugger.
Here is what I have:

StayOnTrack.exe!haxe::io::Bytes_obj::alloc(int length) Line 384 C++
StayOnTrack.exe!lime::utils::ArrayBufferView_obj::__construct(Dynamic elements, int in_type) Line 140 C++
StayOnTrack.exe!lime::utils::ArrayBufferView_obj::__new(Dynamic elements, int in_type) Line 162 C++
StayOnTrack.exe!openfl::display::BitmapData_obj::__construct(int width, int height, hx::Null __o_transparent, hx::Null __o_fillColor) Line 314 C++
StayOnTrack.exe!openfl::display::BitmapData_obj::__new(int width, int height, hx::Null __o_transparent, hx::Null __o_fillColor) Line 623 C++
StayOnTrack.exe!openfl::_internal::renderer::cairo::CairoGraphics_obj::hitTest(hx::ObjectPtropenfl::display::Graphics_obj graphics, double x, double y) Line 888 C++
StayOnTrack.exe!openfl::display::Graphics_obj::__hitTest(double x, double y, bool shapeFlag, hx::ObjectPtropenfl::geom::Matrix_obj matrix) Line 3713 C++
StayOnTrack.exe!openfl::display::Sprite_obj::__hitTest(double x, double y, bool shapeFlag, Array stack, bool interactiveOnly) Line 389 C++
StayOnTrack.exe!openfl::display::DisplayObjectContainer_obj::__hitTest(double x, double y, bool shapeFlag, Array stack, bool interactiveOnly) Line 1452 C++
StayOnTrack.exe!openfl::display::Sprite_obj::__hitTest(double x, double y, bool shapeFlag, Array stack, bool interactiveOnly) Line 313 C++
StayOnTrack.exe!openfl::display::DisplayObjectContainer_obj::__hitTest(double x, double y, bool shapeFlag, Array stack, bool interactiveOnly) Line 1452 C++
StayOnTrack.exe!openfl::display::Sprite_obj::__hitTest(double x, double y, bool shapeFlag, Array stack, bool interactiveOnly) Line 313 C++
StayOnTrack.exe!openfl::display::DisplayObjectContainer_obj::__hitTest(double x, double y, bool shapeFlag, Array stack, bool interactiveOnly) Line 1452 C++
StayOnTrack.exe!openfl::display::Sprite_obj::__hitTest(double x, double y, bool shapeFlag, Array stack, bool interactiveOnly) Line 313 C++
StayOnTrack.exe!openfl::display::DisplayObjectContainer_obj::__hitTest(double x, double y, bool shapeFlag, Array stack, bool interactiveOnly) Line 1452 C++
StayOnTrack.exe!openfl::display::Sprite_obj::__hitTest(double x, double y, bool shapeFlag, Array stack, bool interactiveOnly) Line 313 C++
StayOnTrack.exe!openfl::display::DisplayObjectContainer_obj::__hitTest(double x, double y, bool shapeFlag, Array stack, bool interactiveOnly) Line 1452 C++
StayOnTrack.exe!openfl::display::Stage_obj::_onMouse(String type, double x, double y, int button) Line 3018 C++
StayOnTrack.exe!openfl::display::Stage_obj::onMouseMove(hx::ObjectPtrlime::ui::Window_obj window, double x, double y) Line 668 C++
StayOnTrack.exe!lime::app::IModule_delegate
openfl::display::Stage_obj::onMouseMove(hx::ObjectPtrlime::ui::Window_obj window, double x, double y) Line 185 C++
StayOnTrack.exe!lime::app::Application_obj::onMouseMove(hx::ObjectPtrlime::ui::Window_obj window, double x, double y) Line 1851 C++
StayOnTrack.exe!lime::app::__Module_objonMouseMove(hx::Object * inObj, const Dynamic & inArg0, const Dynamic & inArg1, const Dynamic & inArg2) Line 193 C++
StayOnTrack.exe!hx::CMemberFunction3::__run(const Dynamic & inArg0, const Dynamic & inArg1, const Dynamic & inArg2) Line 314 C++
StayOnTrack.exe!Dynamic::operator()(const Dynamic & inArg0, const Dynamic & inArg1, const Dynamic & inArg2) Line 187 C++
StayOnTrack.exe!lime::app::Application_obj::createWindow'::30’::_Function_2_1::run(double x, double y) Line 944 C++
StayOnTrack.exe!lime::app::Application_obj::createWindow'::30’::_Function_2_1::__run(const Dynamic & inArg0, const Dynamic & inArg1) Line 948 C++
StayOnTrack.exe!Dynamic::operator()(const Dynamic & inArg0, const Dynamic & inArg1) Line 187 C++
StayOnTrack.exe!lime::app::Event_Float_Float_Void_obj::dispatch(double a, double a1) Line 255 C++
StayOnTrack.exe!lime::_backend::native::NativeApplication_obj::handleMouseEvent() Line 628 C++
StayOnTrack.exe!lime::_backend::native::__NativeApplication_objhandleMouseEvent(hx::Object * inObj) Line 662 C++
StayOnTrack.exe!hx::CMemberFunction0::__run() Line 50 C++
StayOnTrack.exe!val_call0(hx::Object * arg1) Line 584 C++
lime.ndll!lime::MouseEvent::Dispatch(lime::MouseEvent * event) Line 66 C++
lime.ndll!lime::SDLApplication::ProcessMouseEvent(SDL_Event * event) Line 418 C++
lime.ndll!lime::SDLApplication::HandleEvent(SDL_Event * event) Line 200 C++
lime.ndll!lime::SDLApplication::Update() Line 637 C++
lime.ndll!lime::SDLApplication::Exec() Line 107 C++
lime.ndll!lime::lime_application_exec(_value * application) Line 116 C++
StayOnTrack.exe!lime::_backend::native::NativeApplication_obj::exec() Line 246 C++
StayOnTrack.exe!lime::app::Application_obj::exec() Line 1300 C++
StayOnTrack.exe!ApplicationMain_obj::create() Line 146 C++
StayOnTrack.exe!ApplicationMain_obj::main() Line 261 C++
StayOnTrack.exe!__hxcpp_main() Line 18 C++
StayOnTrack.exe!WinMain(void * hInstance, void * hPrevInstance, const char * lpCmdLine, int nCmdShow) Line 81 C++
StayOnTrack.exe!__tmainCRTStartup() Line 275 C

So it looks like it is an issue with BitmapData again.

NOTE: Concerning the error with PiratePig on Android target, this is strange because it is just working fine on my android devices…

I tried a simple “hello word” sample with haxeflixel 4.x (dev version from https://github.com/HaxeFlixel/flixel.git) and latest versions of lime and openfl.
When compiled with openfl legacy, everything works fine. When compiling with openfl next however, the app crash on android (immediately close) but works on windows target…

The simple FlxState test class:

class MenuState extends FlxState
{
	override public function create():Void
	{
		add(new FlxText(0, 0, 100, "Hello World!"));
		super.create();
	}
}

And the kind of error I get in adb logcat:

I/ActivityManager(  632): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.example.myapp/.MainActivity u=0} from pid 958
D/PowerManagerService(  632): acquireWakeLock flags=0x1 tag=ActivityManager-Launch
I/ActivityManager(  632): Start proc com.example.myapp for activity com.example.myapp/.MainActivity: pid=28780 uid=10167 gids={3003, 3004, 1029}
D/dalvikvm(  632): WAIT_FOR_CONCURRENT_GC blocked 0ms
D/dalvikvm(  632): GC_EXPLICIT freed 1387K, 35% free 34487K/52359K, paused 3ms+8ms, total 113ms
D/PowerManagerService(  632): acquireWakeLock flags=0x1 tag=SCREEN_FROZEN
D/WindowManager(  632): applyLidSwitchState --> mPowerManager.goToSleep time : 1443488667453
I/ActivityManager(  632): Config changed: {1.15 208mcc20mnc fr_FR sw360dp w598dp h335dp nrml land finger -keyb/v/h -nav/h
s.11}
D/PhoneApp(  891): updateProximitySensorMode: state = IDLE
D/InCallScreen(  891): getUpdatedInCallControlState()...
D/InCallScreen(  891): isBluetoothAvailable()...
D/InCallScreen(  891):   ==> false
D/InCallScreen(  891): [okToDialDTMFTones] foreground state: IDLE, ringing state: false, call screen mode: UNDEFINED, result: false
D/InCallControlState(  891): InCallControlState:
D/InCallControlState(  891):   manageConferenceVisible: false
D/InCallControlState(  891):   manageConferenceEnabled: false
D/InCallControlState(  891):   canAddCall: true
D/InCallControlState(  891):   canEndCall: false
D/InCallControlState(  891):   canSwap: false
D/InCallControlState(  891):   canMerge: false
D/InCallControlState(  891):   bluetoothEnabled: false
D/InCallControlState(  891):   bluetoothIndicatorOn: false
D/InCallControlState(  891):   speakerEnabled: false
D/InCallControlState(  891):   speakerOn: false
D/InCallControlState(  891):   canMute: false
D/InCallControlState(  891):   muteIndicatorOn: false
D/InCallControlState(  891):   dialpadEnabled: false
D/InCallControlState(  891):   dialpadVisible: false
D/InCallControlState(  891):   onHold: false
D/InCallControlState(  891):   canHold: false
D/PhoneApp(  891): updateProximitySensorMode: lock already released.
I/AmazonAppstore.AccountSummaryProviderImpl(28269): Set session account to value null
E/Trace   (28780): error opening trace file: No such file or directory (2)
D/ActivityThread(28780): setTargetHeapUtilization:0.25
D/ActivityThread(28780): setTargetHeapIdealFree:8388608
D/ActivityThread(28780): setTargetHeapConcurrentStart:2097152
V/SDL     (28780): Device: a9
V/SDL     (28780): Model: S500
V/SDL     (28780): onCreate(): null
E/CFFILoader.h(28780): Could not API hx_register_prim
E/CFFILoader(28780): Could not find function:hx_register_prim
F/libc    (28780): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 28780 (m.example.myapp)
I/DEBUG   (  152): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   (  152): Build fingerprint: 'acer/s500_emea_fr/a9:4.1.2/JZO54K/1360080249:user/release-keys'
I/DEBUG   (  152): pid: 28780, tid: 28780, name: m.example.myapp  >>> com.example.myapp <<<
I/DEBUG   (  152): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
I/DEBUG   (  152):     r0 5f543564  r1 5f200160  r2 1de92544  r3 00000000
I/DEBUG   (  152):     r4 5f728000  r5 5f200160  r6 5f543564  r7 5f72a5a8
I/DEBUG   (  152):     r8 5f728000  r9 00000006  sl 40a415b8  fp beeee7f4
I/DEBUG   (  152):     ip 40141f80  sp beeee760  lr 5f206984  pc 00000000  cpsr 60000010
I/DEBUG   (  152):     d0  6f6e20646c756f43  d1  6620646e69662074
I/DEBUG   (  152):     d2  3a6e6f6974636e75  d3  73696765725f7868
I/DEBUG   (  152):     d4  0101034e00000000  d5  0108046501000008
I/DEBUG   (  152):     d6  0101034f00000000  d7  0106002e01000008
I/DEBUG   (  152):     d8  0000000000000000  d9  0000000000000000
I/DEBUG   (  152):     d10 0000000000000000  d11 0000000000000000
I/DEBUG   (  152):     d12 0000000000000000  d13 0000000000000000
I/DEBUG   (  152):     d14 0000000000000000  d15 0000000000000000
I/DEBUG   (  152):     d16 73696765725f7868  d17 6d6972705f726574
I/DEBUG   (  152):     d18 0063002f00610074  d19 0065002e006d006f
I/DEBUG   (  152):     d20 0070006d00610078  d21 006d002e0065006c
I/DEBUG   (  152):     d22 0070007000610079  d23 00620069006c002f
I/DEBUG   (  152):     d24 0000000000000000  d25 0000000000000000
I/DEBUG   (  152):     d26 0000000000000000  d27 0000000000000000
I/DEBUG   (  152):     d28 0100010001000100  d29 0100010001000100
I/DEBUG   (  152):     d30 0000000000000000  d31 0000000000000000
I/DEBUG   (  152):     scr 60000010
I/DEBUG   (  152):
I/DEBUG   (  152): backtrace:
I/DEBUG   (  152):     #00  pc 00000000  <unknown>
I/DEBUG   (  152):     #01  pc 00038980  /data/data/com.example.myapp/lib/liblime.so
I/DEBUG   (  152):     #02  pc 0003b8d0  /data/data/com.example.myapp/lib/liblime.so
I/DEBUG   (  152):     #03  pc 00003793  /system/bin/linker
I/DEBUG   (  152):     #04  pc 00005c97  /system/bin/linker
I/DEBUG   (  152):     #05  pc 00050189  /system/lib/libdvm.so (dvmLoadNativeCode(char const*, Object*, char**)+100)
I/DEBUG   (  152):     #06  pc 00065899  /system/lib/libdvm.so
I/DEBUG   (  152):     #07  pc 000287e0  /system/lib/libdvm.so
I/DEBUG   (  152):     #08  pc 0002cfa0  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)
I/DEBUG   (  152):     #09  pc 0005f947  /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+374)
I/DEBUG   (  152):     #10  pc 000668ed  /system/lib/libdvm.so
I/DEBUG   (  152):     #11  pc 000287e0  /system/lib/libdvm.so
I/DEBUG   (  152):     #12  pc 0002cfa0  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)
I/DEBUG   (  152):     #13  pc 0005f69d  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+272)
I/DEBUG   (  152):     #14  pc 0004a6a7  /system/lib/libdvm.so
I/DEBUG   (  152):     #15  pc 00049cfd  /system/lib/libandroid_runtime.so
I/DEBUG   (  152):     #16  pc 0004a719  /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*)+368)
I/DEBUG   (  152):     #17  pc 00000e71  /system/bin/app_process
I/DEBUG   (  152):
I/DEBUG   (  152): stack:
I/DEBUG   (  152):          beeee720  00000004
I/DEBUG   (  152):          beeee724  00000004
I/DEBUG   (  152):          beeee728  400cc8a0  /system/bin/linker
I/DEBUG   (  152):          beeee72c  0000b5c5
I/DEBUG   (  152):          beeee730  400d81c8
I/DEBUG   (  152):          beeee734  400d239c
I/DEBUG   (  152):          beeee738  407e1f60  /system/lib/libOpenSLES.so
I/DEBUG   (  152):          beeee73c  1de92544
I/DEBUG   (  152):          beeee740  00000000
I/DEBUG   (  152):          beeee744  1de92544
I/DEBUG   (  152):          beeee748  5f728000  /data/data/com.example.myapp/lib/liblime.so
I/DEBUG   (  152):          beeee74c  5f200160  /data/data/com.example.myapp/lib/liblime.so (lime_application_create__prime)
I/DEBUG   (  152):          beeee750  5f543564  /data/data/com.example.myapp/lib/liblime.so
I/DEBUG   (  152):          beeee754  5f206974  /data/data/com.example.myapp/lib/liblime.so
I/DEBUG   (  152):          beeee758  df0027ad
I/DEBUG   (  152):          beeee75c  00000000
I/DEBUG   (  152):     #00  beeee760  5f727ac0  /data/data/com.example.myapp/lib/liblime.so
I/DEBUG   (  152):          ........  ........
I/DEBUG   (  152):     #01  beeee760  5f727ac0  /data/data/com.example.myapp/lib/liblime.so
I/DEBUG   (  152):          beeee764  0000000d
I/DEBUG   (  152):          beeee768  00000004
I/DEBUG   (  152):          beeee76c  5f2098d4  /data/data/com.example.myapp/lib/liblime.so
I/DEBUG   (  152):     #02  beeee770  400cc8a0  /system/bin/linker
I/DEBUG   (  152):          beeee774  0000b5c5
I/DEBUG   (  152):          beeee778  400d81c8
I/DEBUG   (  152):          beeee77c  5f7243dc  /data/data/com.example.myapp/lib/liblime.so
I/DEBUG   (  152):          beeee780  0000000d
I/DEBUG   (  152):          beeee784  00000004
I/DEBUG   (  152):          beeee788  5cf744c8
I/DEBUG   (  152):          beeee78c  419a3780  /dev/ashmem/dalvik-heap (deleted)
I/DEBUG   (  152):          beeee790  00000006
I/DEBUG   (  152):          beeee794  40a415b8  /system/lib/libdvm.so
I/DEBUG   (  152):          beeee798  beeee7f4  [stack]
I/DEBUG   (  152):          beeee79c  400bb795  /system/bin/linker
I/DEBUG   (  152):
I/DEBUG   (  152): memory near r0:
I/DEBUG   (  152):     5f543544 6f6e2064 69662074 6620646e 74636e75  d not find funct
I/DEBUG   (  152):     5f543554 3a6e6f69 5f6c6176 6f726874 00000a77  ion:val_throw...
I/DEBUG   (  152):     5f543564 656d696c 7070615f 6163696c 6e6f6974  lime_application
I/DEBUG   (  152):     5f543574 6572635f 5f657461 6972705f 0000656d  _create__prime..
I/DEBUG   (  152):     5f543584 656d696c 7070615f 6163696c 6e6f6974  lime_application
I/DEBUG   (  152):
I/DEBUG   (  152): memory near r1:
I/DEBUG   (  152):     5f200140 e1a04001 e12fff33 e1a01004 e5903000  [email protected]/......0..
I/DEBUG   (  152):     5f200150 e5933038 e12fff33 e8bd8010 00527ebc  80..3./......~R.
I/DEBUG   (  152):     5f200160 e92d4008 e5d03000 e353006f 0a000001  [email protected]
I/DEBUG   (  152):     5f200170 e3a00000 e8bd8008 e5d03001 e353006f  .........0..o.S.
I/DEBUG   (  152):     5f200180 1afffffa e5d03002 e3530000 1a000007  .....0....S.....
I/DEBUG   (  152):
I/DEBUG   (  152): memory near r2:
I/DEBUG   (  152):     1de92524 ffffffff ffffffff ffffffff ffffffff  ................
I/DEBUG   (  152):     1de92534 ffffffff ffffffff ffffffff ffffffff  ................
I/DEBUG   (  152):     1de92544 ffffffff ffffffff ffffffff ffffffff  ................
I/DEBUG   (  152):     1de92554 ffffffff ffffffff ffffffff ffffffff  ................
I/DEBUG   (  152):     1de92564 ffffffff ffffffff ffffffff ffffffff  ................
I/DEBUG   (  152):
I/DEBUG   (  152): memory near r4:
I/DEBUG   (  152):     5f727fe0 5b0ff02b 401a4b10 4016b019 40162105  +..[[email protected]@[email protected]
I/DEBUG   (  152):     5f727ff0 40151820 4016221d 4015d129 40156655   [email protected]"[email protected])[email protected]@
I/DEBUG   (  152):     5f728000 5f208ecc 5f207920 5f208a04 5f206f2c  .. _ y _.. _,o _
I/DEBUG   (  152):     5f728010 5f208494 5f208b5c 5f208c3c 5f208c9c  .. _\. _<. _.. _
I/DEBUG   (  152):     5f728020 5f208bcc 5f208ae0 5f208d7c 5f208dec  .. _.. _|. _.. _
I/DEBUG   (  152):
I/DEBUG   (  152): memory near r5:
I/DEBUG   (  152):     5f200140 e1a04001 e12fff33 e1a01004 e5903000  [email protected]/......0..
I/DEBUG   (  152):     5f200150 e5933038 e12fff33 e8bd8010 00527ebc  80..3./......~R.
I/DEBUG   (  152):     5f200160 e92d4008 e5d03000 e353006f 0a000001  [email protected]
I/DEBUG   (  152):     5f200170 e3a00000 e8bd8008 e5d03001 e353006f  .........0..o.S.
I/DEBUG   (  152):     5f200180 1afffffa e5d03002 e3530000 1a000007  .....0....S.....
I/DEBUG   (  152):
I/DEBUG   (  152): memory near r6:
I/DEBUG   (  152):     5f543544 6f6e2064 69662074 6620646e 74636e75  d not find funct
I/DEBUG   (  152):     5f543554 3a6e6f69 5f6c6176 6f726874 00000a77  ion:val_throw...
I/DEBUG   (  152):     5f543564 656d696c 7070615f 6163696c 6e6f6974  lime_application
I/DEBUG   (  152):     5f543574 6572635f 5f657461 6972705f 0000656d  _create__prime..
I/DEBUG   (  152):     5f543584 656d696c 7070615f 6163696c 6e6f6974  lime_application
I/DEBUG   (  152):
I/DEBUG   (  152): memory near r7:
I/DEBUG   (  152):     5f72a588 5f70da60 00000000 00000013 00000007  `.p_............
I/DEBUG   (  152):     5f72a598 5f5189c4 5f51af48 00000000 00000000  ..Q_H.Q_........
I/DEBUG   (  152):     5f72a5a8 00000000 00000000 00000000 00000000  ................
I/DEBUG   (  152):     5f72a5b8 00000000 00000000 00000000 00000000  ................
I/DEBUG   (  152):     5f72a5c8 00000000 00000000 00000000 00000000  ................
I/DEBUG   (  152):
I/DEBUG   (  152): memory near r8:
I/DEBUG   (  152):     5f727fe0 5b0ff02b 401a4b10 4016b019 40162105  +..[[email protected]@[email protected]
I/DEBUG   (  152):     5f727ff0 40151820 4016221d 4015d129 40156655   [email protected]"[email protected])[email protected]@
I/DEBUG   (  152):     5f728000 5f208ecc 5f207920 5f208a04 5f206f2c  .. _ y _.. _,o _
I/DEBUG   (  152):     5f728010 5f208494 5f208b5c 5f208c3c 5f208c9c  .. _\. _<. _.. _
I/DEBUG   (  152):     5f728020 5f208bcc 5f208ae0 5f208d7c 5f208dec  .. _.. _|. _.. _
I/DEBUG   (  152):
I/DEBUG   (  152): memory near sl:
I/DEBUG   (  152):     40a41598 00000000 00000000 00000000 00000000  ................
I/DEBUG   (  152):     40a415a8 00000000 00000000 00000000 00000000  ................
I/DEBUG   (  152):     40a415b8 408f8d08 4073db80 00800000 10000000  [email protected]@........
I/DEBUG   (  152):     40a415c8 04000000 00004000 00006000 00000001  [email protected]`......
I/DEBUG   (  152):     40a415d8 00000100 00000002 00000001 00000000  ................
I/DEBUG   (  152):
I/DEBUG   (  152): memory near fp:
I/DEBUG   (  152):     beeee7d4 400790c0 beeee7f4 419a3780 00000006  [email protected]
I/DEBUG   (  152):     beeee7e4 4013dbbc 4199e1fc 409fb89d 4013dbd0  [email protected]@[email protected]
I/DEBUG   (  152):     beeee7f4 00000000 57f4289e 4013dbec 400790b0  .....([email protected]@
I/DEBUG   (  152):     beeee804 40ec3248 409b54c0 409be7e4 00000000  [email protected]@[email protected]
I/DEBUG   (  152):     beeee814 400790b0 40a3cc60 56f4b8e0 00000000  [email protected]`[email protected]
I/DEBUG   (  152):
I/DEBUG   (  152): memory near ip:
I/DEBUG   (  152):     40141f60 00000000 00000000 00000000 4016221d  ............."[email protected]
I/DEBUG   (  152):     40141f70 40155330 4015c98d 4014fa0c 40155730  [email protected]@[email protected]@
I/DEBUG   (  152):     40141f80 4014fbc0 401569d9 40150104 401515e0  [email protected]@[email protected]@
I/DEBUG   (  152):     40141f90 4017cbfd 4015a19c 40161e65 4016d7e5  [email protected]@[email protected]@
I/DEBUG   (  152):     40141fa0 4015f645 401514e8 40150c00 401511c0  [email protected]@[email protected]@
I/DEBUG   (  152):
I/DEBUG   (  152): memory near sp:
I/DEBUG   (  152):     beeee740 00000000 1de92544 5f728000 5f200160  ....D%....r_`. _
I/DEBUG   (  152):     beeee750 5f543564 5f206974 df0027ad 00000000  d5T_ti _.'......
I/DEBUG   (  152):     beeee760 5f727ac0 0000000d 00000004 5f2098d4  .zr_.......... _
I/DEBUG   (  152):     beeee770 400cc8a0 0000b5c5 400d81c8 5f7243dc  [email protected]@.Cr_
I/DEBUG   (  152):     beeee780 0000000d 00000004 5cf744c8 419a3780  .........D.\.7.A
I/DEBUG   (  152):
I/DEBUG   (  152): code around pc:
I/DEBUG   (  152):     00000000 ffffffff ffffffff ffffffff ffffffff  ................
I/DEBUG   (  152):     00000010 ffffffff ffffffff ffffffff ffffffff  ................
I/DEBUG   (  152):     00000020 ffffffff ffffffff ffffffff ffffffff  ................
I/DEBUG   (  152):     00000030 ffffffff ffffffff ffffffff ffffffff  ................
I/DEBUG   (  152):     00000040 ffffffff ffffffff ffffffff ffffffff  ................
I/DEBUG   (  152):
I/DEBUG   (  152): code around lr:
I/DEBUG   (  152):     5f206964 e59f2028 e08f1001 e08f2002 ebffe0d9  ( ....... ......
I/DEBUG   (  152):     5f206974 e5943054 e1a00006 e1a01005 e12fff33  T0..........3./.
I/DEBUG   (  152):     5f206984 e8bd8070 0033b96c 005216c0 0033b948  p...l.3...R.H.3.
I/DEBUG   (  152):     5f206994 0033b950 e92d4070 e1a06000 e59f005c  [email protected]`..\...
I/DEBUG   (  152):     5f2069a4 e1a05001 e59f4058 e08f0000 ebffffc5  [email protected]
I/BootReceiver(  632): Copying /data/tombstones/tombstone_07 to DropBox (SYSTEM_TOMBSTONE)
I/ActivityManager(  632): Process com.example.myapp (pid 28780) has died.
W/ActivityManager(  632): Force removing ActivityRecord{41996f68 com.example.myapp/.MainActivity}: app died, no saved state
D/PowerManagerService(  632): releaseWakeLock flags=0x1 tag=SCREEN_FROZEN
D/WindowManager(  632): applyLidSwitchState --> mPowerManager.goToSleep time : 1443488668453
D/PowerManagerService(  632): acquireWakeLock flags=0x1 tag=CrashReporterServiceWorker
I/AmazonAppstore.CrashReporter/CrashReportService(28269): sendCrashReports()
D/dalvikvm(25434): WAIT_FOR_CONCURRENT_GC blocked 0ms
D/PowerManagerService(  632): releaseWakeLock flags=0x1 tag=CrashReporterServiceWorker
D/dalvikvm(25434): GC_EXPLICIT freed 1K, 28% free 14399K/19779K, paused 3ms+2ms, total 43ms
W/InputMethodManagerService(  632): Window already focused, ignoring focus gain of: [email protected] [email protected]
D/PowerManagerService(  632): acquireWakeLock flags=0x1 tag=SCREEN_FROZEN
D/PowerManagerService(  632): releaseWakeLock flags=0x1 tag=ActivityManager-Launch
I/ActivityManager(  632): Config changed: {1.15 208mcc20mnc fr_FR sw360dp w360dp h567dp nrml port finger -keyb/v/h -nav/h
s.12}
D/PhoneApp(  891): updateProximitySensorMode: state = IDLE
I/AmazonAppstore.AccountSummaryProviderImpl(28269): Set session account to value null
D/InCallScreen(  891): getUpdatedInCallControlState()...
D/InCallScreen(  891): isBluetoothAvailable()...
D/InCallScreen(  891):   ==> false
D/InCallScreen(  891): [okToDialDTMFTones] foreground state: IDLE, ringing state: false, call screen mode: UNDEFINED, result: false
D/InCallControlState(  891): InCallControlState:
D/InCallControlState(  891):   manageConferenceVisible: false
D/InCallControlState(  891):   manageConferenceEnabled: false
D/InCallControlState(  891):   canAddCall: true
D/InCallControlState(  891):   canEndCall: false
D/InCallControlState(  891):   canSwap: false
D/InCallControlState(  891):   canMerge: false
D/InCallControlState(  891):   bluetoothEnabled: false
D/InCallControlState(  891):   bluetoothIndicatorOn: false
D/InCallControlState(  891):   speakerEnabled: false
D/InCallControlState(  891):   speakerOn: false
D/InCallControlState(  891):   canMute: false
D/InCallControlState(  891):   muteIndicatorOn: false
D/InCallControlState(  891):   dialpadEnabled: false
D/InCallControlState(  891):   dialpadVisible: false
D/InCallControlState(  891):   onHold: false
D/InCallControlState(  891):   canHold: false
D/PhoneApp(  891): updateProximitySensorMode: lock already released.
D/PowerManagerService(  632): releaseWakeLock flags=0x1 tag=SCREEN_FROZEN
D/StateMachine(  632): handleMessage: E msg.what=131155
D/StateMachine(  632): processMsg: ConnectedState
D/WifiStateMachine(  632): ConnectedState{ what=131155 when=-3ms arg1=66 }
D/StateMachine(  632): processMsg: L2ConnectedState
D/WifiStateMachine(  632): L2ConnectedState{ what=131155 when=-3ms arg1=66 }
D/WifiStateMachine(  632): Rssi = -53 SignalLevel = 4 LastSignalLevel = 4
D/StateMachine(  632): handleMessage: X

so the problem seems to be:
do not find function:val_throw… lime_application_create__prime…

Looks like you are not using debug version of lime, because only library names are showing up in the backtrace.

This is exactly the same error I got on my Android device.
Since there is no need to call hx_register_prim unless you are using static build, this looks like a bug of CFFI Prime.

Well I don’t know.
But I did realised I was using the lime and openfl git versions and this problem do not appear when using lime 2.6.5 and openfl 3.3.6. So it is probably just a temporary issue with the dev version of lime…

I believe it is fixed now:

If you build from source, you need to do a rebuild android -clean to get the change. This should be in the next Lime release :slight_smile: