-3

I don't know how to debug this because it's not a typical crash, and I can't get a stack trace. Sometimes, the OS just restarts itself. Other times, I have to take out the battery,

It happens, some of the time, when the user clicks on the button to take a picture. This button calls takePicture() which simply makes an intent, puts the data (JPEG) into an extra, and then calls startActivity(intent);

I don't have any extra thread stuff happening. Could a need of those be causing the OS to lock up? Or could it be a lack of memory? I don't know how to begin troubleshooting this.

Thanks

Edit: Also, when the freeze occurs, if I plug my phone back in there are dozens of instances of my app running for some reason.

  • 1
    with no code you probably wont get an answer – tyczj May 27 '14 at 13:59
  • Is this a problem with your app triggering these freezes, or with your device in general? If the latter, the [Android Enthusiast](http://android.stackexchange.com/) Stack Exchange site is more appropriate than Stack Overflow. – thegrinner May 27 '14 at 14:02
  • It's a problem with my particular app I'm developing. – user2581666 May 27 '14 at 14:18
  • try it in different devices if it behaves the same then (freezes) then you know for sure that there is something wrong in your code I have some android mobile that crashes even for simple apps due to lack of ram – Illegal Argument May 27 '14 at 14:36

2 Answers2

0

You can use LogCat in Eclipse and write logs after every line of code. This will probably help you:

http://developer.android.com/tools/debugging/debugging-log.html

You can log using the following command:

Log.i("MyActivity", "A relevant comment");

It is also useful to put a filter in LogCat with "MyActivity" as the Log Tag.

Cydrick Trudel
  • 9,957
  • 8
  • 41
  • 63
0

You can simply debug it and find out which line is causing it. Usually when phone get freezes it is because a wrong use in a native component - like Camera, MediaPlayer, etc..

try to comment the initialization / reset method to check if your app still freezes.

Nativ
  • 3,092
  • 6
  • 38
  • 69