Description
JNI接口使用两个本地lib,分别编译成动态库mtcnn.so和mfnet.so。两个动态库都基于ncnn,且都链接了libncnn.a的静态库。
运行时,mtcnn功能正常,运行到mfnet时报错。尝试不加载mtcnn时(或者注释掉所有mtcnn的.load_param()方法),mfnet可以跑通,不报错。
另外我发现这并不一定时mfnet的问题,当我把mfnet的所有代码替换为mtcnn时(即mfnet.so和mtcnn.so相同),同样在运行第二个本地库时报错,且错误相同?
请问大神该如何解决?
AS的Logcat报错信息如下:
2017-08-05 19:25:41.912 20274-20274/com.example.dms A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 20274 (com.example.dms), pid 20274 (com.example.dms)
2017-08-05 19:25:41.997 20339-20339/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2017-08-05 19:25:41.997 20339-20339/? A/DEBUG: Build fingerprint: 'rockchip/rk3399pro/rk3399pro:8.1.0/OPM8.190305.001/101257:userdebug/test-keys'
2017-08-05 19:25:41.997 20339-20339/? A/DEBUG: Revision: '0'
2017-08-05 19:25:41.997 20339-20339/? A/DEBUG: ABI: 'arm64'
2017-08-05 19:25:41.997 20339-20339/? A/DEBUG: pid: 20274, tid: 20274, name: com.example.dms >>> com.example.dms <<<
2017-08-05 19:25:41.997 20339-20339/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
2017-08-05 19:25:41.997 20339-20339/? A/DEBUG: x0 0000000000000000 x1 0000000000004f32 x2 0000000000000006 x3 0000000000000008
2017-08-05 19:25:41.997 20339-20339/? A/DEBUG: x4 0000007999fd6000 x5 0000007999fd6000 x6 0000007999fd6000 x7 00000000001c7ea0
2017-08-05 19:25:41.997 20339-20339/? A/DEBUG: x8 0000000000000083 x9 0000000010000000 x10 0000007ff69ab5e0 x11 0000000000000001
2017-08-05 19:25:41.997 20339-20339/? A/DEBUG: x12 0000000000000018 x13 00000003e8000000 x14 00364add5e425850 x15 00000f704fc4ba2b
2017-08-05 19:25:41.997 20339-20339/? A/DEBUG: x16 00000059ddea0fa8 x17 000000799688752c x18 00000078fc6e5400 x19 0000000000004f32
2017-08-05 19:25:41.997 20339-20339/? A/DEBUG: x20 0000000000004f32 x21 0000000000000083 x22 00000078fd3f0cea x23 00000079154e11d6
2017-08-05 19:25:41.997 20339-20339/? A/DEBUG: x24 00000078fd3f0cee x25 00000078fd43a000 x26 000000791558964c x27 0000007ff69ab970
2017-08-05 19:25:41.997 20339-20339/? A/DEBUG: x28 000000799a13fa40 x29 0000007ff69ab620 x30 000000799683c760
2017-08-05 19:25:41.997 20339-20339/? A/DEBUG: sp 0000007ff69ab5e0 pc 000000799683c788 pstate 0000000060000000
2017-08-05 19:25:41.999 20339-20339/? A/DEBUG: backtrace:
2017-08-05 19:25:41.999 20339-20339/? A/DEBUG: #00 pc 000000000001d788 /system/lib64/libc.so (abort+120)
2017-08-05 19:25:41.999 20339-20339/? A/DEBUG: #1 pc 000000000015e498 /data/app/com.example.dms-hnU3L7aK-rU0IqLRnkVVkg==/lib/arm64/libmfnet.so (__kmp_abort_process+44)