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

Android Fatal Signal 6 (SIGABRT) #442

Closed
omida opened this issue Jul 15, 2016 · 5 comments
Closed

Android Fatal Signal 6 (SIGABRT) #442

omida opened this issue Jul 15, 2016 · 5 comments

Comments

@omida
Copy link

omida commented Jul 15, 2016

Hi Dmitry, Cárthach,

I was successfully able to create the libessentia.so library for use in Android, and compile the native C++ code with the Android NDK. However, I get a runtime error when trying to create an algorithm. I used the standard_mfcc.cpp code as a use case. You can find the C++ code in the following text document:

essentia_question_code.txt

After a little debugging using print statements I realized the problem is occurring when the program is trying to create an algorithm using “factory.create()”. The problem occurred no matter which algorithm was to be created (e.g., MonoLoader, FrameCutter, MFCC, etc.).

Here’s the logcat I get:

--------- beginning of crash
07-15 16:10:31.844 12623-12623/? A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 12623 (xample.hellojni)
07-15 16:10:31.844 1175-1175/? D/KeyguardSecurityView: showSecurityScreen(None)
07-15 16:10:31.852 12397-12576/? I/Icing: Post-init done
07-15 16:10:31.917 304-304/? I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-15 16:10:31.917 304-304/? I/DEBUG: Build fingerprint: 'motorola/surnia_verizon/surnia_cdma:5.1/LPIS23.29-17.5-2/2:user/release-keys'
07-15 16:10:31.917 304-304/? I/DEBUG: Revision: 'p300'
07-15 16:10:31.917 304-304/? I/DEBUG: ABI: 'arm'
07-15 16:10:31.917 304-304/? I/DEBUG: pid: 12623, tid: 12623, name: xample.hellojni >>> com.example.hellojni <<<
07-15 16:10:31.917 304-304/? I/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
07-15 16:10:31.933 304-304/? I/DEBUG: r0 00000000 r1 0000314f r2 00000006 r3 00000000
07-15 16:10:31.933 304-304/? I/DEBUG: r4 b6fa8e38 r5 00000006 r6 00000054 r7 0000010c
07-15 16:10:31.934 304-304/? I/DEBUG: r8 0000004e r9 00000047 sl a66e80e8 fp a669f2a4
07-15 16:10:31.934 304-304/? I/DEBUG: ip 0000314f sp bef4e928 lr b6e35e21 pc b6e5c67c cpsr 600f0010
07-15 16:10:31.934 304-304/? I/DEBUG: backtrace:
07-15 16:10:31.934 304-304/? I/DEBUG: #00 pc 0003d67c /system/lib/libc.so (tgkill+12)
07-15 16:10:31.934 304-304/? I/DEBUG: #1 pc 00016e1d /system/lib/libc.so (pthread_kill+52)
07-15 16:10:31.935 304-304/? I/DEBUG: #2 pc 00017a3b /system/lib/libc.so (raise+10)
07-15 16:10:31.935 304-304/? I/DEBUG: #3 pc 000141b1 /system/lib/libc.so (__libc_android_abort+36)
07-15 16:10:31.935 304-304/? I/DEBUG: #4 pc 00012718 /system/lib/libc.so (abort+4)
07-15 16:10:31.935 304-304/? I/DEBUG: #5 pc 003f6240 /data/app/com.example.hellojni-1/lib/arm/libessentia.so (__gnu_cxx::__verbose_terminate_handler()+344)
07-15 16:10:31.935 304-304/? I/DEBUG: #6 pc 003ad274 /data/app/com.example.hellojni-1/lib/arm/libessentia.so (__cxxabiv1::__terminate(void (_)())+4)
07-15 16:10:31.935 304-304/? I/DEBUG: #7 pc 003ad2b4 /data/app/com.example.hellojni-1/lib/arm/libessentia.so (std::terminate()+16)
07-15 16:10:31.935 304-304/? I/DEBUG: #8 pc 003a4658 /data/app/com.example.hellojni-1/lib/arm/libessentia.so (_cxa_throw+172)
07-15 16:10:31.935 304-304/? I/DEBUG: #9 pc 00004517 /data/app/com.example.hellojni-1/lib/arm/libhello-jni.so (essentia::EssentiaFactoryessentia::standard::Algorithm::create_i(std::string const&, std::string const&, essentia::Parameter const&, std::string const&, essentia::Parameter const&) const+250)
07-15 16:10:31.936 304-304/? I/DEBUG: #10 pc 00004ffd /data/app/com.example.hellojni-1/lib/arm/libhello-jni.so (Java_com_example_hellojni_HelloJni_stringFromJNI+156)
07-15 16:10:31.936 304-304/? I/DEBUG: #11 pc 000005b7 /data/dalvik-cache/arm/data@[email protected]@[email protected]
07-15 16:10:32.013 823-1371/? I/ActivityManager: Start proc 12651:com.google.android.apps.docs/u0a72 for broadcast com.google.android.apps.docs/.receivers.AppPackageAddRemoveReceiver
07-15 16:10:32.026 1175-1175/? D/PhoneStatusBar: disable: < expand ICONS alerts SYSTEM_INFO back HOME
RECENT clock SEARCH >
07-15 16:10:32.029 823-1609/? I/ActivityManager: Killing 12373:com.motorola.moto:context_engine/u0a30 (adj 15): empty #7
07-15 16:10:32.214 304-304/? I/DEBUG: Tombstone written to: /data/tombstones/tombstone_06
07-15 16:10:32.229 823-846/? I/BootReceiver: Copying /data/tombstones/tombstone_06 to DropBox (SYSTEM_TOMBSTONE)
07-15 16:10:32.234 823-12668/? W/ActivityManager: Force finishing activity 1 com.example.hellojni/.HelloJni
07-15 16:10:32.290 823-845/? W/ActivityManager: Activity pause timeout for ActivityRecord{3685b98a u0 com.example.hellojni/.HelloJni t106 f}
07-15 16:10:32.301 233-233/? E/lowmemorykiller: Error writing /proc/12623/oom_score_adj; errno=22
07-15 16:10:32.333 233-233/? E/lowmemorykiller: Error writing /proc/12623/oom_score_adj; errno=22
07-15 16:10:32.333 823-845/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!!
07-15 16:10:32.339 323-323/? I/Zygote: Process 12623 exited due to signal (6)

