1

I'm writing an application. It has a Service which is started using a receiver of android.intent.action.BOOT_COMPLETED.

One of my app's users is reporting a strange problem (by the way, he is using LG Optimus One device with original 2.2 firmware) - after some interactions with my app (adding some data to a database which is used somehow by a Service) and after that resetting a device (hardware off and then on) device is going to infinite reboot just after 10 second after start.

I think this crash-n-restart is related to my app or it's service ('cause there is not such crash after hard-reset and using a phone without my app).

The question is.

  1. Is there any known bugs with LG Optimus One related to on-boot-starting a crashing service?
  2. How can i catch this bug? Is adb logcat is suitable here (is logcat is accessible right after the phone is powered on, when the BOOT_COMPLETED broadcast is sent?)
  3. I there any other debug techniques which i can use in my case?
Olegas
  • 10,349
  • 8
  • 51
  • 72
  • So can you recreate this locally, or are you talking about debugging it with a remote user / through the android market stack dump interface? – Blundell Mar 31 '11 at 12:16
  • I can recreate it locally. I just can build some special version with extensive debugging and send it directly to user having this crash. He can't send me a dump through a market cause' his phone is totally unusable, going to reboot just after the start. – Olegas Mar 31 '11 at 13:36

1 Answers1

1

1) Don't know

2) Could you do this, works in an Activity not sure about service:

public void onCreate(){
 Thread.setDefaultUncaughtExceptionHandler(onBlooey);
}

private Thread.UncaughtExceptionHandler onBlooey = new Thread.UncaughtExceptionHandler() {
            public void uncaughtException(Thread thread, Throwable ex) {

                    Log.e(TAG, "MAINPAGE Thread Uncaught exception", ex);
                    // Do what ever you want maybe send this exception to a dump file on the SD

            }
    };

3) The above

There is also this project on Remotely log unhandled exceptions in your Android applications.: http://code.google.com/p/android-remote-stacktrace/

EDIT

This answer could be helpful to you: How do I obtain crash-data from my Android application?

Community
  • 1
  • 1
Blundell
  • 75,855
  • 30
  • 208
  • 233