You can look at /data/anr/traces.txt to find the stack crawl of you main thread when the ANR happened.
On Sun, Jun 21, 2009 at 4:26 PM, [email protected] < [email protected]> wrote: > > Hi All, > > Can anybody explain to me why exactly do we get ANR with Annotation: > KeyDispatchingTimedOut. I know from the logs, that the WindowsManager > is sending a keyevent to a View and I am also handling all the > potential resource intensive jobs in a child thread. If I am correct, > I think ANR occurs for a keyEvent if the response doesn't occur within > 5 seconds. Do you guys think, something else is going on. > > Below is an excerpt of the logcat: > > > ******************************************************************************************************************************** > > 06-21 17:09:31.617 324 324 I ActivityThread: Publishing provider > drm: com.android.providers.drm.DrmProvider > 06-21 17:09:31.828 324 324 I ActivityThread: Publishing provider > media: com.android.providers.media.MediaProvider > 06-21 17:09:32.248 119 119 V BlurEmailEngine: onLowMemory() called > 06-21 17:09:32.539 324 324 V MediaProvider: Attached volume: > internal > 06-21 17:09:35.487 48 107 W WindowManager: Key dispatching timed > out sending to <null> > 06-21 17:09:35.518 48 107 W WindowManager: Dispatch state: > {{KeyEvent{action=0 code=82 repeat=0 meta=0 scancode=0 mFlags=8} to > Window{43ab92a0 com.motorola.blur.alarmclock/ > com.motorola.blur.alarmclock.AlarmClock paused=false} @ 1245622170321 > lw=Window{43ab92a0 com.motorola.blur.alarmclock/ > com.motorola.blur.alarmclock.AlarmClock paused=false} > lb=android.os.binderpr...@4399c6d8 fin=false gfw=true ed=true tts=0 > wf=false fp=false mcf=Window{43a77c60 com.motorola.blur.alarmclock/ > com.motorola.blur.alarmclock.SetAlarm paused=false}}} > 06-21 17:09:35.518 48 107 I WindowManager: focus null mToken is > null at event dispatch! > 06-21 17:09:35.518 48 107 W WindowManager: Current state: > {{KeyEvent{action=1 code=82 repeat=0 meta=0 scancode=0 mFlags=8} to > null @ 1245622175520 lw=null lb=null fin=true gfw=true ed=true tts=0 > wf=false fp=false mcf=Window{43a77c60 com.motorola.blur.alarmclock/ > com.motorola.blur.alarmclock.SetAlarm paused=false}}} > 06-21 17:09:35.879 48 107 I ActivityManager: ANR (application not > responding) in process: com.motorola.blur.alarmclock > 06-21 17:09:35.879 48 107 I ActivityManager: Annotation: > keyDispatchingTimedOut > 06-21 17:09:35.879 48 107 I ActivityManager: CPU usage: > 06-21 17:09:35.879 48 107 I ActivityManager: Load: 5.58 / 2.42 / > 0.92 > 06-21 17:09:35.879 48 107 I ActivityManager: CPU usage from > 9262ms to 254ms ago: > 06-21 17:09:35.879 48 107 I ActivityManager: system_server: 24% > = 8% user + 15% kernel > 06-21 17:09:35.879 48 107 I ActivityManager: > com.motorola.blur.alarmclock: 21% = 9% user + 12% kernel > 06-21 17:09:35.879 48 107 I ActivityManager: > com.motorola.blur.service.main: 6% = 2% user + 4% kernel > 06-21 17:09:35.879 48 107 I ActivityManager: > com.android.inputmethod.latin: 6% = 1% user + 4% kernel > 06-21 17:09:35.879 48 107 I ActivityManager: > com.motorola.blur.home: 5% = 2% user + 2% kernel > 06-21 17:09:35.879 48 107 I ActivityManager: adbd: 3% = 0% user > + 3% kernel > 06-21 17:09:35.879 48 107 I ActivityManager: > com.motorola.atcommand: 3% = 2% user + 0% kernel > 06-21 17:09:35.879 48 107 I ActivityManager: > com.motorola.blur.service.blur: 2% = 1% user + 1% kernel > 06-21 17:09:35.879 48 107 I ActivityManager: com.android.phone: > 2% = 1% user + 1% kernel > 06-21 17:09:35.879 48 107 I ActivityManager: kswapd0: 2% = 0% > user + 2% kernel > 06-21 17:09:35.879 48 107 I ActivityManager: > com.motorola.android.vvm: 2% = 1% user + 1% kernel > 06-21 17:09:35.879 48 107 I ActivityManager: > com.voxmobili.sync.MobileBackup: 2% = 1% user + 0% kernel > 06-21 17:09:35.879 48 107 I ActivityManager: mediaserver: 1% = > 0% user + 0% kernel > 06-21 17:09:35.879 48 107 I ActivityManager: > com.qo.android.moto: 1% = 0% user + 0% kernel > > > > ********************************************************************************************************************************** > > I am handling all the key events in a separate thread. > > Regards, > > SD > > > > > > > > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

