Hi,
I opened file with SDL_RWFromFile from APK and tried to get it size with:
SDL_RWseek(fh, 0, RW_SEEK_END);
It’s working everywhere except android 4
03-23 12:19:54.464: E/dalvikvm(563): JNI ERROR (app bug): accessed stale
local reference 0x1d200029 (index 10 in a table of size 3)
03-23 12:19:54.464: W/dalvikvm(563): JNI WARNING: 0x1d200029 is not a valid
JNI reference
03-23 12:19:54.464: W/dalvikvm(563): in
Lorg/libsdl/app/SDLActivity;.nativeInit:()V (CallIntMethodV)
I added some traces and found out that app crashes in Android_JNI_FileRead
at this line:
int result = mEnv->CallIntMethod(readableByteChannel, readMethod,
byteBuffer);
I don’t understand all this JNI magic code, but found this article:
<http://android-developers.blogspot.com/2011/11/jni-local-reference-changes-
in-ics.html>
http://android-developers.blogspot.com/2011/11/jni-local-reference-changes-i
n-ics.html
Who may fix this bug?