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
strange android bug
Alexey Petruchik
Guest

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? 
strange android bug
Simon Sandström
Guest

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:
Quote:
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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

strange android bug
Alexey Petruchik
Guest

Here is the full log - https://gist.github.com/stopiccot/ddafa2081ce458347f90File exists. It crashes randomly from time to time



On Thu, Aug 28, 2014 at 5:27 PM, Simon Sandström wrote:
Quote:
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:
Quote:
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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

strange android bug
MrOzBarry


Joined: 26 Jun 2010
Posts: 620
I'd it only happens randomly, it may be a thread race condition On 28 Aug 2014 10:55, "Alexey Petruchik" wrote:
Quote:
Here is the full log - https://gist.github.com/stopiccot/ddafa2081ce458347f90File exists. It crashes randomly from time to time



On Thu, Aug 28, 2014 at 5:27 PM, Simon Sandström wrote:
Quote:
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:
Quote:
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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

strange android bug
gabomdq


Joined: 28 Jul 2011
Posts: 495
Location: Argentina
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:
Quote:
Here is the full log - 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 wrote:
Quote:
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:
Quote:
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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





--
Gabriel.
strange android bug
Alexey Petruchik
Guest

********** 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 (_Z20dvmDecodeIndirectRefP6ThreadP8_jobject)
Stack frame #02  pc 0005865e  /system/lib/libdvm.so
Stack frame #03  pc 000b9e00  /data/data/com.deemedya.ChamAmazon/lib/libSDL2.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/libSDL2.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/libSDL2.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/libSDL2.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 wrote:
Quote:
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:
Quote:
Here is the full log - 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 wrote:
Quote:
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:
Quote:
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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org







--
Gabriel.



_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

strange android bug
Alexey Petruchik
Guest

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 wrote:
Quote:
********** 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 (_Z20dvmDecodeIndirectRefP6ThreadP8_jobject)
Stack frame #02  pc 0005865e  /system/lib/libdvm.so
Stack frame #03  pc 000b9e00  /data/data/com.deemedya.ChamAmazon/lib/libSDL2.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/libSDL2.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/libSDL2.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/libSDL2.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 wrote:
Quote:
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:
Quote:
Here is the full log - 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 wrote:
Quote:
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:
Quote:
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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org







--
Gabriel.



_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org






strange android bug
hardcoredaniel
Guest

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:

1. (if not already in place) Run with CheckJNI enabled:

http://android-developers.blogspot.de/2011/07/debugging-android-jni-with-checkjni.html

2. 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.

3. 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
Komu: SDL Development List
Datum: 28. 8. 2014 19:10:12
Předmět: Re: [SDL] strange android bug
Quote:
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 wrote:
Quote:
********** 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 (_Z20dvmDecodeIndirectRefP6ThreadP8_jobject)
Stack frame #02 pc 0005865e /system/lib/libdvm.so
Stack frame #03 pc 000b9e00 /data/data/com.deemedya.ChamAmazon/lib/libSDL2.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/libSDL2.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/libSDL2.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/libSDL2.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 wrote:
Quote:
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:
Quote:
Here is the full log - 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 wrote:
Quote:
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:
Quote:
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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org








--
Gabriel.



_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org










_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
strange android bug
Sam Lantinga


Joined: 10 Sep 2009
Posts: 1765
Also make sure your copy of SDLActivity.java matches the version of SDL you're using.


On Fri, Aug 29, 2014 at 4:05 AM, hardcoredaniel wrote:
Quote:
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:

1. (if not already in place) Run with CheckJNI enabled:

http://android-developers.blogspot.de/2011/07/debugging-android-jni-with-checkjni.html

2. 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.

3. 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
Komu: SDL Development List
Datum: 28. 8. 2014 19:10:12
Předmět: Re: [SDL] strange android bug
Quote:
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 wrote:
Quote:
********** 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 (_Z20dvmDecodeIndirectRefP6ThreadP8_jobject)
Stack frame #02  pc 0005865e  /system/lib/libdvm.so
Stack frame #03  pc 000b9e00  /data/data/com.deemedya.ChamAmazon/lib/libSDL2.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/libSDL2.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/libSDL2.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/libSDL2.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 wrote:
Quote:
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:
Quote:
Here is the full log - 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 wrote:
Quote:
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:
Quote:
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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org








--
Gabriel.



_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org










_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org




_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

strange android bug
Alexey Petruchik
Guest

It matches but I think adding a check that verifies version in java code would great. I had a headache few times when I forgot to update java class after updating C code.


On Fri, Aug 29, 2014 at 6:03 PM, Sam Lantinga wrote:
Quote:
Also make sure your copy of SDLActivity.java matches the version of SDL you're using.


On Fri, Aug 29, 2014 at 4:05 AM, hardcoredaniel wrote:
Quote:
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:

1. (if not already in place) Run with CheckJNI enabled:

http://android-developers.blogspot.de/2011/07/debugging-android-jni-with-checkjni.html

2. 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.

3. 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
Komu: SDL Development List
Datum: 28. 8. 2014 19:10:12
Předmět: Re: [SDL] strange android bug
Quote:
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 wrote:
Quote:
********** 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 (_Z20dvmDecodeIndirectRefP6ThreadP8_jobject)
Stack frame #02  pc 0005865e  /system/lib/libdvm.so
Stack frame #03  pc 000b9e00  /data/data/com.deemedya.ChamAmazon/lib/libSDL2.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/libSDL2.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/libSDL2.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/libSDL2.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 wrote:
Quote:
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:
Quote:
Here is the full log - 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 wrote:
Quote:
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:
Quote:
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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org








--
Gabriel.



_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org










_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org




_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org







_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

strange android bug
Sam Lantinga


Joined: 10 Sep 2009
Posts: 1765
I agree.


On Tue, Sep 2, 2014 at 3:19 AM, Alexey Petruchik wrote:
Quote:
It matches but I think adding a check that verifies version in java code would great. I had a headache few times when I forgot to update java class after updating C code.


On Fri, Aug 29, 2014 at 6:03 PM, Sam Lantinga wrote:
Quote:
Also make sure your copy of SDLActivity.java matches the version of SDL you're using.


On Fri, Aug 29, 2014 at 4:05 AM, hardcoredaniel wrote:
Quote:
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:

1. (if not already in place) Run with CheckJNI enabled:

http://android-developers.blogspot.de/2011/07/debugging-android-jni-with-checkjni.html

2. 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.

3. 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
Komu: SDL Development List
Datum: 28. 8. 2014 19:10:12
Předmět: Re: [SDL] strange android bug
Quote:
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 wrote:
Quote:
********** 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 (_Z20dvmDecodeIndirectRefP6ThreadP8_jobject)
Stack frame #02  pc 0005865e  /system/lib/libdvm.so
Stack frame #03  pc 000b9e00  /data/data/com.deemedya.ChamAmazon/lib/libSDL2.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/libSDL2.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/libSDL2.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/libSDL2.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 wrote:
Quote:
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:
Quote:
Here is the full log - 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 wrote:
Quote:
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:
Quote:
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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org








--
Gabriel.



_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org










_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org




_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org







_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org







_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org