I've been working on an android app and test it on the emulator. Parts of this app require some processing time, such as login, could take up to 10 seconds. If the app is processing the login, and I clicked anywhere on the emulator screen, it will cause the app to crash -> a force close/wait window will pop up and even I choose to wait, this login process will never complete.
I wonder did anybody else encounter this situation? What could I do to avoid user clicking during processing and crash the program? Or on a real phone it is not a problem?
Thanks!
EDIT: This is indeed a UI thread problem and I'm using Mono for Android to write this app, I sort my issues out using methods introduced Here!
EDIT:
this is the LOGCAT messages
1-11 00:38:49.165 W/WindowManager( 59): Key dispatching timed out sending to BadumnaAndroidApi1.BadumnaAndroidApi1/badumnaandroidapi1.Activity1
01-11 00:38:49.165 W/WindowManager( 59): Previous dispatch state: {{KeyEvent{action=1 code=66 repeat=0 meta=0 scancode=28 mFlags=8} to Window{44ed87d0 BadumnaAndroidApi1.BadumnaAndroidApi1/badumnaandroidapi1.Activity1 paused=false} # 1326241690617 lw=Window{44ed87d0 BadumnaAndroidApi1.BadumnaAndroidApi1/badumnaandroidapi1.Activity1 paused=false} lb=android.os.BinderProxy#4508a900 fin=false gfw=true ed=true tts=0 wf=false fp=false mcf=Window{44ed87d0 BadumnaAndroidApi1.BadumnaAndroidApi1/badumnaandroidapi1.Activity1 paused=false}}}
01-11 00:38:49.175 W/WindowManager( 59): Current dispatch state: {{null to Window{44ed87d0 BadumnaAndroidApi1.BadumnaAndroidApi1/badumnaandroidapi1.Activity1 paused=false} # 1326242329174 lw=Window{44ed87d0 BadumnaAndroidApi1.BadumnaAndroidApi1/badumnaandroidapi1.Activity1 paused=false} lb=android.os.BinderProxy#4508a900 fin=false gfw=true ed=true tts=0 wf=false fp=false mcf=Window{44ed87d0 BadumnaAndroidApi1.BadumnaAndroidApi1/badumnaandroidapi1.Activity1 paused=false}}}
01-11 00:38:49.276 I/Process ( 59): Sending signal. PID: 316 SIG: 3
01-11 00:38:49.276 I/dalvikvm( 316): threadid=3: reacting to signal 3
01-11 00:38:49.485 I/dalvikvm( 316): Wrote stack traces to '/data/anr/traces.txt'
01-11 00:38:49.485 I/Process ( 59): Sending signal. PID: 59 SIG: 3
01-11 00:38:49.485 I/dalvikvm( 59): threadid=3: reacting to signal 3
01-11 00:38:49.595 I/dalvikvm( 59): Wrote stack traces to '/data/anr/traces.txt'
01-11 00:38:49.616 I/Process ( 59): Sending signal. PID: 114 SIG: 3
01-11 00:38:49.616 I/dalvikvm( 114): threadid=3: reacting to signal 3
01-11 00:38:49.625 I/dalvikvm( 114): Wrote stack traces to '/data/anr/traces.txt'
01-11 00:38:49.636 I/Process ( 59): Sending signal. PID: 107 SIG: 3
01-11 00:38:49.645 I/dalvikvm( 107): threadid=3: reacting to signal 3
01-11 00:38:49.655 I/dalvikvm( 107): Wrote stack traces to '/data/anr/traces.txt'
01-11 00:38:49.673 I/Process ( 59): Sending signal. PID: 254 SIG: 3
01-11 00:38:49.865 I/dalvikvm( 254): threadid=3: reacting to signal 3
01-11 00:38:49.875 I/Process ( 59): Sending signal. PID: 246 SIG: 3
01-11 00:38:49.906 I/dalvikvm( 246): threadid=3: reacting to signal 3
01-11 00:38:50.085 I/Process ( 59): Sending signal. PID: 177 SIG: 3
01-11 00:38:50.115 I/dalvikvm( 177): threadid=3: reacting to signal 3
01-11 00:38:50.285 I/Process ( 59): Sending signal. PID: 221 SIG: 3
01-11 00:38:50.345 I/dalvikvm( 221): threadid=3: reacting to signal 3
01-11 00:38:50.495 I/Process ( 59): Sending signal. PID: 169 SIG: 3
01-11 00:38:50.575 I/dalvikvm( 169): threadid=3: reacting to signal 3
01-11 00:38:50.695 I/Process ( 59): Sending signal. PID: 185 SIG: 3
01-11 00:38:50.735 I/dalvikvm( 185): threadid=3: reacting to signal 3
01-11 00:38:50.905 I/Process ( 59): Sending signal. PID: 111 SIG: 3
01-11 00:38:50.905 I/dalvikvm( 111): threadid=3: reacting to signal 3
01-11 00:38:51.065 I/dalvikvm( 111): Wrote stack traces to '/data/anr/traces.txt'
01-11 00:38:51.065 I/Process ( 59): Sending signal. PID: 205 SIG: 3
01-11 00:38:51.185 I/dalvikvm( 205): threadid=3: reacting to signal 3
01-11 00:38:51.275 I/Process ( 59): Sending signal. PID: 194 SIG: 3
01-11 00:38:51.405 I/dalvikvm( 194): threadid=3: reacting to signal 3
01-11 00:38:51.485 I/Process ( 59): Sending signal. PID: 155 SIG: 3
01-11 00:38:51.605 I/dalvikvm( 155): threadid=3: reacting to signal 3
01-11 00:38:51.685 I/Process ( 59): Sending signal. PID: 149 SIG: 3
01-11 00:38:51.875 I/dalvikvm( 149): threadid=3: reacting to signal 3
01-11 00:38:51.885 I/Process ( 59): Sending signal. PID: 115 SIG: 3
01-11 00:38:51.916 I/dalvikvm( 115): threadid=3: reacting to signal 3
Ok the chances are you might be causing the UI thread to hang due to this heavy processing -but I could be way off without seeing any code -hint-. What you might is put the heavy stuff into a background thread seperate to the GUI thread, which you are currently running in.
Luckily Android has the AsyncTask class to help you here. Lets say (as there is not enough detail in the question) you are logging in to your app by making a web request to a server. When the user presses login you want to show some sort of processing message while doing all the legwork in your background thread.
Take a look at this article in particular the AsyncTask example http://www.vogella.de/articles/AndroidPerformance/article.html
You can see that doInBackground() is where all the heavy lifting is done and that postExecute() runs in the UI thread once again, which is where you will want to update the UI based on the result of what just happened. For example the user logged in sucessfully or an error occured while logging in.
I could go on for quite some time however this is well documented. Another good post by Google themselves can be found here http://android-developers.blogspot.com/2009/05/painless-threading.html
Related
I have created a test scene in Unity which has only one cube and a directional lightening. When installed in AVD just the name of app is display and shows up nothing...
I could not figure out what is the error.. or what is making my application to stop running
AVD setting that is used are
Target: 4.0.3 API Level 15
Skin: HVGA
RAM: 512 VM: 32
Internal Storage: 200MB
SDCARD:2GB
I/AndroidRuntime( 474): NOTE: attach of thread 'Binder Thread #3' failed
D/AndroidRuntime( 549):
D/AndroidRuntime( 549): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<
D/AndroidRuntime( 549): CheckJNI is ON
D/AndroidRuntime( 549): Calling main entry com.android.commands.am.Am
I/ActivityManager( 77): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.asdasd.cd/com.unity3d.player.UnityPlayerNativeActivity} from pid 549
D/PermissionCache( 36): checking android.permission.READ_FRAME_BUFFER for uid=1000 => granted (22624 us)
W/WindowManager( 77): Failure taking screenshot for (130x195) to layer 21005
D/AndroidRuntime( 549): Shutting down VM
D/dalvikvm( 549): GC_CONCURRENT freed 99K, 77% free 480K/2048K, paused 0ms+1ms
I/AndroidRuntime( 549): NOTE: attach of thread 'Binder Thread #3' failed
I/ActivityManager( 77): Start proc com.asdasd.cd for activity com.asdasd.cd/com.unity3d.player.UnityPlayerNativeActivity: pid=559 uid=10041 gids={}
W/NetworkManagementSocketTagger( 77): setKernelCountSet(10041, 1) failed with errno -2
I/dalvikvm( 77): Jit: resizing JitTable from 4096 to 8192
I/ARMAssembler( 36): generated scanline__00000077:03515104_00009002_00000000 [127 ipp] (149 ins) at [0x413fba80:0x413fbcd4] in 869530 ns
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
D/dalvikvm( 559): Trying to load lib /mnt/asec/com.asdasd.cd-2/lib/libmain.so 0x41023f78
D/dalvikvm( 559): Added shared lib /mnt/asec/com.asdasd.cd-2/lib/libmain.so 0x41023f78
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
W/ActivityManager( 77): Launch timeout has expired, giving up wake lock!
W/ActivityManager( 77): Activity idle timeout for ActivityRecord{411e1ab0 com.asdasd.cd/com.unity3d.player.UnityPlayerNativeActivity}
D/dalvikvm( 77): GC_CONCURRENT freed 294K, 11% free 8687K/9671K, paused 5ms+7ms
D/dalvikvm( 160): GC_CONCURRENT freed 436K, 8% free 6992K/7559K, paused 4ms+4ms
On Installing on Android the app so similar behavior and generates same similar log
I/ActivityManager( 289): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.asdasd.cd/com.unity3d.player.UnityPlayerNativeActivity bnds=[12,433][125,592]} from pid 546
I/ActivityManager( 289): Start proc com.asdasd.cd for activity com.asdasd.cd/com.unity3d.player.UnityPlayerNativeActivity: pid=4268 uid=10130 gids={}
W/ResourceType( 289): Skipping entry 0x7f040010 in package table 0 because it is not complex!
W/ResourceType( 289): Skipping entry 0x7f04003d in package table 0 because it is not complex!
D/dalvikvm( 4268): Trying to load lib /mnt/asec/com.asdasd.cd-1/lib/libmain.so 0x2bde3080
D/dalvikvm( 4268): Added shared lib /mnt/asec/com.asdasd.cd-1/lib/libmain.so 0x2bde3080
D/SurfaceFlinger( 136): Release buffer at 0xcddd0
W/ActivityManager( 289): Launch timeout has expired, giving up wake lock!
W/ActivityManager( 289): Activity idle timeout for ActivityRecord{2c57c1e8 com.asdasd.cd/com.unity3d.player.UnityPlayerNativeActivity}
For gaming better to use genymotion dont use AVD that doesn't support EGL rendering and in android 4.4 use dalvik instead of ART ...
Hope you get my point.
Finally my app is working..!:D Problem is solved by updating and applying latest patch unity 4.6.6p1.. which removes the bug from older version .Hope this will help someone having a similar problem
my application was working fine
suddenly its stopped working and whenever i am trying to run it it says this in the error log , kindly fill in your experience
i am using http post client to get response from a web service , which till now was working fine , it has some sudden effect , initially i thought my bad internet connction is affecting but it seems to linger in the good net connection also
10-18 19:06:21.554: D/AndroidRuntime(311): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
10-18 19:06:21.554: D/AndroidRuntime(311): CheckJNI is ON
10-18 19:06:21.653: D/AndroidRuntime(311): --- registering native functions ---
10-18 19:06:22.073: D/AndroidRuntime(311): Shutting down VM
10-18 19:06:22.073: D/dalvikvm(311): Debugger has detached; object registry had 1 entries
10-18 19:06:22.083: I/AndroidRuntime(311): NOTE: attach of thread 'Binder Thread #3' failed
10-18 19:06:22.423: D/AndroidRuntime(319): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
10-18 19:06:22.423: D/AndroidRuntime(319): CheckJNI is ON
10-18 19:06:22.523: D/AndroidRuntime(319): --- registering native functions ---
10-18 19:06:22.943: I/ActivityManager(58): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.gt_google_svn/.Auth }
10-18 19:06:22.953: D/AndroidRuntime(319): Shutting down VM
10-18 19:06:22.953: D/dalvikvm(319): Debugger has detached; object registry had 1 entries
10-18 19:06:22.963: I/AndroidRuntime(319): NOTE: attach of thread 'Binder Thread #3' failed
10-18 19:06:44.220: W/WindowManager(58): Key dispatching timed out sending to com.gt_google_svn/com.gt_google_svn.Auth
10-18 19:06:44.220: W/WindowManager(58): Previous dispatch state: null
10-18 19:06:44.224: W/WindowManager(58): Current dispatch state: {{null to Window{45080188 com.gt_google_svn/com.gt_google_svn.Auth paused=false} # 1350567404223 lw=Window{45080188 com.gt_google_svn/com.gt_google_svn.Auth paused=false} lb=android.os.BinderProxy#4500e0f8 fin=false gfw=true ed=true tts=0 wf=false fp=false mcf=Window{45080188 com.gt_google_svn/com.gt_google_svn.Auth paused=false}}}
10-18 19:06:44.244: I/Process(58): Sending signal. PID: 301 SIG: 3
10-18 19:06:44.244: I/dalvikvm(301): threadid=3: reacting to signal 3
10-18 19:06:44.284: I/dalvikvm(301): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.284: I/Process(58): Sending signal. PID: 58 SIG: 3
10-18 19:06:44.284: I/dalvikvm(58): threadid=3: reacting to signal 3
10-18 19:06:44.324: I/dalvikvm(58): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.324: I/Process(58): Sending signal. PID: 124 SIG: 3
10-18 19:06:44.324: I/dalvikvm(124): threadid=3: reacting to signal 3
10-18 19:06:44.334: I/dalvikvm(124): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.334: I/Process(58): Sending signal. PID: 285 SIG: 3
10-18 19:06:44.334: I/dalvikvm(285): threadid=3: reacting to signal 3
10-18 19:06:44.345: I/dalvikvm(285): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.345: I/Process(58): Sending signal. PID: 256 SIG: 3
10-18 19:06:44.345: I/dalvikvm(256): threadid=3: reacting to signal 3
10-18 19:06:44.354: I/dalvikvm(256): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.354: I/Process(58): Sending signal. PID: 195 SIG: 3
10-18 19:06:44.354: I/dalvikvm(195): threadid=3: reacting to signal 3
10-18 19:06:44.364: I/dalvikvm(195): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.364: I/Process(58): Sending signal. PID: 201 SIG: 3
10-18 19:06:44.364: I/dalvikvm(201): threadid=3: reacting to signal 3
10-18 19:06:44.374: I/dalvikvm(201): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.374: I/Process(58): Sending signal. PID: 253 SIG: 3
10-18 19:06:44.374: I/dalvikvm(253): threadid=3: reacting to signal 3
10-18 19:06:44.384: I/dalvikvm(253): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.384: I/Process(58): Sending signal. PID: 108 SIG: 3
10-18 19:06:44.384: I/dalvikvm(108): threadid=3: reacting to signal 3
10-18 19:06:44.404: I/dalvikvm(108): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.404: I/Process(58): Sending signal. PID: 112 SIG: 3
10-18 19:06:44.404: I/dalvikvm(112): threadid=3: reacting to signal 3
10-18 19:06:44.424: I/dalvikvm(112): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.424: I/Process(58): Sending signal. PID: 207 SIG: 3
10-18 19:06:44.424: I/dalvikvm(207): threadid=3: reacting to signal 3
10-18 19:06:44.434: I/dalvikvm(207): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.434: I/Process(58): Sending signal. PID: 160 SIG: 3
10-18 19:06:44.434: I/dalvikvm(160): threadid=3: reacting to signal 3
10-18 19:06:44.464: I/dalvikvm(160): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.464: I/Process(58): Sending signal. PID: 175 SIG: 3
10-18 19:06:44.464: I/dalvikvm(175): threadid=3: reacting to signal 3
10-18 19:06:44.474: I/dalvikvm(175): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.474: I/Process(58): Sending signal. PID: 216 SIG: 3
10-18 19:06:44.484: I/dalvikvm(216): threadid=3: reacting to signal 3
10-18 19:06:44.494: I/dalvikvm(216): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.494: I/Process(58): Sending signal. PID: 269 SIG: 3
10-18 19:06:44.494: I/dalvikvm(269): threadid=3: reacting to signal 3
10-18 19:06:44.504: I/dalvikvm(269): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.504: I/Process(58): Sending signal. PID: 232 SIG: 3
10-18 19:06:44.504: I/dalvikvm(232): threadid=3: reacting to signal 3
10-18 19:06:44.515: I/dalvikvm(232): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.515: I/Process(58): Sending signal. PID: 144 SIG: 3
10-18 19:06:44.515: I/dalvikvm(144): threadid=3: reacting to signal 3
10-18 19:06:44.534: I/dalvikvm(144): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.534: I/Process(58): Sending signal. PID: 125 SIG: 3
10-18 19:06:44.534: I/dalvikvm(125): threadid=3: reacting to signal 3
10-18 19:06:44.544: I/dalvikvm(125): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.574: E/ActivityManager(58): ANR in com.gt_google_svn (com.gt_google_svn/.Auth)
10-18 19:06:44.574: E/ActivityManager(58): Reason: keyDispatchingTimedOut
10-18 19:06:44.574: E/ActivityManager(58): Load: 0.59 / 0.48 / 0.2
10-18 19:06:44.574: E/ActivityManager(58): CPU usage from 44545ms to 18ms ago:
10-18 19:06:44.574: E/ActivityManager(58): system_server: 2% = 1% user + 0% kernel / faults: 119 minor 4 major
10-18 19:06:44.574: E/ActivityManager(58): adbd: 0% = 0% user + 0% kernel / faults: 28 minor
10-18 19:06:44.574: E/ActivityManager(58): m.android.phone: 0% = 0% user + 0% kernel / faults: 156 minor
10-18 19:06:44.574: E/ActivityManager(58): m.gt_google_svn: 0% = 0% user + 0% kernel / faults: 27 minor 6 major
10-18 19:06:44.574: E/ActivityManager(58): qemud: 0% = 0% user + 0% kernel
10-18 19:06:44.574: E/ActivityManager(58): re-initialized>: 0% = 0% user + 0% kernel / faults: 146 minor 1 major
10-18 19:06:44.574: E/ActivityManager(58): events/0: 0% = 0% user + 0% kernel
10-18 19:06:44.574: E/ActivityManager(58): putmethod.latin: 0% = 0% user + 0% kernel / faults: 172 minor 1 major
10-18 19:06:44.574: E/ActivityManager(58): ndroid.launcher: 0% = 0% user + 0% kernel / faults: 39 minor
10-18 19:06:44.574: E/ActivityManager(58): ndroid.settings: 0% = 0% user + 0% kernel / faults: 109 minor
10-18 19:06:44.574: E/ActivityManager(58): roid.alarmclock: 0% = 0% user + 0% kernel / faults: 77 minor
10-18 19:06:44.574: E/ActivityManager(58): android.protips: 0% = 0% user + 0% kernel / faults: 76 minor
10-18 19:06:44.574: E/ActivityManager(58): .quicksearchbox: 0% = 0% user + 0% kernel / faults: 323 minor
10-18 19:06:44.574: E/ActivityManager(58): d.process.media: 0% = 0% user + 0% kernel / faults: 268 minor
10-18 19:06:44.574: E/ActivityManager(58): com.android.mms: 0% = 0% user + 0% kernel / faults: 92 minor 1 major
10-18 19:06:44.574: E/ActivityManager(58): id.defcontainer: 0% = 0% user + 0% kernel / faults: 78 minor
10-18 19:06:44.574: E/ActivityManager(58): s:FriendService: 0% = 0% user + 0% kernel / faults: 77 minor
10-18 19:06:44.574: E/ActivityManager(58): m.android.email: 0% = 0% user + 0% kernel / faults: 98 minor
10-18 19:06:44.574: E/ActivityManager(58): com.svox.pico: 0% = 0% user + 0% kernel / faults: 26 minor
10-18 19:06:44.574: E/ActivityManager(58): TOTAL: 8% = 5% user + 2% kernel + 0% softirq
10-18 19:06:44.604: W/WindowManager(58): No window to dispatch pointer action 1
10-18 19:06:44.624: W/WindowManager(58): No window to dispatch pointer action 1
10-18 19:06:44.624: W/WindowManager(58): No window to dispatch pointer action 0
10-18 19:06:44.634: W/WindowManager(58): No window to dispatch pointer action 1
10-18 19:06:44.634: W/WindowManager(58): No window to dispatch pointer action 0
10-18 19:06:44.634: W/WindowManager(58): No window to dispatch pointer action 1
10-18 19:06:44.634: W/WindowManager(58): No window to dispatch pointer action 0
10-18 19:06:44.634: W/WindowManager(58): No window to dispatch pointer action 1
10-18 19:06:44.634: W/WindowManager(58): No window to dispatch pointer action 0
10-18 19:06:44.634: W/WindowManager(58): No window to dispatch pointer action 1
10-18 19:06:44.634: W/WindowManager(58): No window to dispatch pointer action 0
10-18 19:06:44.634: W/WindowManager(58): No window to dispatch pointer action 1
10-18 19:06:44.734: W/KeyCharacterMap(58): No keyboard for id 0
10-18 19:06:44.734: W/KeyCharacterMap(58): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
10-18 19:06:45.014: I/ARMAssembler(58): generated scanline__00000077:03515104_00000000_00000000 [ 33 ipp] (47 ins) at [0x3250d0:0x32518c] in 326428 ns
Use AsyncTask and take off your long running task from your UI thread. Read the posts below for more concrete information
http://android-developers.blogspot.com/2010/07/multithreading-for-performance.html
http://android-developers.blogspot.com/2009/05/painless-threading.html
http://developer.android.com/reference/android/os/NetworkOnMainThreadException.html
this is my first question, but this forum helped me a lot in the last 2 months!!!
I tried to make an "Gallery" on my Android app, i solved it for 1 Gallery, but after i tried to make more "Galleries", i got an error in my "OnCreate".
This is my onCreate:
public void onCreate(Bundle savedInstanceState) {
//try {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_create_combination);
Gallery h = (Gallery) findViewById(R.id.gallery_head);
h.setAdapter(new ImageAdapter_head(this));
h.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView parent, View v, int position, long id) {
Toast.makeText(Create_combination.this, "" + position,
Toast.LENGTH_SHORT).show();
}
});
i make this for 3 times (for 3 Galleries)
My class "ImageAdapter:head":
public class ImageAdapter_head extends BaseAdapter {
int mGalleryItemBackground;
private Context hContext;
private Integer[] mImageIds_head = { R.drawable.layout, R.drawable.ic_launcher,
R.drawable.test2, R.drawable.layout, R.drawable.layout,
R.drawable.layout, R.drawable.layout };
public ImageAdapter_head(Create_combination create_combination) {
// TODO Auto-generated constructor stub
}
public void ImageAdapter(Context h) {
hContext = h;
TypedArray a = obtainStyledAttributes(R.styleable.Gallery1);
mGalleryItemBackground = a.getResourceId(
R.styleable.Gallery1_android_galleryItemBackground , 0);
a.recycle();
}
public int getCount() {
return mImageIds_head.length;
//return mImageIds_upper.length;
//return mImageIds_lower.length;
}
public Object getItem(int position) {
return position;
}
public long getItemId(int position) {
return position;
}
ImageView h = new ImageView(hContext);
#SuppressWarnings("deprecation")
public View getView(int position, View convertView, ViewGroup parent) {
h.setImageResource(mImageIds_head[position]);
h.setLayoutParams(new Gallery.LayoutParams(150, 100));
h.setScaleType(ImageView.ScaleType.FIT_XY);
h.setBackgroundResource(mGalleryItemBackground);
return (h);
}
}
And here are my Errors:
Thread [<1> main] (Suspended (exception RuntimeException))
<VM does not provide monitor information>
ActivityThread.performLaunchActivity(ActivityThread$ActivityClientRecord, Intent) line: 1956
ActivityThread.handleLaunchActivity(ActivityThread$ActivityClientRecord, Intent) line: 1981
ActivityThread.access$600(ActivityThread, ActivityThread$ActivityClientRecord, Intent) line: 123
ActivityThread$H.handleMessage(Message) line: 1147
ActivityThread$H(Handler).dispatchMessage(Message) line: 99
Looper.loop() line: 137
ActivityThread.main(String[]) line: 4424
Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 511
ZygoteInit$MethodAndArgsCaller.run() line: 784
ZygoteInit.main(String[]) line: 551
NativeStart.main(String[]) line: not available [native method]
Thread [<10> Binder Thread #2] (Running)
Thread [<9> Binder Thread #1] (Running)
Daemon Thread [<8> FinalizerWatchdogDaemon] (Running)
Daemon Thread [<7> FinalizerDaemon] (Running)
Daemon Thread [<6> ReferenceQueueDaemon] (Running)
Thread [<11> AsyncTask #1] (Running)
logcat:
11-18 18:24:07.371: I/ActivityManager(159): START {cmp=in.dressin/com.example.hellogallery.Create_combination} from pid 1890
11-18 18:24:07.511: D/dalvikvm(159): GC_CONCURRENT freed 552K, 20% free 9123K/11335K, paused 3ms+7ms
11-18 18:24:07.901: I/Process(159): Sending signal. PID: 1890 SIG: 3
11-18 18:24:07.901: I/dalvikvm(1890): threadid=3: reacting to signal 3
11-18 18:24:07.911: D/dalvikvm(1890): threadid=1: still suspended after undo (sc=1 dc=1)
11-18 18:24:07.911: I/dalvikvm(1890): Wrote stack traces to '/data/anr/traces.txt'
11-18 18:24:08.401: I/Process(159): Sending signal. PID: 1890 SIG: 3
11-18 18:24:08.401: I/dalvikvm(1890): threadid=3: reacting to signal 3
11-18 18:24:08.411: D/dalvikvm(1890): threadid=1: still suspended after undo (sc=1 dc=1)
11-18 18:24:08.411: I/dalvikvm(1890): Wrote stack traces to '/data/anr/traces.txt'
11-18 18:24:08.901: I/Process(159): Sending signal. PID: 1890 SIG: 3
11-18 18:24:08.901: I/dalvikvm(1890): threadid=3: reacting to signal 3
11-18 18:24:08.911: D/dalvikvm(1890): threadid=1: still suspended after undo (sc=1 dc=1)
11-18 18:24:08.911: I/dalvikvm(1890): Wrote stack traces to '/data/anr/traces.txt'
11-18 18:24:09.401: I/Process(159): Sending signal. PID: 1890 SIG: 3
11-18 18:24:09.401: I/dalvikvm(1890): threadid=3: reacting to signal 3
11-18 18:24:09.411: D/dalvikvm(1890): threadid=1: still suspended after undo (sc=1 dc=1)
11-18 18:24:09.411: I/dalvikvm(1890): Wrote stack traces to '/data/anr/traces.txt'
11-18 18:24:09.911: I/Process(159): Sending signal. PID: 1890 SIG: 3
11-18 18:24:09.911: I/dalvikvm(1890): threadid=3: reacting to signal 3
11-18 18:24:09.911: D/dalvikvm(1890): threadid=1: still suspended after undo (sc=1 dc=1)
11-18 18:24:09.911: I/dalvikvm(1890): Wrote stack traces to '/data/anr/traces.txt'
11-18 18:24:10.411: I/Process(159): Sending signal. PID: 1890 SIG: 3
11-18 18:24:10.411: I/dalvikvm(1890): threadid=3: reacting to signal 3
11-18 18:24:10.411: D/dalvikvm(1890): threadid=1: still suspended after undo (sc=1 dc=1)
11-18 18:24:10.411: I/dalvikvm(1890): Wrote stack traces to '/data/anr/traces.txt'
11-18 18:24:10.901: I/Process(159): Sending signal. PID: 1890 SIG: 3
11-18 18:24:10.901: I/dalvikvm(1890): threadid=3: reacting to signal 3
11-18 18:24:10.911: D/dalvikvm(1890): threadid=1: still suspended after undo (sc=1 dc=1)
11-18 18:24:10.911: I/dalvikvm(1890): Wrote stack traces to '/data/anr/traces.txt'
11-18 18:24:11.401: I/Process(159): Sending signal. PID: 1890 SIG: 3
11-18 18:24:11.401: I/dalvikvm(1890): threadid=3: reacting to signal 3
11-18 18:24:11.411: D/dalvikvm(1890): threadid=1: still suspended after undo (sc=1 dc=1)
11-18 18:24:11.411: I/dalvikvm(1890): Wrote stack traces to '/data/anr/traces.txt'
11-18 18:24:11.901: I/Process(159): Sending signal. PID: 1890 SIG: 3
11-18 18:24:11.901: I/dalvikvm(1890): threadid=3: reacting to signal 3
11-18 18:24:11.911: D/dalvikvm(1890): threadid=1: still suspended after undo (sc=1 dc=1)
11-18 18:24:11.911: I/dalvikvm(1890): Wrote stack traces to '/data/anr/traces.txt'
11-18 18:24:12.431: I/Process(159): Sending signal. PID: 1890 SIG: 3
11-18 18:24:12.431: I/dalvikvm(1890): threadid=3: reacting to signal 3
11-18 18:24:12.441: D/dalvikvm(1890): threadid=1: still suspended after undo (sc=1 dc=1)
11-18 18:24:12.441: I/dalvikvm(1890): Wrote stack traces to '/data/anr/traces.txt'
11-18 18:24:12.911: I/Process(159): Sending signal. PID: 1890 SIG: 3
11-18 18:24:12.911: I/dalvikvm(1890): threadid=3: reacting to signal 3
11-18 18:24:12.911: D/dalvikvm(1890): threadid=1: still suspended after undo (sc=1 dc=1)
11-18 18:24:12.911: I/dalvikvm(1890): Wrote stack traces to '/data/anr/traces.txt'
11-18 18:24:13.401: I/Process(159): Sending signal. PID: 1890 SIG: 3
11-18 18:24:13.401: I/dalvikvm(1890): threadid=3: reacting to signal 3
11-18 18:24:13.411: D/dalvikvm(1890): threadid=1: still suspended after undo (sc=1 dc=1)
11-18 18:24:13.411: I/dalvikvm(1890): Wrote stack traces to '/data/anr/traces.txt'
11-18 18:24:13.901: I/Process(159): Sending signal. PID: 1890 SIG: 3
11-18 18:24:13.901: I/dalvikvm(1890): threadid=3: reacting to signal 3
11-18 18:24:13.911: D/dalvikvm(1890): threadid=1: still suspended after undo (sc=1 dc=1)
11-18 18:24:13.911: I/dalvikvm(1890): Wrote stack traces to '/data/anr/traces.txt'
11-18 18:24:14.401: I/Process(159): Sending signal. PID: 1890 SIG: 3
11-18 18:24:14.401: I/dalvikvm(1890): threadid=3: reacting to signal 3
11-18 18:24:14.411: D/dalvikvm(1890): threadid=1: still suspended after undo (sc=1 dc=1)
11-18 18:24:14.411: I/dalvikvm(1890): Wrote stack traces to '/data/anr/traces.txt'
11-18 18:24:14.901: I/Process(159): Sending signal. PID: 1890 SIG: 3
11-18 18:24:14.901: I/dalvikvm(1890): threadid=3: reacting to signal 3
11-18 18:24:14.911: D/dalvikvm(1890): threadid=1: still suspended after undo (sc=1 dc=1)
11-18 18:24:14.911: I/dalvikvm(1890): Wrote stack traces to '/data/anr/traces.txt'
11-18 18:24:15.401: I/Process(159): Sending signal. PID: 1890 SIG: 3
11-18 18:24:15.401: I/dalvikvm(1890): threadid=3: reacting to signal 3
11-18 18:24:15.411: D/dalvikvm(1890): threadid=1: still suspended after undo (sc=1 dc=1)
11-18 18:24:15.411: I/dalvikvm(1890): Wrote stack traces to '/data/anr/traces.txt'
11-18 18:24:15.911: I/Process(159): Sending signal. PID: 1890 SIG: 3
11-18 18:24:15.911: I/dalvikvm(1890): threadid=3: reacting to signal 3
11-18 18:24:15.911: D/dalvikvm(1890): threadid=1: still suspended after undo (sc=1 dc=1)
11-18 18:24:15.911: I/dalvikvm(1890): Wrote stack traces to '/data/anr/traces.txt'
11-18 18:24:16.411: I/Process(159): Sending signal. PID: 1890 SIG: 3
11-18 18:24:16.411: I/dalvikvm(1890): threadid=3: reacting to signal 3
11-18 18:24:16.411: D/dalvikvm(1890): threadid=1: still suspended after undo (sc=1 dc=1)
11-18 18:24:16.411: I/dalvikvm(1890): Wrote stack traces to '/data/anr/traces.txt'
11-18 18:24:16.901: I/Process(159): Sending signal. PID: 1890 SIG: 3
11-18 18:24:16.901: I/dalvikvm(1890): threadid=3: reacting to signal 3
11-18 18:24:16.911: D/dalvikvm(1890): threadid=1: still suspended after undo (sc=1 dc=1)
11-18 18:24:16.911: I/dalvikvm(1890): Wrote stack traces to '/data/anr/traces.txt'
11-18 18:24:17.401: I/Process(159): Sending signal. PID: 1890 SIG: 3
11-18 18:24:17.401: I/dalvikvm(1890): threadid=3: reacting to signal 3
11-18 18:24:17.401: W/ActivityManager(159): Launch timeout has expired, giving up wake lock!
11-18 18:24:17.411: D/dalvikvm(1890): threadid=1: still suspended after undo (sc=1 dc=1)
11-18 18:24:17.421: I/dalvikvm(1890): Wrote stack traces to '/data/anr/traces.txt'
11-18 18:24:17.421: W/ActivityManager(159): Activity idle timeout for ActivityRecord{411fec30 in.dressin/com.example.hellogallery.Create_combination}
11-18 18:24:20.261: I/WindowManager(159): MediaPlayer.is not PlayingVideo
11-18 18:24:22.971: I/WindowManager(159): MediaPlayer.is not PlayingVideo
11-18 18:24:28.741: I/InputDispatcher(159): Application is not responding: AppWindowToken{412958e0 token=Token{413a5178 ActivityRecord{411fec30 in.dressin/com.example.hellogallery.Create_combination}}}. 5001.1ms since event, 5000.8ms since wait started
11-18 18:24:28.741: I/WindowManager(159): Input event dispatching timed out sending to application AppWindowToken{412958e0 token=Token{413a5178 ActivityRecord{411fec30 in.dressin/com.example.hellogallery.Create_combination}}}
11-18 18:24:33.741: I/InputDispatcher(159): Dropped event because it is stale.
Please help me :)
greetings, felix!
model : zt180
firmware : android 2.1-update1-20101030
kernel : 2.6.32.9 usbandroid #1608
build number zt180-eng 2.1-update1 20101030
google maps : 4.5.1
Various crashes occur when embedding the google maps component into an android application. I'm connecting to a router via Wi-Fi for internet access. The stand-alone google maps app seems to work fine. To re-produce, start the maps app and begin scrolling around.
Will fail within a couple of minutes, occasionally on start-up (in setContentView). Most of the errors are when drawing tiles in google code. Sometimes just an Android SEGV.
NOTE : I've tested the same app on the Android developer phone 2 (os 1.6), and it works fine.
My android app is as follows:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.google.android.maps.MapView
android:id="#+id/mapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="043yBg1m9IiFNKXIhN5LsdeNndw2k7yrw4Ja3xQ"/>
</RelativeLayout>
import com.google.android.maps.MapActivity;
import android.os.Bundle;
public class Maps extends MapActivity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
protected boolean isRouteDisplayed() { return false; }
}
=========================
W/MapActivity( 2745): Recycling dispatcher com.google.googlenav.datarequest.DataRequestDispatcher#45ebcd30
V/MapActivity( 2745): Recycling map object.
I/ActivityManager( 2010): Displayed activity com.brta.android.lite/.Maps: 720 ms (total 720 ms)
I/MapActivity( 2745): Handling network change notification:CONNECTED
E/MapActivity( 2745): Couldn't get connection factory client
D/AndroidRuntime( 2745): Shutting down VM
W/dalvikvm( 2745): threadid=3: thread exiting with uncaught exception (group=0x4001b168)
E/AndroidRuntime( 2745): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime( 2745): java.lang.IncompatibleClassChangeError: interface not implemented
E/AndroidRuntime( 2745): at com.google.googlenav.map.Map.checkPaintTimeExceeded(Unknown Source)
E/AndroidRuntime( 2745): at com.google.googlenav.map.Map.drawMapBackground(Unknown Source)
E/AndroidRuntime( 2745): at com.google.googlenav.map.Map.drawMap(Unknown Source)
E/AndroidRuntime( 2745): at com.google.android.maps.MapView.drawMap(MapView.java:1048)
E/AndroidRuntime( 2745): at com.google.android.maps.MapView.onDraw(MapView.java:486)
<snip>
I/Process ( 2745): Sending signal. PID: 2745 SIG: 9
I/ActivityManager( 2010): Process com.brta.android.lite (pid 2745) has died.
I/WindowManager( 2010): WIN DEATH: Window{46112878 com.brta.android.lite/com.brta.android.lite.Maps paused=false}
I/UsageStats( 2010): Unexpected resume of org.adw.launcher while already resumed in com.brta.android.lite`
======================================================================
I/MapActivity( 2863): Handling network change notification:CONNECTED
E/MapActivity( 2863): Couldn't get connection factory client
D/dalvikvm( 2863): GC freed 8114 objects / 577376 bytes in 86ms
D/dalvikvm( 2863): GC freed 685 objects / 444384 bytes in 85ms
D/dalvikvm( 2863): GC freed 3458 objects / 259456 bytes in 79ms
I/ActivityManager( 2010): Displayed activity com.brta.android.lite/.Maps: 4407 ms (total 4407 ms)
D/AndroidRuntime( 2863): Shutting down VM
W/dalvikvm( 2863): threadid=3: thread exiting with uncaught exception (group=0x4001b168)
E/AndroidRuntime( 2863): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime( 2863): java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
E/AndroidRuntime( 2863): at java.util.Vector.elementAt(Vector.java:331)
E/AndroidRuntime( 2863): at com.google.googlenav.map.Map.drawTile(Unknown Source)
E/AndroidRuntime( 2863): at com.google.googlenav.map.Map.drawMapBackground(Unknown Source)
E/AndroidRuntime( 2863): at com.google.googlenav.map.Map.drawMap(Unknown Source)
E/AndroidRuntime( 2863): at com.google.android.maps.MapView.drawMap(MapView.java:1048)
E/AndroidRuntime( 2863): at com.google.android.maps.MapView.onDraw(MapView.java:486)
E/AndroidRuntime( 2863): at android.view.View.draw(View.java:6535)
E/AndroidRuntime( 2863): at android.view.ViewGroup.drawChild(ViewGroup.java:1531)
E/AndroidRuntime( 2863): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)
<snip>
E/AndroidRuntime( 2863): at dalvik.system.NativeStart.main(Native Method)
I/Process ( 2010): Sending signal. PID: 2863 SIG: 3
I/dalvikvm( 2863): threadid=7: reacting to signal 3
I/dalvikvm( 2863): Wrote stack trace to '/data/anr/traces.txt'
I/Process ( 2863): Sending signal. PID: 2863 SIG: 9
I/WindowManager( 2010): WIN DEATH: Window{460ac708 com.brta.android.lite/com.brta.android.lite.Maps paused=false}
I/ActivityManager( 2010): Process com.brta.android.lite (pid 2863) has died.
I/UsageStats( 2010): Unexpected resume of org.adw.launcher while already resumed in com.brta.android.lite
W/InputManagerService( 2010): Got RemoteException sending setActive(false) notification to pid 2863 uid 10046
Basically, lots of bad things start happening...
The ZT-180 does not have Google Maps, AFAIK.
I have an application which displays a series of custom views in a LinearLayout. The LinearLayout is in a ScrollView. The custom views draw a picture, when their onDraw method is called. Generally this works fine. But occasionally the application crashes on a drawPicture() call. When it crashes, no exception seems to be thrown, but I do get this message in logcat: "Wrote stack trace to 'data/anr/traces.txt'".
The contents of traces.txt is below:
DALVIK THREADS:
"main" prio=5 tid=3 NATIVE
| group="main" sCount=1 dsCount=0 s=N obj=0x2aac2250 self=0x84d00
| sysTid=412 nice=0 sched=0/0 cgrp=unknown handle=2130112448
at android.graphics.Canvas.native_drawPicture(Native Method)
at android.graphics.Canvas.drawPicture(Canvas.java:1404)
at com.MyView.onDraw(PDFPageView.java:100)
at android.view.View.draw(View.java:6534)
at android.view.ViewGroup.drawChild(ViewGroup.java:1531)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)
at android.view.View.draw(View.java:6537)
at android.view.ViewGroup.drawChild(ViewGroup.java:1531)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)
at android.view.View.draw(View.java:6537)
at android.widget.FrameLayout.draw(FrameLayout.java:352)
at android.view.ViewGroup.drawChild(ViewGroup.java:1531)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)
at android.view.View.draw(View.java:6537)
at android.widget.FrameLayout.draw(FrameLayout.java:352)
at android.view.ViewGroup.drawChild(ViewGroup.java:1531)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)
at android.view.View.draw(View.java:6537)
at android.widget.FrameLayout.draw(FrameLayout.java:352)
at android.view.ViewGroup.drawChild(ViewGroup.java:1531)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)
at android.view.ViewGroup.drawChild(ViewGroup.java:1529)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)
at android.view.View.draw(View.java:6537)
at android.widget.FrameLayout.draw(FrameLayout.java:352)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1849)
at android.view.ViewRoot.draw(ViewRoot.java:1349)
at android.view.ViewRoot.performTraversals(ViewRoot.java:1114)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1633)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4325)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)
"AsyncTask #1" prio=5 tid=17 WAIT
| group="main" sCount=1 dsCount=0 s=N obj=0x2e4262b0 self=0x351ab8
| sysTid=420 nice=10 sched=0/0 cgrp=unknown handle=3480528
at java.lang.Object.wait(Native Method)
- waiting on <0x195468> (a java.lang.VMThread)
at java.lang.Thread.parkFor(Thread.java:1535)
at java.lang.LangAccessImpl.parkFor(LangAccessImpl.java:48)
at sun.misc.Unsafe.park(Unsafe.java:317)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:131)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1996)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:359)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1001)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
at java.lang.Thread.run(Thread.java:1096)
"Binder Thread #3" prio=5 tid=15 NATIVE
| group="main" sCount=1 dsCount=0 s=N obj=0x2e3e9cc0 self=0x191798
| sysTid=419 nice=0 sched=0/0 cgrp=unknown handle=1738736
at dalvik.system.NativeStart.run(Native Method)
"Binder Thread #2" prio=5 tid=13 NATIVE
| group="main" sCount=1 dsCount=0 s=N obj=0x2e3e9c00 self=0x1a7510
| sysTid=418 nice=0 sched=0/0 cgrp=unknown handle=1792360
at dalvik.system.NativeStart.run(Native Method)
"Binder Thread #1" prio=5 tid=11 NATIVE
| group="main" sCount=1 dsCount=0 s=N obj=0x2e3e9b40 self=0x1aae60
| sysTid=417 nice=0 sched=0/0 cgrp=unknown handle=1738512
at dalvik.system.NativeStart.run(Native Method)
"JDWP" daemon prio=5 tid=9 VMWAIT
| group="system" sCount=1 dsCount=0 s=N obj=0x2e3e82a0 self=0x1b82a0
| sysTid=416 nice=0 sched=0/0 cgrp=unknown handle=1792208
at dalvik.system.NativeStart.run(Native Method)
"Signal Catcher" daemon prio=5 tid=7 RUNNABLE
| group="system" sCount=0 dsCount=0 s=N obj=0x2e3e81e8 self=0x1b9420
| sysTid=415 nice=0 sched=0/0 cgrp=unknown handle=1791968
at dalvik.system.NativeStart.run(Native Method)
"HeapWorker" daemon prio=5 tid=5 VMWAIT
| group="system" sCount=1 dsCount=0 s=N obj=0x2d68c4c8 self=0x1b9968
| sysTid=413 nice=0 sched=0/0 cgrp=unknown handle=1792792
at dalvik.system.NativeStart.run(Native Method)
This is the logcat output:
W/WindowManager( 53): Key dispatching timed out sending to com.mypackage/com.mypackage.MyActivity
W/WindowManager( 53): Dispatch state: {{KeyEvent{action=1 code=82 repeat=0 met
a=0 scancode=229 mFlags=8} to Window{4387d7f8 Keyguard paused=false} # 129122478
0532 lw=Window{4387d7f8 Keyguard paused=false} lb=android.view.ViewRoot$W#4387d4
08 fin=false gfw=true ed=true tts=0 wf=false fp=false mcf=Window{4392eb90 com.mypackage
s/com.mypackage.MyActivity paused=false}}}
W/WindowManager( 53): Current state: {{null to Window{4392eb90 com.mypackage
s/com.mypackage.MyActivity paused=false} # 1291225159009 lw=Window{4
392eb90 com.mypackage/com.mypackage.MyActivity paused=false} lb=an
droid.os.BinderProxy#4392e9b8 fin=false gfw=true ed=true tts=0 wf=false fp=false
mcf=Window{4392eb90
com.mypackage/com.mypackage.MyActivity paused
=false}}}
I/ActivityManager( 53): ANR in process: com.mypackage
(last in com.mypackage)
I/ActivityManager( 53): Annotation: keyDispatchingTimedOut
I/ActivityManager( 53): CPU usage:
I/ActivityManager( 53): Load: 0.71 / 0.81 / 0.44
I/ActivityManager( 53): CPU usage from 19028ms to 19ms ago:
I/ActivityManager( 53): com.mypackage: 34% = 34% user + 0% kernel / f
aults: 24 minor
I/ActivityManager( 53): system_server: 2% = 1% user + 0% kernel / faults: 8
minor
I/ActivityManager( 53): com.android.phone: 0% = 0% user + 0% kernel
I/ActivityManager( 53): adbd: 0% = 0% user + 0% kernel / faults: 72 minor
I/ActivityManager( 53): TOTAL: 38% = 36% user + 2% kernel
I/ActivityManager( 53): Removing old ANR trace file from /data/anr/traces.txt
I/Process ( 53): Sending signal. PID: 514 SIG: 3
I/dalvikvm( 514): threadid=7: reacting to signal 3
I/dalvikvm( 514): Wrote stack trace to '/data/anr/traces.txt'
I/Process ( 53): Sending signal. PID: 53 SIG: 3
I/dalvikvm( 53): threadid=7: reacting to signal 3
I/dalvikvm( 53): Wrote stack trace to '/data/anr/traces.txt'
I/Process ( 53): Sending signal. PID: 96 SIG: 3
I/dalvikvm( 96): threadid=7: reacting to signal 3
I/dalvikvm( 96): Wrote stack trace to '/data/anr/traces.txt'
I/Process ( 53): Sending signal. PID: 223 SIG: 3
I/dalvikvm( 223): threadid=7: reacting to signal 3
I/dalvikvm( 223): Wrote stack trace to '/data/anr/traces.txt'
I/Process ( 53): Sending signal. PID: 140 SIG: 3
I/dalvikvm( 140): threadid=7: reacting to signal 3
I/dalvikvm( 140): Wrote stack trace to '/data/anr/traces.txt'
I/Process ( 53): Sending signal. PID: 120 SIG: 3
I/dalvikvm( 120): threadid=7: reacting to signal 3
I/dalvikvm( 120): Wrote stack trace to '/data/anr/traces.txt'
I/Process ( 53): Sending signal. PID: 172 SIG: 3
I/dalvikvm( 172): threadid=7: reacting to signal 3
I/dalvikvm( 172): Wrote stack trace to '/data/anr/traces.txt'
I/Process ( 53): Sending signal. PID: 175 SIG: 3
I/dalvikvm( 175): threadid=7: reacting to signal 3
I/dalvikvm( 175): Wrote stack trace to '/data/anr/traces.txt'
I/Process ( 53): Sending signal. PID: 94 SIG: 3
I/dalvikvm( 94): threadid=7: reacting to signal 3
I/dalvikvm( 94): Wrote stack trace to '/data/anr/traces.txt'
W/WindowManager( 53): No window to dispatch pointer action 1
W/WindowManager( 53): No window to dispatch pointer action 1
W/WindowManager( 53): No window to dispatch pointer action 0
W/WindowManager( 53): No window to dispatch pointer action 1
D/dalvikvm( 53): GC freed 12498 objects / 629776 bytes in 174ms
This is not a crash, it's an ANR (Application Not Responding.) It means your application is taking too long to respond to an event (more than 5 seconds.)