How do I know where my app received an ANR

by idev » Wed, 01 Apr 2009 16:02:59 GMT


Sponsored Links
 Hi

Is there a way of finding out where my app threw an ANR (Application
Not Responding). I took a look at the traces.txt file in /data and I
see a trace for my application. This is what I see in the trace.

DALVIK THREADS:
"main" prio=5 tid=3 TIMED_WAIT
  | group="main" sCount=1 dsCount=0 s=0 obj=0x400143a8
  | sysTid=691 nice=0 sched=0/0 handle=-1091117924
  at java.lang.Object.wait(Native Method)
  - waiting on <0x1cd570> (a android.os.MessageQueue)
  at java.lang.Object.wait(Object.java:195)
  at android.os.MessageQueue.next(MessageQueue.java:144)
  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 #3" prio=5 tid=15 NATIVE
  | group="main" sCount=1 dsCount=0 s=0 obj=0x434e7758
  | sysTid=734 nice=0 sched=0/0 handle=1733632
  at dalvik.system.NativeStart.run(Native Method)

"Binder Thread #2" prio=5 tid=13 NATIVE
  | group="main" sCount=1 dsCount=0 s=0 obj=0x433af808
  | sysTid=696 nice=0 sched=0/0 handle=1369840
  at dalvik.system.NativeStart.run(Native Method)

"Binder Thread #1" prio=5 tid=11 NATIVE
  | group="main" sCount=1 dsCount=0 s=0 obj=0x433aca10
  | sysTid=695 nice=0 sched=0/0 handle=1367448
  at dalvik.system.NativeStart.run(Native Method)

"JDWP" daemon prio=5 tid=9 VMWAIT
  | group="system" sCount=1 dsCount=0 s=0 obj=0x433ac2a0
  | sysTid=694 nice=0 sched=0/0 handle=1367136
  at dalvik.system.NativeStart.run(Native Method)

"Signal Catcher" daemon prio=5 tid=7 RUNNABLE
  | group="system" sCount=0 dsCount=0 s=0 obj=0x433ac1e8
  | sysTid=693 nice=0 sched=0/0 handle=1366712
  at dalvik.system.NativeStart.run(Native Method)

"HeapWorker" daemon prio=5 tid=5 VMWAIT
  | group="system" sCount=1 dsCount=0 s=0 obj=0x4253ef88
  | sysTid=692 nice=0 sched=0/0 handle=1366472
  at dalvik.system.NativeStart.run(Native Method)

----- end 691 -----


How can I find out where the problem is?

Thanks.

--~--~---------~--~----~------------~-------~--~----~



How do I know where my app received an ANR

by dillirao malipeddi » Wed, 01 Apr 2009 19:15:00 GMT


 You must not run any complex operations on main thread
like i/o , or network operations

for those operations use separate thread , otherwise it will cause ANR






-- 
Dilli Rao. M

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Android Intended to _Foster_ Fragmentation...?

According to Sanjay Jha, COO of Qualcomm's chipset division, as quoted in this
article in *The
Register*<http://www.theregister.co.uk/2008/04/03/android_qualcomm/>,
it was Google's goal from the outset to *create, *not reduce, fragmentation
in the mobile software space with its introduction of Android. Qualcomm is,
of course, a member of the Open Handset Alliance.

"Google *wants *fragmentation in the industry," according to Jha.

Why? Maybe there's a clue in Robert Love's presentation at last summer's
GUADEC in Birmingham, where he extolled a vision of the future where all
data would be web-based and accessed through web-based applications
(incidentally an area that Google has been pushing for a couple of years
now.) This raised some significant objections, around areas like
accessibility (Robert suggested that Google Gears could address this, which
really begs the question of why one would  base stuff on the web in the
first place) but more significantly, on grounds relating to privacy and
security (a pretty sketchy area for Google, to begin with). There was
general agreement that putting corporate data on a Google-owned web-based
resource would be not only foolish, but completely legitimate grounds for a
quick sacking. Robert had no real response to this criticism.

So, I'd love to hear from someone at Google about this. Was Android
cynically intended from the outset to make life easier for Google by trying
to marginalize the legitimate community-based efforts that it derided as
being "not good enough" to meet its needs when it first started to think
about the direction it wanted to take in mobile? Was it more that they
weren't "Google-controlled enough" rather than "good enough"? Is Android
mainly intended to be a stumbling block for the rest of the industry?

What happened to "Don't be evil"...?

-- 


--~--~---------~--~----~------------~-------~--~----~

2. want to receive intent of phone ringing!! help!!

hi,
i want my program to start if the phone rings, so i want to receive
that action but cannot find what you need in the manifest to get this
intent to start - please help!

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.google.android.IC">
    <application android:icon="@drawable/icon">
        <receiver android:name=".TestIncomingCall"
android:label="@string/app_name">
            <intent-filter>
                <action
android:name="android.intent.action.TESTINCOMING" />
            </intent-filter>
        </receiver>
    </application>
</manifest>
--~--~---------~--~----~------------~-------~--~----~

3. how to receive a phone call?? what do you need in manifest??

4. Radio buttons' and checkboxes' text goes behind the buttons themselves?

5. android:text="#... bug?

6. Retrieving the location provider "gps" causes a NullPointerException in LocationManager.createProvider

7. Most basic UI crash