Eclipse 调试有对话框:Exception processing async thread queue java.lang.NullPointerException
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1716271/
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
Eclipse debugging has dialog box: Exception processing async thread queue java.lang.NullPointerException
提问by yogsma
I am facing a problem while debugging in Eclipse 3.4.2. I keep getting pop-up Exception processing async thread queue java.lang.NullPointerException
我在 Eclipse 3.4.2 中调试时遇到问题。我不断弹出异常处理异步线程队列 java.lang.NullPointerException
Does anyone know what the exact problem is?
有谁知道确切的问题是什么?
Thanks
谢谢
回答by yogsma
The problem was with the expressions watching while debugging. If those old expressions are not removed, it just keeps evaluating them and since they don't exist for current program, they keep throwing null pointer exception.
问题在于在调试时观察表达式。如果没有删除那些旧表达式,它只会继续评估它们,并且由于它们不存在于当前程序中,它们会不断抛出空指针异常。
回答by Noah
This is a known bug that the eclipse group is actively working on correcting. It is related to evaluating static variables in the debugger. Often show up when watching String[] variables. Prior comments about removing watched variables are partially correct, but only if they are static
这是 eclipse 小组正在积极纠正的一个已知错误。它与在调试器中评估静态变量有关。经常在看 String[] 变量时出现。先前关于删除监视变量的评论是部分正确的,但前提是它们是静态的
Keep watching the eclipse release notes for a bug fix
继续观看 eclipse 发行说明以获取错误修复
回答by Someone Somewhere
I have the same problem, I found the relevant bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=277574
我有同样的问题,我找到了相关的错误报告:https: //bugs.eclipse.org/bugs/show_bug.cgi?id=277574
I am using Eclipse 3.6.1, and the bug report says it is fixed in 3.6.1, however I still see it when I put a breakpoint in a Handler()
我正在使用 Eclipse 3.6.1,并且错误报告说它已在 3.6.1 中修复,但是当我在 Handler() 中放置断点时我仍然看到它
Exception processing async thread queue Exception processing async thread queue java.lang.UnsupportedOperationException
异常处理异步线程队列异常处理异步线程队列 java.lang.UnsupportedOperationException
EDIT: I am able to see the value stored in the array of strings by adding the expression to the expression list. I only get the Eclipse exception when I put my mouse pointer over the array to inspect it. So I can debug, but I just have to remember to clear the expression list when I am done with it.
编辑:通过将表达式添加到表达式列表中,我能够看到存储在字符串数组中的值。当我将鼠标指针放在数组上进行检查时,我只会收到 Eclipse 异常。所以我可以调试,但我只需要记住在完成后清除表达式列表。
回答by Liam O Donnell
Eclipse Standard/SDK
Eclipse 标准/SDK
Version: Kepler Service Release 1 Build id: 20130919-0819
版本:Kepler Service Release 1 版本号:20130919-0819
I have a similar problem ... in the absence of a fix, I found a temporary workaround.
我有一个类似的问题......在没有修复的情况下,我找到了一个临时的解决方法。
// This will cause the error as decribed in my code ...
// 这将导致我的代码中描述的错误...
public static void main(String[] args)
{
public static HashMap<String, String> students = new HashMap<String, String>();
...
}
if I sperate the declaration and initialisation ... I can get the debugger to behave as expected. Dont know why this works ... but appears to work for me ... Hope this helps someone.
如果我单独声明和初始化......我可以让调试器按预期运行。不知道为什么这有效......但似乎对我有用......希望这对某人有所帮助。
public static HashMap<String, String> students ;
public static void main(String[] args)
{
students = new HashMap<String, String>();
...
}
回答by validcat
I had the similar issue with processing async thread in debugging mode but with com.sun.jdi.ObjectCollectedException
我在调试模式下处理异步线程时遇到了类似的问题,但是 com.sun.jdi.ObjectCollectedException
Exception processing async thread queue
com.sun.jdi.ObjectCollectedException
no cleaning expression list, or anything else helps. But i noticed that my phone is working under ART
runtime environment and when am I switched back to Dalvik
async thread error is dissapeared.
没有清理表达式列表,或其他任何帮助。但我注意到我的手机在ART
运行时环境下工作,何时切换回Dalvik
异步线程错误消失了。