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

Not working at all #18

Open
mopsalarm opened this issue Jul 20, 2015 · 3 comments
Open

Not working at all #18

mopsalarm opened this issue Jul 20, 2015 · 3 comments

Comments

@mopsalarm
Copy link

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.

@mopsalarm
Copy link
Author

Looks like it is working on Android 4.1.
Is coffeecatch not supported on android 4.0 or is there some other bug?

@jeaye
Copy link

jeaye commented May 13, 2016

@mopsalarm 4.0 didn't have libcorkscrew, or libunwind. I think there's no support for it.

@mopsalarm
Copy link
Author

But aren't those libraries are just used to get the stacktrace, not for the crash-catching and recovering?

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

2 participants