Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cpp interface for throwing exceptions back thru JNI to java/android layer...
- jint
- Java_fm_audioboo_jni_FLACStreamEncoder_write(JNIEnv * env, jobject obj,
- jobject buffer, jint bufsize)
- {
- FLACStreamEncoder * encoder = get_encoder(env, obj);
- if (NULL == encoder) {
- aj::throwByName(env, IllegalArgumentException_classname, //aj is namespace
- "Called without a valid encoder instance!");
- return 0;
- }
- /**
- * Throws the given exception/message
- **/
- void throwByName(JNIEnv * env, const char * name, const char * msg)
- {
- jclass cls = env->FindClass(name);
- // If cls is NULL, an exception has already been thrown
- if (NULL != cls) {
- env->ThrowNew(cls, msg);
- // Ignore return value of ThrowNew... all we could reasonably do is try and
- // throw another exception, after all.
- }
- env->DeleteLocalRef(cls);
- }
- sample log on sig 11...
- F/libc ( 2660): Fatal signal 11 (SIGSEGV) at 0x0000000c (code=1), thread 2837 (Thread-1846)
- I/DEBUG ( 95): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
- I/DEBUG ( 95): Build fingerprint: 'samsung/espressowifiue/espressowifi:4.1.1/JRO03C/P3113UECLK7:user/release-keys'
- I/DEBUG ( 95): pid: 2660, tid: 2837, name: Thread-1846 >>> com.borneo.media.stories <<<
- I/DEBUG ( 95): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0000000c
- I/DEBUG ( 95): r0 41b7bb90 r1 000001da r2 1da00001 r3 00000001
- I/DEBUG ( 95): r4 5a337408 r5 00000000 r6 1da00001 r7 00000000
- I/DEBUG ( 95): r8 1da00001 r9 5e16ff6c sl 5e167400 fp 5e7a7c6c
- I/DEBUG ( 95): ip 00000000 sp 5e7a7c10 lr 407aeeef pc 407b0100 cpsr 28000030
- I/DEBUG ( 95): d0 616c63206e692027 d1 273d656d616e2072
- I/DEBUG ( 95): d2 20322e3120434165 d3 373139303730303d
- I/DEBUG ( 95): d4 3bc3198a2e000000 d5 3ba3198a2e000000
- I/DEBUG ( 95): d6 0000000000000000 d7 3ff0000000000000
- I/DEBUG ( 95): d8 0000000000000000 d9 4354000000000000
- I/DEBUG ( 95): d10 0000000042600000 d11 0000000000000000
- I/DEBUG ( 95): d12 0000000000000000 d13 0000000000000000
- I/DEBUG ( 95): d14 0000000000000000 d15 0000000000000000
- I/DEBUG ( 95): d16 3ff0000000000000 d17 3ff0000000000000
- I/DEBUG ( 95): d18 b96377ce858a5d48 d19 3929f5135cb87c55
- I/DEBUG ( 95): d20 0000000000000000 d21 397377ce858a5d48
- I/DEBUG ( 95): d22 3fa555555555554c d23 bcb1a62633145c07
- I/DEBUG ( 95): d24 3f50000000000000 d25 0000000000000000
- I/DEBUG ( 95): d26 0000000000000000 d27 c024000000000000
- I/DEBUG ( 95): d28 0000000000000000 d29 3ff0000000000000
- I/DEBUG ( 95): d30 3ff0000000000000 d31 3ff0000000000000
- I/DEBUG ( 95): scr 80000013
- I/DEBUG ( 95):
- I/DEBUG ( 95): backtrace:
- I/DEBUG ( 95): #00 pc 0004b100 /system/lib/libdvm.so
- I/DEBUG ( 95): #01 pc 00007061 /data/data/com.borneo.media.stories/lib/libaudioboo-native.so
- I/DEBUG ( 95): #02 pc 0001deb0 /system/lib/libdvm.so (dvmPlatformInvoke+112)
- I/DEBUG ( 95): #03 pc 0004d103 /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+394)
- I/DEBUG ( 95): #04 pc 0004f21f /system/lib/libdvm.so (dvmResolveNativeMethod(unsigned int const*, JValue*, Method const*, Thread*)+174)
- I/DEBUG ( 95): #05 pc 000272e0 /system/lib/libdvm.so
- I/DEBUG ( 95): #06 pc 0002bbe8 /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)
- I/DEBUG ( 95): #07 pc 0005f871 /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+272)
- I/DEBUG ( 95): #08 pc 0005f89b /system/lib/libdvm.so (dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)+20)
- I/DEBUG ( 95): #09 pc 00054453 /system/lib/libdvm.so
- I/DEBUG ( 95): #10 pc 00012d20 /system/lib/libc.so (__thread_entry+48)
- I/DEBUG ( 95): #11 pc 00012478 /system/lib/libc.so (pthread_create+172)
- I/DEBUG ( 95):
- I/DEBUG ( 95): stack:
- I/DEBUG ( 95): 5e7a7bd0 41ef8820 /dev/ashmem/dalvik-heap (deleted)
- I/DEBUG ( 95): 5e7a7bd4 4004beb5 /system/lib/libc.so (free+12)
- I/DEBUG ( 95): 5e7a7bd8 00001000
- I/DEBUG ( 95): 5e7a7bdc 35fc5ce2
- I/DEBUG ( 95): 5e7a7be0 00000000
- I/DEBUG ( 95): 5e7a7be4 5e4e6b72 /data/data/com.borneo.media.stories/lib/libaudioboo-native.so
- I/DEBUG ( 95): 5e7a7be8 5e7a7c14
- I/DEBUG ( 95): 5e7a7bec 00000000
- I/DEBUG ( 95): 5e7a7bf0 1da00001
- I/DEBUG ( 95): 5e7a7bf4 5a337408
- I/DEBUG ( 95): 5e7a7bf8 00000000
- I/DEBUG ( 95): 5e7a7bfc 407aeeef /system/lib/libdvm.so (dvmDecodeIndirectRef(Thread*, _jobject*)+34)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement