Skip to content

Strange ndk/jni error

This is largely a note for myself: Had an error where the jni code was segfaulting after it returned on android 4.0 but not previous versions, with an error like this: JNI ERROR (app bug): accessed stale weak global reference 0x2b (index 10 in a table of size 0)

Turned out to be that the method was defined as returning a byte[] array in the java code, but the c++ code was set to return a void. Somehow, this worked on previous versions!

Posted in Uncategorized.

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

or, reply to this post via trackback.