coffeecatch
coffeecatch copied to clipboard
Not working at all
I dont know if I did something wrong, but the library is just not doing anything for me.
jboolean real_vpxGetFrame(JNIEnv *env, struct vpx_wrapper *wrapper, jobject bitmap, jint pixel_skip) {
char *x = 0;
*x = 10;
// other code which is not even ran because of the error above
}
__attribute__ ((noinline))
void protected_vpxGetFrame(JNIEnv *env, struct vpx_wrapper *wrapper, jobject bitmap, jint pixel_skip, jboolean *result) {
COFFEE_TRY_JNI(env, *result=real_vpxGetFrame(env, wrapper, bitmap, pixel_skip));
}
JNIEXPORT jboolean JNICALL
Java_com_pr0gramm_app_vpx_VpxWrapper_vpxGetFrame(JNIEnv *env, jlong wrapper_addr, jobject bitmap, jint pixel_skip) {
struct vpx_wrapper *wrapper = (struct vpx_wrapper*) wrapper_addr;
jboolean result = false;
protected_vpxGetFrame(env, wrapper, bitmap, pixel_skip, &result);
return result;
}
Calling this code just produces this on Android 4.0:
07-20 18:44:24.813 27913-28056/com.pr0gramm.app A/libc﹕ Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1)
I compiled it as a static library and linked it against my shared library. I use APP_CFLAGS := -funwind-tables -Wl,--no-merge-exidx-entries
in my Application.mk... Any Ideas?
Edit: Compiled for armabi-v7a on the sdk emulator.
Looks like it is working on Android 4.1. Is coffeecatch not supported on android 4.0 or is there some other bug?
@mopsalarm 4.0 didn't have libcorkscrew, or libunwind. I think there's no support for it.
But aren't those libraries are just used to get the stacktrace, not for the crash-catching and recovering?