Java JDI Thread Evaluations 遇到问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2273423/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
JDI Thread Evaluations has encountered a problem
提问by chama
I'm running Eclipse for Java. I created a DOM version of an XML file. Now I want to change an attribute of an element in the file. I called a method that called a method in the class that controls the DOM, and I got a dialog box saying "JDI Thread Evaluations has encountered a problem. Exception processing async thread queue" while debugging.
我正在为 Java 运行 Eclipse。我创建了一个 XML 文件的 DOM 版本。现在我想更改文件中元素的属性。我调用了一个方法,该方法在控制DOM的类中调用了一个方法,并且在调试时出现了一个对话框说“JDI线程评估遇到了问题。异常处理异步线程队列”。
I'm a relative newbie at Java and have not come across such an error, and I have no idea what's causing it.
我是 Java 的相对新手,还没有遇到过这样的错误,我不知道是什么原因造成的。
If anyone has any suggestions as to the cause of the problem and/or ways to fix it ...
如果有人对问题的原因和/或解决方法有任何建议......
Thanks so much!
非常感谢!
采纳答案by trashgod
The Java Debug Interface (JDI) is part of the Java Platform Debugger Architecture. One apparent way to trigger this exception occurs when an object's toString()
method carelessly returns null
. There's an interesting discussion here. You might want to try a different debugger, and it wouldn't hurt to validate your XML.
Java 调试接口 (JDI) 是Java 平台调试器架构的一部分。当对象的toString()
方法不小心返回时,会发生触发此异常的一种明显方式null
。有一个有趣的讨论在这里。您可能想尝试不同的调试器,验证您的 XML 不会有什么坏处。
回答by Anthony
Keep an eye on your "Watch" expressions - if you don't need them, remove them all. Sometimes certain watch expressions have caused this error message for me.
注意你的“观察”表达——如果你不需要它们,把它们全部删除。有时某些监视表达式会导致我出现此错误消息。
This might also explain why it happens to intermittently for people (sometimes they have watch assignments that cause the error, however restarting or removing the right watch can solve the issue without them knowing it.)
这也可以解释为什么人们会间歇性地发生这种情况(有时他们的手表分配会导致错误,但是重新启动或移除正确的手表可以在他们不知情的情况下解决问题。)
回答by SpaceTrucker
The problem can also occur if source lookup is incorrectly configured. For example lets say one wants to watch the expression foo.bar()
. Now if source lookup is incorrectly configured, the debugger is unable to resolve the binding for expression foo
(see this eclipse bug). Then the invocation of .bar()
will fail with a NullPointerException.
如果源查找配置不正确,也会出现此问题。例如,假设一个人想要观看表情foo.bar()
。现在,如果源查找配置不正确,调试器将无法解析表达式的绑定foo
(请参阅此 Eclipse 错误)。然后调用.bar()
将失败并返回 NullPointerException。
回答by Silambarasan Poonguti
This error occurs quiet a few times when you debugging. You can clean this up by removing all watch statements and all breakpoints and restarting Eclipse.
调试时,此错误会安静地发生几次。您可以通过删除所有 watch 语句和所有断点并重新启动 Eclipse 来清理它。
回答by Moshe.z
This problem may occur if you have "Detail Formatters" configured for specific classes (in Eclipse: Java -> Debug -> Detail Formatters). Try to disable them.
如果您为特定类配置了“详细格式器”(在 Eclipse 中:Java -> 调试 -> 详细信息格式器),则可能会出现此问题。尝试禁用它们。