Android crashes + persistent data loss
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
- Arowana
- Miko-Class Veteran
- Posts: 531
- Joined: Thu May 31, 2012 11:17 pm
- Completed: a2 ~a due~
- Projects: AXIOM.01, The Pirate Mermaid
- Organization: Variable X, Navigame
- Tumblr: navigame-media
- itch: navigame
- Contact:
Android crashes + persistent data loss
Hey all! So I've been using RAPT to port Renpy games to Android, but I've been getting a lot of crashes trying to play the games on my phone (I'm using RAPT 6.14.1 and Android 4.1.2, if that matters).
At seemingly random points, the game will simply freeze and shut down (no error messages or anything like that). The crash point doesn't seem to be consistent on different playthroughs, either - on some attempts, I will get further than others. Furthermore, after each crash, all my persistent data seems to disappear (e.g. my unlocked CGs go back to being locked). However, all the save files are somehow still intact.
Does anyone have any idea what might be causing the crashes, or how I can keep the persistent data from being erased when the game does crash?
At seemingly random points, the game will simply freeze and shut down (no error messages or anything like that). The crash point doesn't seem to be consistent on different playthroughs, either - on some attempts, I will get further than others. Furthermore, after each crash, all my persistent data seems to disappear (e.g. my unlocked CGs go back to being locked). However, all the save files are somehow still intact.
Does anyone have any idea what might be causing the crashes, or how I can keep the persistent data from being erased when the game does crash?
Complete: a2 ~a due~ (music, language, love)
In progress: The Pirate Mermaid (fairytale otome)
On hold: AXIOM.01 (girl detective game)
In progress: The Pirate Mermaid (fairytale otome)
On hold: AXIOM.01 (girl detective game)
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Android crashes + persistent data loss
What kind of phone is it? Can you get any logcat output when it happens?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
- Arowana
- Miko-Class Veteran
- Posts: 531
- Joined: Thu May 31, 2012 11:17 pm
- Completed: a2 ~a due~
- Projects: AXIOM.01, The Pirate Mermaid
- Organization: Variable X, Navigame
- Tumblr: navigame-media
- itch: navigame
- Contact:
Re: Android crashes + persistent data loss
Thanks for the speedy reply, PyTom! My phone is a Nexus S, though someone with a Xperia J has reported a similar-sounding problem with the same game. And pardon my n00bness, but how do I get logcat output?
We also got a crash report (R800at phone) on Google Play, but I'm not sure if it's the same problem from their description. The stack trace reads "java.lang.UnsatisfiedLinkError: Couldn't load sdl: findLibrary returned null," if that helps.
We also got a crash report (R800at phone) on Google Play, but I'm not sure if it's the same problem from their description. The stack trace reads "java.lang.UnsatisfiedLinkError: Couldn't load sdl: findLibrary returned null," if that helps.
Complete: a2 ~a due~ (music, language, love)
In progress: The Pirate Mermaid (fairytale otome)
On hold: AXIOM.01 (girl detective game)
In progress: The Pirate Mermaid (fairytale otome)
On hold: AXIOM.01 (girl detective game)
- jack_norton
- Lemma-Class Veteran
- Posts: 4085
- Joined: Mon Jul 21, 2008 5:41 pm
- Completed: Too many! See my homepage
- Projects: A lot! See www.winterwolves.com
- Tumblr: winterwolvesgames
- Contact:
Re: Android crashes + persistent data loss
I had a lots of reports for Nexus and the Samsung phones, my guess is that in many cases it could be a memory/texture size error. Though it really seems a problem of the incredible device fragmentation more than Ren'Py.
Some examples of crashes I got:
I also had frequent report of people complaining the game wasn't downloaded correctly, but the download comes from Google servers so for sure it's their connection. So I think many bugs could just be that the file wasn't downloaded correctly and/or was corrupted.
In summary, a bit of a hell to debug/know what to fix
Some examples of crashes I got:
Code: Select all
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.winterwolves.winterinfairbrookdemo/org.renpy.android.PythonActivity}: java.lang.ClassNotFoundException: org.renpy.android.PythonActivity
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1880)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
at android.app.ActivityThread.access$600(ActivityThread.java:123)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: org.renpy.android.PythonActivity
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871)
... 11 more
Code: Select all
java.lang.UnsatisfiedLinkError: Cannot load library: load_library[1107]: Library '/data/data/com.winterwolves.alwaysremembermedemo/files/_io.so' not found
at java.lang.Runtime.load(Runtime.java:394)
at java.lang.System.load(System.java:534)
at org.renpy.android.PythonActivity.run(PythonActivity.java:171)
at java.lang.Thread.run(Thread.java:1019)
Code: Select all
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.winterwolves.alwaysremembermedemo/org.renpy.android.PythonActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
at android.app.ActivityThread.access$2300(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at org.renpy.android.PythonActivity.onCreate(PythonActivity.java:74)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
... 11 more
Code: Select all
java.lang.IllegalArgumentException: Make sure the SurfaceView or associated SurfaceHolder has a valid Surface
at com.google.android.gles_jni.EGLImpl._eglCreateWindowSurface(Native Method)
at com.google.android.gles_jni.EGLImpl.eglCreateWindowSurface(EGLImpl.java:90)
at org.renpy.android.SDLSurfaceView.createSurface(SDLSurfaceView.java:509)
at org.renpy.android.SDLSurfaceView.run(SDLSurfaceView.java:291)
at java.lang.Thread.run(Thread.java:856)
In summary, a bit of a hell to debug/know what to fix
Re: Android crashes + persistent data loss
You should get OutOfMemoryError and RuntimeException:EGL_BAD_ALLOC when you run out of application/texture memory. These errors seem unrelated to that.
- jack_norton
- Lemma-Class Veteran
- Posts: 4085
- Joined: Mon Jul 21, 2008 5:41 pm
- Completed: Too many! See my homepage
- Projects: A lot! See www.winterwolves.com
- Tumblr: winterwolvesgames
- Contact:
Re: Android crashes + persistent data loss
Hmm yes true. I had really strange bug though, for example a JPEG loading error, that I fixed resaving a JPG with progressive scan. The only solution would be to have the most problematic devices (like the Samsung) and test the games directly...
- Arowana
- Miko-Class Veteran
- Posts: 531
- Joined: Thu May 31, 2012 11:17 pm
- Completed: a2 ~a due~
- Projects: AXIOM.01, The Pirate Mermaid
- Organization: Variable X, Navigame
- Tumblr: navigame-media
- itch: navigame
- Contact:
Re: Android crashes + persistent data loss
I'm happy to test on my Nexus, if it will help! Jack, I tried playing one of your games (Winter in Fairbrook demo), and I got a similar crashing problem as with my game. In both cases, though, I don't get prompted for a crash report. The game just freezes, then shuts down without any error messages.
If the crashes can't be helped, is there any way to at least keep persistent data from being erased? The save files seem to survive at least, and I thought both save games and persistent data were stored in the same location? Though maybe it's different in Android...
If the crashes can't be helped, is there any way to at least keep persistent data from being erased? The save files seem to survive at least, and I thought both save games and persistent data were stored in the same location? Though maybe it's different in Android...
Complete: a2 ~a due~ (music, language, love)
In progress: The Pirate Mermaid (fairytale otome)
On hold: AXIOM.01 (girl detective game)
In progress: The Pirate Mermaid (fairytale otome)
On hold: AXIOM.01 (girl detective game)
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Android crashes + persistent data loss
If you can get a logcat of an actual crash, I'd appreciate it.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
- Arowana
- Miko-Class Veteran
- Posts: 531
- Joined: Thu May 31, 2012 11:17 pm
- Completed: a2 ~a due~
- Projects: AXIOM.01, The Pirate Mermaid
- Organization: Variable X, Navigame
- Tumblr: navigame-media
- itch: navigame
- Contact:
Re: Android crashes + persistent data loss
Ah sorry, I only just figured out how to get the logcat.
When I do Python output only, I got something like this:
http://lemmasoft.renai.us/forums/viewto ... 75#p201238
Basically, it says it's logging to log.txt and nothing happens after that, even when the game crashes.
I'm attaching what I got from adb logcat around the time the game crashed. Not sure how to filter what is important, but this is the section that had the application name (a2.mobile).
When I do Python output only, I got something like this:
http://lemmasoft.renai.us/forums/viewto ... 75#p201238
Basically, it says it's logging to log.txt and nothing happens after that, even when the game crashes.
I'm attaching what I got from adb logcat around the time the game crashed. Not sure how to filter what is important, but this is the section that had the application name (a2.mobile).
Code: Select all
W/InputDispatcher( 248): channel '41cf5840 a2.mobile/org.renpy.android.PythonAc
tivity (server)' ~ Consumer closed input channel or an error occurred. events=0
x9
E/InputDispatcher( 248): channel '41cf5840 a2.mobile/org.renpy.android.PythonAc
tivity (server)' ~ Channel is unrecoverably broken and will be disposed!
I/WindowState( 248): WIN DEATH: Window{41afb738 SurfaceView paused=false}
I/ActivityManager( 248): Process a2.mobile:python (pid 8873) has died.
W/ActivityManager( 248): Force removing ActivityRecord{41cdb678 a2.mobile/org.r
enpy.android.PythonActivity}: app died, no saved state
W/InputDispatcher( 248): Attempted to unregister already unregistered input cha
nnel '41cf5840 a2.mobile/org.renpy.android.PythonActivity (server)'
I/WindowState( 248): WIN DEATH: Window{41cf5840 a2.mobile/org.renpy.android.Pyt
honActivity paused=false}
I/WindowManager( 248): WINDOW DIED Window{41cf5840 a2.mobile/org.renpy.android.
PythonActivity paused=false}
- Attachments
-
- crash6_5_13.txt
- (17.34 KiB) Downloaded 98 times
Complete: a2 ~a due~ (music, language, love)
In progress: The Pirate Mermaid (fairytale otome)
On hold: AXIOM.01 (girl detective game)
In progress: The Pirate Mermaid (fairytale otome)
On hold: AXIOM.01 (girl detective game)
- badspeler
- Regular
- Posts: 46
- Joined: Fri Jun 17, 2011 9:06 am
- Completed: Aris High Visual Novel, PQRS the Game
- Projects: Aris High Visual Novel
- Organization: Sotong Games
- Contact:
Re: Android crashes + persistent data loss
Code: Select all
java.lang.NullPointerException
at org.renpy.android.SDLSurfaceView.run(SDLSurfaceView.java:658)
at java.lang.Thread.run(Thread.java:1019)
All old versions of android, so presumably old phones and hardware: Android 2.3.3 - 2.3.7. I'm guessing a workaround is just to set a higher android requirement for my app if the problem is one of insufficient memory and horsepower...
Games: Aris High Visual Novel (for Android), PQRS
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Android crashes + persistent data loss
I have an idea.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Who is online
Users browsing this forum: Google [Bot]