Android Studio调试器应用程序因InterruptedException崩溃 [英] Android Studio Debugger Application Crashes with InterruptedException
问题描述
今天工作时,似乎突然之间我无法调试应用程序了。有趣的是,如果我正常运行该应用程序,它将正常运行。为了澄清,我整个上午都在运行调试器,没有发生任何事件(除了偶尔的故障或崩溃)。然后在午餐后它开始100%地失败。当然,我整天都在进行更改,因此上面的似乎。因此,以下是一些相关详细信息:
While working today, it seemed as if suddenly I could no longer debug our application. The funny thing is, if I ran the app normally it would work just fine. To clarify, I was running the debugger all morning without incident (apart from the occasional glitch or crash). Then after lunch it began failing 100% of the time. Of course, I've been making changes all day, hence the "it seems" above. So, here are some relevant details:
-
Android Studio 2.1.1(2016年4月28日构建)
Android Studio 2.1.1 (April 28, 2016 build)
此应用程序以登录屏幕启动。然后,用户必须使用可调用外部服务的用户名/密码进行身份验证。
This app starts up with a log in screen. The user must then authenticate with a username/password which calls out to an external service.
我可以进入登录屏幕,但该应用程序始终会崩溃
I can get to the login screen, but the app would always crash at the same point in the middle of the authentication.
这是堆栈跟踪:
05-24 14:56:25.764 2399-2745/com.mycomp.myapp.test E/Crashlytics: Failed to execute task.
java.lang.InterruptedException
at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:375)
at java.util.concurrent.FutureTask.get(FutureTask.java:162)
at com.crashlytics.android.v.a(SourceFile:1936)
at com.crashlytics.android.v.uncaughtException(SourceFile:307)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
05-24 14:56:25.764 2399-2745/com.mycomp.myapp.test E/AndroidRuntime: FATAL EXCEPTION: pool-5-thread-1
Process: com.mycomp.myapp.test, PID: 2399
java.lang.InterruptedException
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:1991)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2025)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:410)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1035)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1097)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:820)
以下是我尝试解决的问题:
Here are the things I've tried to fix it:
- 撤消我的所有更改(git stash)
- 从电话上卸载应用程序
- 进行干净的构建
- 进行Gradle项目重新同步
- 删除所有断点(严重吗?)
- 好吧,我一直在添加断点以了解其工作原理,那么谁知道呢?
- Back out all my changes (git stash)
- Uninstall application from phone
- Do a clean build
- Do a Gradle Project Resync
- Remove all breakpoints (seriously?)
- Ok, I've been adding breakpoints all over to see how things work, so who knows? There's some merit there.
到目前为止,没有任何效果。但是,我不能强调的是,如果我只运行该应用程序(播放按钮,^ R)并在同一台设备上运行它,就可以正常工作!登录没有问题。因此,这似乎不是代码问题。
And so far, nothing works. However, I can't emphasize enough that if I just run the app (play button, ^R) and run it on the very same device, it works just fine! Log in with no problem. So, it doesn't seem to be a code problem.
此外,如果您查看堆栈跟踪信息,没有任何内容指向我们的项目。
Furthermore, if you look at the stack trace, there is nothing pointing to our project.
有什么想法吗?
推荐答案
好吧,我知道了。事实证明,我选择了 Java现场观察点作为挂起线程选项之一。请参阅所附的屏幕截图以进行澄清。要点:
Well, I figured it out. It turns out I had a "Java Field Watchpoint" selected with "Suspend Thread" as one of the options. See the attached screenshot for clarification. Takeaways:
如您所见,我一直在使用一堆断点,所以它被埋在窗口中,而我却没有看到。
As you can see, I had been using a bunch of breakpoints, so it got buried in the window and I didn't see it.
我仍然不知道它是如何设置的。前一天我一直在使用手表,但是我都删除了它们。此外,我敢肯定我没有打开它,所以它如何在一天当中神秘地停止工作仍然是一个谜。另外,我当然不会自己检查暂停线程。某种默认设置吗?
I still don't know how it got set. I had been using watches on a previous day, but I had deleted them all. Furthermore, I'm quite certain I didn't turn it on, so how it mysteriously stopped working in the middle of the day is still a mystery. Also, I certainly wouldn't have checked "suspend thread" on my own. Some sort of default setting?
点仍然存在-如果您看到奇怪的堆栈跟踪,最好检查所有断点和点设置。
Point remains - if you are seeing weird stack traces, it might be good to check all the breakpoints and watch point settings.
我希望这对某人有所帮助。
I hope this helps someone.
这篇关于Android Studio调试器应用程序因InterruptedException崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!