我正在使用 Crittercism 来跟踪我的应用程序中的崩溃。我遇到了一个我不知道如何处理的。
这是 Crittersim 日志:
崩溃的线程
0
java.lang.IllegalArgumentException: View not attached to window manager
1
at android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:656)
2
at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:349)
3
at android.view.WindowManagerImpl$CompatModeWrapper.removeView(WindowManagerImpl.java:160)
4
at android.widget.ZoomButtonsController.setVisible(ZoomButtonsController.java:407)
5
at android.widget.ZoomButtonsController$2.handleMessage(ZoomButtonsController.java:179)
6
at android.os.Handler.dispatchMessage(Handler.java:99)
7
at android.os.Looper.loop(Looper.java:137)
8
at android.app.ActivityThread.main(ActivityThread.java:5059)
9
at java.lang.reflect.Method.invokeNative(Native Method)
10
at java.lang.reflect.Method.invoke(Method.java:511)
11
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
12
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555)
13
at dalvik.system.NativeStart.main(Native Method)
27 other threads
线程:AsyncTask #4 (id=721, state=WAITING)
0
java.lang.Object.wait(Native Method)
1
java.lang.Thread.parkFor(Thread.java:1231)
2
sun.misc.Unsafe.park(Unsafe.java:323)
3
java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)
4
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)
5
java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)
6
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)
7
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)
8
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
9
java.lang.Thread.run(Thread.java:856)
线程:ImageContentLoader_Cache(id=709,状态=RUNNABLE)
0
android.os.MessageQueue.nativePollOnce(Native Method)
1
android.os.MessageQueue.next(MessageQueue.java:125)
2
android.os.Looper.loop(Looper.java:124)
3
android.os.HandlerThread.run(HandlerThread.java:60)
线程:pool-4-thread-1 (id=695, state=WAITING)
0
java.lang.Object.wait(Native Method)
1
java.lang.Thread.parkFor(Thread.java:1231)
2
sun.misc.Unsafe.park(Unsafe.java:323)
3
java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)
4
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2022)
5
java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)
6
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)
7
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)
8
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
9
java.lang.Thread.run(Thread.java:856)
线程:请求工作线程(id=707,state=RUNNABLE)
0
android.os.MessageQueue.nativePollOnce(Native Method)
1
android.os.MessageQueue.next(MessageQueue.java:125)
2
android.os.Looper.loop(Looper.java:124)
3
com.[XXXXXXX].android.services.ServerTalk.run(ServerTalk.java:2043)
4
java.lang.Thread.run(Thread.java:856)
我的应用只有一个引用:
com.[XXXXXXX].android.services.ServerTalk.run(ServerTalk.java:2043)
这导致了这一行:
@Override
public void run()
{
Looper.prepare();
synchronized (this)
{
if (mCanRunLooper)
{
mLooper = Looper.myLooper();
mRequestHandler = new RequestThreadHandler();
}
else
{
return;
}
}
mEvent.open();
Looper.loop(); <----- [HERE]
}
此 ServerTalk 是一种处理 Web 请求并被各种活动调用的服务。问题是这里没有列出任何活动,实际上我的应用程序甚至没有在实际崩溃的线程中列出。这种崩溃发生了多次,但我自己无法复制。我不知道这是什么。有任何想法吗?