I would much appreciate it if you can help me out!

Thanks!

@dbogdanov
Copy link
Member

@carthach

@carthach
Copy link
Contributor

carthach commented Jul 25, 2016

Hmmm, I'm not entirely sure tbh. I haven't worked with JNI before (I just used straight C++ using JUCE android bindings).

Bear in mind MonoLoader won't work if you have compiled the lightweight version of Essentia. Also have you tried using the a statically compiled library versus .so.

Just some suggestions...

@omida
Copy link
Author

omida commented Aug 1, 2016

@carthach , I tried using the statically compiled library as well but had no luck.
Instead I'm trying to cross-compile an extractor for ARM and just run the exec file on Android. I'm having some trouble with this and I'm going to open a separate case for it.

@omida omida closed this as completed Aug 1, 2016
@bitdistrict
Copy link

bitdistrict commented Sep 19, 2016

Hi, I have the same problem here, using the experimental gradle to add essentia lib to my android studio project, all compile and work like a charm, but when I try to create any algorithm via factory.create() I get the: "Fatal signal 6 (SIGABRT)", I dont know what it is since this output is a generical error for a non-responsive app. Any advance in your exec implementation @omida? @carthach if you want I can upload a demo project that you could test.

I m using the exact same implementation in IOS with any problem.

@rafiuddinkhan
Copy link

Hi, I have the same problem here, using the experimental gradle to add essentia lib to my android studio project, all compile and work like a charm, but when I try to create any algorithm via factory.create() I get the: "Fatal signal 6 (SIGABRT)", I dont know what it is since this output is a generical error for a non-responsive app. Any advance in your exec implementation @omida? @carthach if you want I can upload a demo project that you could test.

I m using the exact same implementation in IOS with any problem.

@bitdistric have solved your problem, can you share the demo project which you build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants