I think I may have fixed it, I looked around for some information on BroadcastReciever 'onRecieve' routines. I suspected it was that I was spending to much time in this routine, but I couldn't find anything to back this up.

What I have done now is to create a worker thread when the onRecieve is called, this allows the onRecieve to return almost instantly and so far, since doing this I haven't had any problems.

Thank you,
Simon

On 05/06/2011 1:37 PM, Kostya Vasilyev wrote:
Use the logcat to see the stack trace. You might want to run it in a command line window to see it more clearly. The debugging session stops because the broadcast for your alarm times out, and Android kills the process. You could also use Handler.post() / sendMessage() to immediately return control to Android from onReceive / onStart, and then pick up debugging in the dispatch for whatever you posted (Runnable / Message).
Looking at the stack trace is logcat should do it, though.
-- Kostya

2011/6/5 Simon Platten <[email protected] <mailto:[email protected]>>

    I have an alarm service runnining in Android 2.1, there is a
    problem with the service in that for some reason unknown to me it
    starts to exception after a period of time.

    To try and capture the reason why, I have scheduled the service to
    run at 1 second intervals.  I can see in the debugged when the
    exception is raised, but I cannot view it, the debug session stops
    before I have time to analysis the problem, is there something I
    can do to pause the state of the system so I can debug it?

    Thank you,
    Simon
-- You received this message because you are subscribed to the Google
    Groups "Android Developers" group.
    To post to this group, send email to
    [email protected]
    <mailto:[email protected]>
    To unsubscribe from this group, send email to
    [email protected]
    <mailto:android-developers%[email protected]>
    For more options, visit this group at
    http://groups.google.com/group/android-developers?hl=en


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to