Discussion Forums  >  Crashes, Memory Warnings

Replies: 8    Views: 197

Ejaaz
I hate code!
Profile
Posts: 15
Reg: Aug 27, 2011
India
150
05/19/13 12:20 AM (10 years ago)

Menu with Image sometime crashes & sometimes work perfectly

Hi Everybody I have made an app and used Menu with Image. The screen sometimes opens and sometimes directly closes the app without opening and without any notification. I have Android 4.1.2. It is working fine with version 2.3.... Pl. can anybody sort out this problem.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
05/19/13 03:21 AM (10 years ago)
I'm not sure if the crash is indicative of the menu_with_image plugin. I've had similar experiences happen whether I used that as my menu, some other menu, or no menu at all. What I have found, is that if your app requires a resource (gps signal, network connection, url from the net, whatever...), and one isn't available at the time your app launches, it may crash. It's never been consistent enough to completely track down, so I've just chalked it up to Android Weirdness. I'm compiling for v2.2+, but I'm testing it on a Jellybean device (my Android Galaxy Tablet). However, my apps haven't crashed enough for folks to complain about. Yet. Cheers! -- Smug
 
WolfTimJ
buzztouch Evangelist
Profile
Posts: 810
Reg: Feb 20, 2011
Rockwall, TX
17,400
like
05/19/13 05:53 AM (10 years ago)
I have found that some app killers leave something in memory to cause this behavior. While it appears all the data associated with the killed app is also cleared, it is not. Everytime I use the Android settings application manager to kill the app and clear the cache the crashing goes away on next start. I started putting a note in all my apps in Google Play about app killers causing intermittent crashes.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
05/19/13 08:09 AM (10 years ago)
Also, Android runs into memory issues at a much higher frequency than does Apple. The same images that work flawlessly in iOS will cause a consistent crash in Android. Be sure you are using PNG-8 images wherever possible. If you have to go higher, use PNG-24. Unfortunately, this will happen regardless of the device, too. Android only allocates a few megabytes of memory to each application, and most of that is taken up by the core application processes. Try to load an image that's a couple megabytes in size and you won't get very far. I've also noticed that the Garbage Collection (the process of clearing out the memory when it gets too full) is not great at all. In my opinion, if I load a screen that takes up most of the memory and then switch to a new screen that will fill up the remaining memory, the first screen should automatically and without fail be dumped from memory. But that doesn't always happen - and so we get crashes. There are two reasons why I prefer iOS over Android - this is one of them. (The other is ease of design on iOS due to a very limited number of screen dimensions). But, we live in an Android world...
 
Worker73
Android Fan
Profile
Posts: 419
Reg: Feb 06, 2012
Austria, Klagen...
4,490
like
05/19/13 11:27 AM (10 years ago)
Hi... The Problem is The Imagesize.... Just make ist 320 Pixels instead of 1500.... Then ist Works in Android... Also with PNG24 with Transmap....
 
Ejaaz
I hate code!
Profile
Posts: 15
Reg: Aug 27, 2011
India
150
like
05/20/13 11:17 AM (10 years ago)
Hi everybody. Thanks a lot for all your solutions. The problem is now solved. I have done as said by Worker73 and it is solved. I am also satisfied with Chris1. I think the problem was with the High quality Image which android cannot allocate into memory hence it crashes. I used 320 pixel images and now it worked fine. Thanks a lot to everybody for sharing their solutions.
 
Worker73
Android Fan
Profile
Posts: 419
Reg: Feb 06, 2012
Austria, Klagen...
4,490
like
05/20/13 11:19 AM (10 years ago)
You are welcome...
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
05/20/13 01:05 PM (10 years ago)
Glad you got it working! :)
 
Arubaman
Aspiring developer
Profile
Posts: 636
Reg: Oct 20, 2011
Akron
16,910
like
05/24/13 08:57 PM (10 years ago)
I had a png that wasnt converted correctly and it would also always crash in android, it had me confused for quite a while.
 

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.