Android: JNI Crash problem

Hi !

With the new 4.5.3 version I have issues because it crashes at start of the application with any Android extension. It works fine with 4.5.2.

The error is:

E/loader  (16806): Could not find primitive NativeCFFI.lime_jni_init_callback__1 in 0xb5000934
E/HXCPP   (16806): Called from cc/system/net/WifiManager.hx line 18
E/HXCPP   (16806): Called from lime.system.JNI::createStaticMethod lime/system/JNI.hx line 116
E/HXCPP   (16806): Called from lime.system.JNI::init lime/system/JNI.hx line 164
E/Exception(16806): Null Function Pointer

I have tried to compile with the next configs:

  • Haxe 3.4.0 rc-2, hxcpp 3.4.2
  • Haxe 3.2.1, hxcpp 3.3.49

Also I have tried android ndk r11c and r13b.

Thanks in advance!

Does this help?

Did not fix anything on my side

It works for me :slight_smile: Thanks!

I’m using Haxe 3.4.0-rc2, Hxcpp 3.4.2, Android NDK r13b, OpenFL 4.5.3 and Lime from git.

Did you try by appling this patch to lime 3.6.0 rather than using git one?

I am using haxe 3.2.1, Hxcpp 3.4.43, Android NDK r10d, OpenFL 4.5.3 and lime 3.6.0 with the patch applied and I still have the error. I will try to update everything and retry

Only one commit is the difference. So the git version should be valid.

Are you rebuilding lime?

Yes I did a lime rebuild android but nothing happen (command immediately returned) so I don’t think it is necessary…
Anyway I just updated haxe and android NDK and I am retryning with the same config as you (exept for hxcpp) now… (weird thing is I don’t see the progression of the compilation in the console anymore… But it seems to be compiling as if I cancel it with CTRL+C the progression messages appear in the console…)

I think that you can’t rebuild from the haxelib version. You need the git version to rebuild Lime.

Anyway you can try lime rebuild android -clean

ok with lime git I don’t have the Null Function Pointer error anymore. My app is still crashing but this seems to be another issue…