Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on Android 6 and newer (7) with JavaCPP 1.2.0 #292

Closed
N0un opened this issue Sep 22, 2016 · 1 comment
Closed

Crash on Android 6 and newer (7) with JavaCPP 1.2.0 #292

N0un opened this issue Sep 22, 2016 · 1 comment

Comments

@N0un
Copy link

N0un commented Sep 22, 2016

Hi !
I use javaCPP FFMPEG preset for my app and it works fine for Android 5 or older devices. I took the precompiled armeabi-v7a and x86 libraries (1.2 with FFMPEG 3.0.2) and it crashes at the call of "avcodec_register_all();" (the first call of this lib) for each device configuration based on Android 6 and 7 (arm, arm64, x86). So impossible to use JavaCPP (and FFMPEG preset but I think the error comes from JavaCPP) with Android 6 or newer. Here is an example of log with an emulator running on Android 6 with an x86 system based :

09-22 14:48:32.010: A/libc(2506): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 2506 (*********)
14:48:32.015: I/art(2178): Ignoring second debugger -- accepting and dropping
09-22 14:48:32.031: E/Surface(1886): getSlotFromBufferLocked: unknown buffer: 0xadc71380
09-22 14:48:32.031: I/art(2246): Ignoring second debugger -- accepting and dropping
09-22 14:48:32.043: I/art(2430): Ignoring second debugger -- accepting and dropping
09-22 14:48:32.054: I/art(2212): Ignoring second debugger -- accepting and dropping
09-22 14:48:32.110: A/DEBUG(1188): *
* *** *** *** *** *** ** * * * * * * * * ***
09-22 14:48:32.110: A/DEBUG(1188): Build fingerprint: 'Android/sdk_phone_x86/generic_x86:6.0/MASTER/2780065:userdebug/test-keys'
09-22 14:48:32.110: A/DEBUG(1188): Revision: '0'
09-22 14:48:32.110: A/DEBUG(1188): ABI: 'x86'
09-22 14:48:32.110: A/DEBUG(1188): pid: 2506, tid: 2506, name: * >>> com.* <<<
09-22 14:48:32.110: A/DEBUG(1188): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
09-22 14:48:32.095: W/debuggerd(1188): type=1400 audit(0.0:13): avc: denied { search } for name="" dev="vdc" ino=7293 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
09-22 14:48:32.113: A/DEBUG(1188): eax 00000000 ebx b2ac871c ecx 00000019 edx 00000000
09-22 14:48:32.113: A/DEBUG(1188): esi b6a24f40 edi b2ac8544
09-22 14:48:32.113: A/DEBUG(1188): xcs 00000073 xds 0000007b xes 0000007b xfs 00000007 xss 0000007b
09-22 14:48:32.113: A/DEBUG(1188): eip b29f3035 ebp 00000000 esp bff779d0 flags 00210282
09-22 14:48:32.095: W/debuggerd(1188): type=1400 audit(0.0:14): avc: denied { search } for name="
" dev="vdc" ino=7293 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
09-22 14:48:32.114: A/DEBUG(1188): backtrace:
09-22 14:48:32.114: A/DEBUG(1188): #00 pc 00023035 /data/data/
_/cache/javacpp154939939492/libc.so
09-22 14:48:32.114: A/DEBUG(1188): #1 pc 000154b6 /data/data/
_
/cache/javacpp154939939492/libc.so
09-22 14:48:32.115: A/DEBUG(1188): #2 pc 00003203 /system/bin/linker (__dl__ZN6soinfo17call_constructorsEv.part.140+1055)
09-22 14:48:32.115: A/DEBUG(1188): #3 pc 0000b8ff /system/bin/linker (__dl__Z9do_dlopenPKciPK17android_dlextinfo+495)
09-22 14:48:32.115: A/DEBUG(1188): #4 pc 0000213c /system/bin/linker (__dl_dlopen+59)
09-22 14:48:32.115: A/DEBUG(1188): #5 pc 003a6287 /system/lib/libart.so (art::JavaVMExt::LoadNativeLibrary(JNIEnv, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, jobject, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >
)+759)
09-22 14:48:32.115: A/DEBUG(1188): #6 pc 00470d5d /system/lib/libart.so (art::Runtime_nativeLoad(JNIEnv, jclass, jstring, jobject, jstring)+301)
09-22 14:48:32.115: A/DEBUG(1188): #7 pc 7213b6ce /data/dalvik-cache/x86/system@framework@boot.oat (offset 0x1eb2000)
09-22 14:48:32.115: A/DEBUG(1188): #8 pc 00641453 /dev/ashmem/dalvik-main space 1 (deleted) (offset 0x1000)
09-22 14:48:32.105: W/debuggerd(1188): type=1400 audit(0.0:15): avc: denied { search } for name="_" dev="vdc" ino=7293 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
09-22 14:48:32.182: A/DEBUG(1188): Tombstone written to: /data/tombstones/tombstone_06
09-22 14:48:32.182: E/DEBUG(1188): AM write failed: Broken pipe

The error is similar for all configuration but on Android 7 it's not a sigsegv code 1 but code 2 (at least on arm64) but with the same trace. Any idea? Thanks !

@N0un
Copy link
Author

N0un commented Sep 22, 2016

Ok I solve this using the latest JavaCPP version : 1.2.3. Thank you a lot for the work, I close the issue.

I find solution here :
bytedeco/javacv#412

@N0un N0un closed this as completed Sep 22, 2016
@N0un N0un changed the title Crash on Android 6 and newer (7) Crash on Android 6 and newer (7) with JavaCPP 1.2.0 Sep 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants