views:

71

answers:

2

Ive developed some app for Android, the Weirdthing that on the emulator it's pretty stable, but when i tryied on real device of a friend(nexus), it crushes times to times, cant finger on a specific case when exaclly it happens. i realy want to distribute the app asap, but i cant find any leaks in my emulator.. what I should do? how can i debug my app and find the reasons for it to get crush on real device..

Thanks, Idan

+3  A: 

Plug the Nexus One into your PC, and view the stack trace when the app crashes. If you want to know why your app is crashing you've got to get to those stack traces.

mbaird
as mBaird said plug it in and watch the log cat, it will tell you exactly whats happening
Donal Rafferty
i`am looking at the stack trace via the logcat right?
rayman
Yes view it via LogCat
mbaird
too bad i cant have the device yet, hope ill get it soon so i can test on itPlease check this question of mine, and tell me if that could also be a good reason for memory leaks..http://stackoverflow.com/questions/2253088/passing-activity-to-non-activity-object-properly
rayman
+2  A: 

You can tell your friend to download http://code.google.com/p/android-log-collector/ from the Android market and run it right after a crash. It'll give him an option to share his recent logcat in various ways.

Some things may be private to him (like what programs he has ran) so he can email it to himself and forward you just the parts about your app.

sargas
Thanks, but couldnt be also some stuff i can look at my logcat that might hint for some crush on a real device? like many allocation problems... he told me there are leak of threads.. i dont know even where to start in order to check it.. i have couple of threads.. but how could they have a leak?Thanks.
rayman
What do you mean leak of threads? I don't know what to tell you without knowing why he thinks that there's a problem because of that.
sargas
Maybe I should add, the log collector *will* get the output of doing logcat, but it can be run after-the-fact and he doesn't need to be connected to a computer.
sargas