Discussion Forums  >  Crashes, Memory Warnings

Replies: 8    Views: 134

sipreon
I hate code!
Profile
Posts: 13
Reg: Sep 26, 2012
Ljubljana
3,380
10/13/12 03:47 PM (11 years ago)

App always crashes when pressed home button.

Hello. 1.) So I made an app but sometimes crashes without reason..I mean..when I press a button or a tab it just crashes and says: Unfortunately, the program [name] stopped. 2.) I made some buttons in home menu and when the app doesn't crash and I can open the button it's all fine. But when I press HOME button in top navigation bar to return to the menu it crashes and says: Unfortunately, the program [name] stopped..again. Any help would be nice :) Thank you!
 
Parker @ buzztouch
buzztouch Evangelist
Profile
Posts: 1395
Reg: May 09, 2011
Pacific Grove, ...
24,500
like
10/13/12 04:00 PM (11 years ago)
Hi sipreon, What does the console in Xcode or Eclipse say? There is almost always useful information there.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/13/12 09:26 PM (11 years ago)
Here's a document on basic debug for both platforms to help you answer @Parker's question: https://www.buzztouch.com/files/howtos/Problem_Reporting_and_Basic_Debug_v1.0.pdf Mark
 
sipreon
I hate code!
Profile
Posts: 13
Reg: Sep 26, 2012
Ljubljana
3,380
like
10/14/12 01:07 AM (11 years ago)
http://ge.tt/8vsNFTP/v/0 So here is the LogCat of the app.. The funniest thing is..that the app is not working right in eclipse...but I can compile it and is working properly on my phone (if we take out the crashes). Thanks, Sipreon
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/14/12 01:31 AM (11 years ago)
I think this has to do with the amount of memory/storage allocated to the emulator. Try this: Find the .android folder on your system. That’s where your AVD configuration files are. In my Windows system, it’s located at C:\Documents and Settings\mf\.android\avd\. Open up the <avdname>.avd file and put this line in it : disk.dataPartition.size=2048. What this apparently does it change the size of the partition dedicated to the AVD to 2Gb, which appears to be more than enough for most apps. Let us know if that helps! If not, do a Google search on increasing heap size for your emulator. http://stackoverflow.com/questions/7427587/out-of-memory-error-on-emulator-but-not-on-device Mark
 
sipreon
I hate code!
Profile
Posts: 13
Reg: Sep 26, 2012
Ljubljana
3,380
like
10/14/12 01:38 AM (11 years ago)
Thanks for the answer Mark! Do you possibly know anything about crashing after clicking the Home button in top navigation bar? It was working fine last week but now it always crashes. Thank you!
 
Parker @ buzztouch
buzztouch Evangelist
Profile
Posts: 1395
Reg: May 09, 2011
Pacific Grove, ...
24,500
like
10/14/12 01:40 AM (11 years ago)
In addition to what Mark mentions, check out the file size of the file in your project named, "logo.jpg". That appears to be a very large file based upon the log cat information you linked. I'm thinking a smaller file would do the trick and not trigger any memory issues.
 
sipreon
I hate code!
Profile
Posts: 13
Reg: Sep 26, 2012
Ljubljana
3,380
like
10/14/12 06:26 AM (11 years ago)
Thank you both for help. Now the app works fine in eclipse...but not on the mobile. It still crashes when I press home button in top navigation bar.
 
Parker @ buzztouch
buzztouch Evangelist
Profile
Posts: 1395
Reg: May 09, 2011
Pacific Grove, ...
24,500
like
10/14/12 04:39 PM (11 years ago)
I would double check that you eclipse environment, including your Virtual Device, are properly setup. View this guide to verify: http://www.buzztouch.com/files/howtos/Setting_Up_Your_Android_Development_Environment_v1.3.pdf After that if you're still having issues we will need to se the latest LogCat output to try and sleuth this issue out. Please follow the guide linked above by Mark for help with that.
 

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.