Additional info: I have a a class private final LocationListener onLocationChange = new LocationListener() in the service listening to location updates. Would this cause it to ANR while stopself()
On Jan 8, 1:17 pm, jsm <mamm...@gmail.com> wrote: > I am enclosing the anr file related to my package. If anybody can > help, greatly appreciated... > -------------------traces.txt-------------- > ... > > ----- pid 189 at 2009-01-08 13:26:08 ----- > Cmd line: com.mypackage.package > DALVIK THREADS: > "main" prio=5 tid=3 WAIT > | group="main" sCount=1 dsCount=0s=0obj=0x400113a8 > | sysTid=189 nice=0sched=0/0handle=-1094333284 > at java.lang.Object.wait(Native Method) > - waiting on <0x1b6cf0> (a android.os.MessageQueue) > at java.lang.Object.wait(Object.java:170) > at android.os.MessageQueue.next(MessageQueue.java:148) > at android.os.Looper.loop(Looper.java:110) > at android.app.ActivityThread.main(ActivityThread.java:3742) > at java.lang.reflect.Method.invokeNative(Native Method) > at java.lang.reflect.Method.invoke(Method.java:515) > at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run > (ZygoteInit.java:739) > at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497) > at dalvik.system.NativeStart.main(Native Method) > > "Binder Thread #2" prio=5 tid=13 NATIVE > | group="main" sCount=1 dsCount=0s=0obj=0x43360210 > | sysTid=196 nice=0sched=0/0handle=1366744 > at dalvik.system.NativeStart.run(Native Method) > > "Binder Thread #1" prio=5 tid=11 NATIVE > | group="main" sCount=1 dsCount=0s=0obj=0x4335ea10 > | sysTid=195 nice=0sched=0/0handle=1364624 > at dalvik.system.NativeStart.run(Native Method) > > "JDWP" daemon prio=5 tid=9 VMWAIT > | group="system" sCount=1 dsCount=0s=0obj=0x4335e2a0 > | sysTid=194 nice=0sched=0/0handle=1362064 > at dalvik.system.NativeStart.run(Native Method) > > "Signal Catcher" daemon prio=5 tid=7 RUNNABLE > | group="system" sCount=0dsCount=0s=0obj=0x4335e1e8 > | sysTid=193 nice=0sched=0/0handle=1087536 > at dalvik.system.NativeStart.run(Native Method) > > "HeapWorker" daemon prio=5 tid=5 VMWAIT > | group="system" sCount=1 dsCount=0s=0obj=0x42532a38 > | sysTid=190 nice=0sched=0/0handle=1086968 > at dalvik.system.NativeStart.run(Native Method) > > ----- end 189 ----- > > ------------------------------------------- > > On Jan 8, 10:31 am, jsm <mamm...@gmail.com> wrote: > > > I did try to look at that file, but I am not able to understand its > > content. Any pointers or document on analyzing the anr trace files. > > > On Jan 7, 10:55 pm, Al <alcapw...@googlemail.com> wrote: > > > > During ANR, a stack trace is written to /data/anr/, I've found that > > > file to very helpful to track down the cause. Search your package name > > > in the file to see what was going on at the time inside your app. > > > > On Jan 6, 8:36 pm, "Dianne Hackborn" <hack...@android.com> wrote: > > > > > Look at what your main thread is doing when the ANR happens. It may > > > > not be > > > > directly related to thestopSelf() at all -- you may have some code in a > > > > completely different location that is blocking the main thread, and the > > > >stopSelf() call just happens to cause the system to try to interact with > > > > your app, find it isn't responding, and result in an ANR. > > > > > On Tue, Jan 6, 2009 at 11:03 AM, jsm <mamm...@gmail.com> wrote: > > > > > > I have two doubts > > > > > - When I callstopself() in the service, it raises an ANR (Force close > > > > > or Wait) > > > > > I am calling this in a seperate thread as shown in my service: > > > > > ... > > > > > quitServer(){ > > > > > Thread thrm = new Thread(null, mTask, > > > > > "MYService"); > > > > > thrm.start(); > > > > > > } > > > > > > Runnable mTask = new Runnable() { > > > > > public void run() { > > > > > disconnectServer(); > > > > > stopSelf(); > > > > > } > > > > > }; > > > > > ... > > > > > I am pretty sure there are no other activity going on while i am > > > > > trying to quit because I can see from the server it has successfully > > > > > quit. > > > > > Any help or suggestion would be appreciated. > > > > > -- > > > > Dianne Hackborn > > > > Android framework engineer > > > > hack...@android.com > > > > > Note: please don't send private questions to me, as I don't have time to > > > > provide private support. 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---