chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
11/16/12 05:54 PM (13 years ago)

Android app crashing due to memory errors

My Android app (The Text This Week) seems to be having problems on some Android users' devices where it will hang/crash at various points from the splash screen to different screens in-app. For the one person I spoke with, she's using a Samsung Galaxy 3 and can never get very far in the app. The app consists of a few menu screens and a few custom URL screens. I had to do much more in mobile html on Android than I was able to do on iOS because I noticed memory issues right away when I tried to have dozens of menu screens. But now I seem to be scaled down about as far as I can go. Do other people have this issue with your Android apps? What can be done? Thanks, Chris
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
11/16/12 09:29 PM (13 years ago)
I was able to generate an error report after I reproduced the issue on my test device. I'm not sure it is a memory issue after all, but I don't know what it might be. Here's the error report: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.textweek/com.textweek.WB_screen_menuImage}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1830) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1851) at android.app.ActivityThread.access$1500(ActivityThread.java:132) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1038) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:150) at android.app.ActivityThread.main(ActivityThread.java:4293) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:507) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException at com.textweek.BT_viewUtilities.updateBackgroundColorsForScreen(BT_viewUtilities.java:35) at com.textweek.WB_screen_menuImage.onCreate(WB_screen_menuImage.java:111) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1072) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1794)
 
Iaxia
I hate code!
Profile
Posts: 108
Reg: Feb 04, 2012
Toronto
7,080
like
11/16/12 10:37 PM (13 years ago)
My Android app was crashing all the time with similar error messages. I seemed to have resolved the issue by removing the images from the menu rows. My images exceeded the 100*100 pixel size recommended by the plugin developer, so perhaps that was tripping things up....???
 
Iaxia
I hate code!
Profile
Posts: 108
Reg: Feb 04, 2012
Toronto
7,080
like
11/16/12 10:39 PM (13 years ago)
Sorry, not similar error messages (I don't have the log handy) but the description of the program crash is similar.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
11/16/12 10:41 PM (13 years ago)
I think it may be due to not having the most recent package. I'm trying that now after reading this thread: http://www.buzztouch.com/forum/thread.php?tid=8B5CBFBAAAA9373BB96B9E7&currentPage=1
 
Iaxia
I hate code!
Profile
Posts: 108
Reg: Feb 04, 2012
Toronto
7,080
like
11/17/12 11:48 AM (13 years ago)
Glad you got it sorted out. My source code was downloaded after the fix was implemented and it was still crashing. After replacing the icons with the reduced dimensions the crashing has since stopped. Not sure if the file replacement was thing that solved the problem...or it was Android, just being Android.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.