Tengo este mensaje en la consola del programador que indica que mi solicitud había congelado debido a:ANR errors - SCREEN OFF - ¿Cómo se supone que debo manejarlos?
ANR difusión de Intención {actuar = android.intent.action.SCREEN_OFF flg = 0x40000000}
No hubo seguimiento de la pila porque esto fue planteado por un usuario previo a Froyo. Ni siquiera me dice qué actividad dentro de mi aplicación provocó el error, aunque supongo que era mi actividad en el juego.
Esto también coincide con mi propia experiencia que a veces, cuando mi teléfono se está quedando sin batería, mi aplicación se congelará y tendrá que ser eliminada.
¿Hay algo que se supone que debo hacer dentro de mis actividades para manejar este estado de congelación?
Ahora tengo un rendimiento adecuado del mercado, pero todavía no sé qué hacer con él.
DALVIK THREADS:
"main" prio=5 tid=1 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x400227b0 self=0xce98
| sysTid=4060 nice=0 sched=0/0 cgrp=default handle=-1345013476
| schedstat=(72099976000 6131816000 28732)
at android.media.SoundPool.play(Native Method)
at com.bazsoft.yaniv.SoundManager.playSound(SoundManager.java:88)
at com.bazsoft.yaniv.YanivGameActivity.displayPileCards(YanivGameActivity.java:675)
at com.bazsoft.yaniv.YanivGameActivity.access$22(YanivGameActivity.java:659)
at com.bazsoft.yaniv.YanivGameActivity$1.run(YanivGameActivity.java:628)
at android.app.Activity.runOnUiThread(Activity.java:3713)
at com.bazsoft.yaniv.YanivGameActivity.displayCards(YanivGameActivity.java:615)
at com.bazsoft.yaniv.YanivGameActivity.access$6(YanivGameActivity.java:614)
at com.bazsoft.yaniv.YanivGameActivity$ComputerHandler.handleMessage(YanivGameActivity.java:121)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4701)
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:859)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:617)
at dalvik.system.NativeStart.main(Native Method)
"AsyncTask #5" prio=5 tid=19 WAIT
| group="main" sCount=1 dsCount=0 obj=0x464cbd98 self=0x47f208
| sysTid=4877 nice=10 sched=0/0 cgrp=default handle=4216856
| schedstat=(13501000 72691000 93)
at java.lang.Object.wait(Native Method)
- waiting on <0x4648bbd0> (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)
"AsyncTask #4" prio=5 tid=22 WAIT
| group="main" sCount=1 dsCount=0 obj=0x465379d8 self=0x460698
| sysTid=4796 nice=10 sched=0/0 cgrp=default handle=4864896
| schedstat=(14816000 60081000 94)
at java.lang.Object.wait(Native Method)
- waiting on <0x46491a40> (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)
"AsyncTask #3" prio=5 tid=21 WAIT
| group="main" sCount=1 dsCount=0 obj=0x46558de8 self=0x44f1a8
| sysTid=4759 nice=10 sched=0/0 cgrp=default handle=4865256
| schedstat=(17781000 122763000 125)
at java.lang.Object.wait(Native Method)
- waiting on <0x46545340> (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=20 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x463e9610 self=0x4958e8
| sysTid=4750 nice=0 sched=0/0 cgrp=default handle=4807336
| schedstat=(8851000 15266000 40)
at dalvik.system.NativeStart.run(Native Method)
"AsyncTask #2" prio=5 tid=18 WAIT
| group="main" sCount=1 dsCount=0 obj=0x464423c8 self=0x48dad8
| sysTid=4737 nice=10 sched=0/0 cgrp=default handle=3804272
| schedstat=(14045000 80530000 96)
at java.lang.Object.wait(Native Method)
- waiting on <0x464c2db8> (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)
"AsyncTask #1" prio=5 tid=8 WAIT
| group="main" sCount=1 dsCount=0 obj=0x464dfed8 self=0x41b5e8
| sysTid=4550 nice=10 sched=0/0 cgrp=default handle=3585048
| schedstat=(12129000 58868000 77)
at java.lang.Object.wait(Native Method)
- waiting on <0x464eefa0> (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)
"WebViewWorkerThread" prio=5 tid=17 WAIT
| group="main" sCount=1 dsCount=0 obj=0x4644d988 self=0x32d200
| sysTid=4099 nice=1 sched=0/0 cgrp=default handle=3330880
| schedstat=(74615000 42294000 225)
at java.lang.Object.wait(Native Method)
- waiting on <0x4644dbc8> (a android.os.MessageQueue)
at java.lang.Object.wait(Object.java:288)
at android.os.MessageQueue.next(MessageQueue.java:146)
at android.os.Looper.loop(Looper.java:123)
at android.os.HandlerThread.run(HandlerThread.java:60)
"http3" prio=5 tid=16 WAIT
| group="main" sCount=1 dsCount=0 obj=0x46438aa8 self=0x32c618
| sysTid=4098 nice=1 sched=0/0 cgrp=default handle=3327832
| schedstat=(9630000 2435000 22)
at java.lang.Object.wait(Native Method)
- waiting on <0x46437ce8> (a android.net.http.RequestQueue)
at java.lang.Object.wait(Object.java:288)
at android.net.http.ConnectionThread.run(ConnectionThread.java:98)
"http2" prio=5 tid=15 WAIT
| group="main" sCount=1 dsCount=0 obj=0x464388b8 self=0x32bbd0
| sysTid=4097 nice=1 sched=0/0 cgrp=default handle=3325200
| schedstat=(6453000 547000 21)
at java.lang.Object.wait(Native Method)
- waiting on <0x46437ce8> (a android.net.http.RequestQueue)
at java.lang.Object.wait(Object.java:288)
at android.net.http.ConnectionThread.run(ConnectionThread.java:98)
"http1" prio=5 tid=14 WAIT
| group="main" sCount=1 dsCount=0 obj=0x464386c8 self=0x32afb0
| sysTid=4095 nice=1 sched=0/0 cgrp=default handle=3322096
| schedstat=(14060000 4044000 35)
at java.lang.Object.wait(Native Method)
- waiting on <0x46437ce8> (a android.net.http.RequestQueue)
at java.lang.Object.wait(Object.java:288)
at android.net.http.ConnectionThread.run(ConnectionThread.java:98)
"http0" prio=5 tid=11 WAIT
| group="main" sCount=1 dsCount=0 obj=0x464384d8 self=0x31b898
| sysTid=4094 nice=1 sched=0/0 cgrp=default handle=3263064
| schedstat=(10561000 11218000 28)
at java.lang.Object.wait(Native Method)
- waiting on <0x46437ce8> (a android.net.http.RequestQueue)
at java.lang.Object.wait(Object.java:288)
at android.net.http.ConnectionThread.run(ConnectionThread.java:98)
"SoundPool" prio=5 tid=13 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x464237e0 self=0x2e4a08
| sysTid=4077 nice=0 sched=0/0 cgrp=default handle=2519808
| schedstat=(236000 6104000 5)
at dalvik.system.NativeStart.run(Native Method)
"SoundPoolThread" prio=5 tid=12 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x46418800 self=0x2def70
| sysTid=4078 nice=0 sched=0/0 cgrp=default handle=2520264
| schedstat=(4442000 4642000 55)
at dalvik.system.NativeStart.run(Native Method)
"pool-1-thread-1" prio=5 tid=10 WAIT
| group="main" sCount=1 dsCount=0 obj=0x463f2218 self=0x2ca760
| sysTid=4075 nice=0 sched=0/0 cgrp=default handle=2878472
| schedstat=(86256000 83712000 143)
at java.lang.Object.wait(Native Method)
- waiting on <0x463f2488> (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.uti...
¿Encontró una solución? – philipp
He recibido la misma salida para mi propio juego y no pude entender ni una sola cosa allí. Así que elegí ignorarlo. Invierta su tiempo en errores ANR si son demasiado frecuentes, o simplemente ignórelos. – noob
He encontrado el mismo ANR (una vez) en mi aplicación. No uso BroadcastReceiver en este. –