nativelibs4java / BridJ

BridJ: blazing fast Java / C / C++ interop
https://code.google.com/archive/p/bridj/
Other
297 stars 77 forks source link

Segmentation fault when calling BridJ.register() on Android #74

Open Yrlec opened 9 years ago

Yrlec commented 9 years ago

I get a segmentation fault when calling BridJ.register() on Android (it's when registering a library called PackJPG). The code works on OS X and Windows but not on Android (KitKat). I have tested it using BridJ 0.7.0, 0.7.0-SNAPSHOT and 0.7.1-SNAPSHOT (all with same binaries from March 5th 2015).

I have debugged it and the problem occurs at line 149 in NativeEntities.java (I'm guessing when it calls JNI.bindJavaMethodsToCFunctions)

This causes the app to crash and print the following error: A/libc﹕ Fatal signal 11 (SIGSEGV) at 0x0000000c (code=1)

I have attached one screenshot from IntelliJ just before the error occurs and one just after. Hopefully they provide useful info. screen shot 2015-08-04 at 21 11 06.

screen shot 2015-08-04 at 21 11 20

Just let me know if you need any further info.

How do I solve this? Thanks!