The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
sdl2.0. SDL_RWseek to End crashes on android 4
Dennis Muratshin
Guest

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 at least on Android 2.3 and crashing on android 4.0.3
File exists and handle is valid.


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)
Re: sdl2.0. SDL_RWseek to End crashes on android 4
gabomdq


Joined: 28 Jul 2011
Posts: 495
Location: Argentina
Dennis Muratshin wrote:
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 at least on Android 2.3 and crashing on android 4.0.3
File exists and handle is valid.


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)


Can you try out the patch I've uploaded to http://bugzilla.libsdl.org/show_bug.cgi?id=1500 ?