Hi,
I would not assume that it’s an out of memory case you are running into.
There are other possibilities for a failure.
I suggest the following to narrow down the issue:
- (if not already in place) Run with CheckJNI enabled:
http://android-developers.blogspot.de/2011/07/debugging-android-jni-with-
checkjni.html
-
Look at the log messages shortly before the crash. Sometimes Android
informs you about the JNI error before it forcibly terminates the VM, as is
the case here.
-
Split the line in two, so you can actually check the return value from
(*mEnv)->GetObjectClass(mEnv, context)
which is of type “jclass”, and should not be NULL.
It is possible that your JNIEnv* and/or your jobject reference is not valid
in the thread that you are calling the function that crashes.
Regards,
Daniel
---------- P?vodn? zpr?va ----------
Od: Alexey Petruchik <alexey.petruchik at gmail.com>
Komu: SDL Development List
Datum: 28. 8. 2014 19:10:12
P?edm?t: Re: [SDL] strange android bug
"
But I’m not sure if it?GetMethodID() that causes a crash or?GetObjectClass()On Thu, Aug 28, 2014 at 7:05 PM, Alexey Petruchik <alexey.petruchik at gmail. com(mailto:alexey.petruchik at gmail.com)> wrote:
"
********** Crash dump: **********
Build fingerprint: ‘Android/tate/tate:4.0.3/IML74K/7.4.9_user_4952320:user/
release-keys’
pid: 28245, tid: 28287 ?>>> com.deemedya.ChamAmazon <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadd00d
Stack frame #00 ?pc 00050a4e ?/system/lib/libdvm.so (dvmAbort)
Stack frame #01 ?pc 000556dc ?/system/lib/libdvm.so (_Z20
dvmDecodeIndirectRefP6ThreadP8_jobject)
Stack frame #02 ?pc 0005865e ?/system/lib/libdvm.so
Stack frame #03 ?pc 000b9e00 ?/data/data/com.deemedya.ChamAmazon/lib/libSDL
2.so: Routine Internal_Android_JNI_FileOpen at …/android-sdl/jni/SDL/src/
core/android/SDL_android.c:720
Stack frame #04 ?pc 000ba63c ?/data/data/com.deemedya.ChamAmazon/lib/libSDL
2.so (Android_JNI_FileOpen): Routine Android_JNI_FileOpen at …/android-
sdl/jni/SDL/src/core/android/SDL_android.c:870
Stack frame #05 ?pc 000db060 ?/data/data/com.deemedya.ChamAmazon/lib/libSDL
2.so (SDL_RWFromFile_REAL): Routine SDL_RWFromFile_REAL at …/android-sdl/
jni/SDL/src/file/SDL_rwops.c:499
Stack frame #06 ?pc 000ca63c ?/data/data/com.deemedya.ChamAmazon/lib/libSDL
2.so (SDL_RWFromFile): Routine SDL_RWFromFile at …/android-sdl/jni/SDL/
src/dynapi/SDL_dynapi_procs.h:386
line 720 for me is:
mid = (*mEnv)->GetMethodID(mEnv, (*mEnv)->GetObjectClass(mEnv, context),
? ? ? ? ? ? “getAssets”, “()Landroid/content/res/AssetManager;”);
Btw, I’m also suspecting out of memory issues, but is it normal for android
OS to just crash in libdvm.so when app is running out of memory istead of
killing whole app?
On Thu, Aug 28, 2014 at 6:18 PM, Gabriel Jacobo <gabomdq at gmail.com (mailto:gabomdq at gmail.com)> wrote:
"
Can you run addr2line and see what line crashes (the process is described in
the Android docs) ?
Could you be running out of memory?
2014-08-28 11:55 GMT-03:00 Alexey Petruchik <alexey.petruchik at gmail.com
(mailto:alexey.petruchik at gmail.com)>:
"
Here is the full log -?https://gist.github.com/stopiccot/ddafa2081ce458347f
90(https://gist.github.com/stopiccot/ddafa2081ce458347f90)
File exists. It crashes randomly from time to time
On Thu, Aug 28, 2014 at 5:27 PM, Simon Sandstr?m <gurka at acc.umu.se (mailto:gurka at acc.umu.se)> wrote:
"
Do you have any more logs? What is it trying to do, open and read a file?
Maybe the file doesn’t exist?
2014-08-28 16:17 GMT+02:00 Alexey Petruchik <alexey.petruchik at gmail.com
(mailto:alexey.petruchik at gmail.com)>:
"
Sometimes my android game (amazon version) crashes with very strange stack:
08-28 17:13:52.263 I/DEBUG ? ( ?581): ? ? ? ? ?#00 ?pc 00050a8e ?/system/
lib/libdvm.so (dvmAbort)
08-28 17:13:52.263 I/DEBUG ? ( ?581): ? ? ? ? ?#01 ?pc 0005571c ?/system/
lib/libdvm.so (_Z20dvmDecodeIndirectRefP6ThreadP8_jobject)
08-28 17:13:52.263 I/DEBUG ? ( ?581): ? ? ? ? ?#02 ?pc 0005869e ?/system/
lib/libdvm.so
08-28 17:13:52.263 I/DEBUG ? ( ?581): ? ? ? ? ?#03 ?pc 000b9e00 ?/data/data/
com.deemedya.ChamAmazon/lib/libSDL2.so
08-28 17:13:52.263 I/DEBUG ? ( ?581): ? ? ? ? ?#04 ?pc 000ba63c ?/data/data/
com.deemedya.ChamAmazon/lib/libSDL2.so (Android_JNI_FileOpen)
08-28 17:13:52.263 I/DEBUG ? ( ?581): ? ? ? ? ?#05 ?pc 000db060 ?/data/data/
com.deemedya.ChamAmazon/lib/libSDL2.so (SDL_RWFromFile_REAL)
08-28 17:13:52.263 I/DEBUG ? ( ?581): ? ? ? ? ?#06 ?pc 000ca63c ?/data/data/
com.deemedya.ChamAmazon/lib/libSDL2.so (SDL_RWFromFile)
Any ideas what could cause this crash??
SDL mailing list
SDL at lists.libsdl.org(mailto:SDL at lists.libsdl.org)
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
(http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
"
SDL mailing list
SDL at lists.libsdl.org(mailto:SDL at lists.libsdl.org)
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
(http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
"
SDL mailing list
SDL at lists.libsdl.org(mailto:SDL at lists.libsdl.org)
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
(http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
"
–
Gabriel.
SDL mailing list
SDL at lists.libsdl.org(mailto:SDL at lists.libsdl.org)
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
(http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
"
"
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org"