Bug 277574 - JDI thread evaluations (Error: Exception processing async thread queue)
Summary: JDI thread evaluations (Error: Exception processing async thread queue)
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.3.2   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 3.6.1   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 234769 249241 282548 318298 318544 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-05-23 10:04 EDT by Ralf Hauser CLA
Modified: 2012-07-11 09:46 EDT (History)
11 users (show)

See Also:


Attachments
TestCase (4.99 KB, application/x-zip-compressed)
2010-07-07 07:36 EDT, Krzysztof Daniel CLA
no flags Details
patch (30.46 KB, patch)
2010-07-14 21:50 EDT, Darin Wright CLA
no flags Details | Diff
updated patch with NLS strings (32.84 KB, patch)
2010-07-14 21:55 EDT, Darin Wright CLA
no flags Details | Diff
Patch backported to 3.4 stream (33.62 KB, patch)
2010-07-15 04:57 EDT, Krzysztof Daniel CLA
no flags Details | Diff
patch (33.85 KB, patch)
2010-07-15 11:50 EDT, Darin Wright CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Hauser CLA 2009-05-23 10:04:50 EDT
Build ID: v3.3.2 Build id: M20080221-1800

Steps To Reproduce:
1. setting a break-point in debug mode (TestNG)
2. see also Bug 119860
3. and http://dev.eclipse.org/mhonarc/lists/jdt-debug-dev/msg00543.html


More information:
!SUBENTRY 1 org.eclipse.jdt.debug 4 120 2009-05-23 15:38:07.108
!MESSAGE Exception processing async thread queue
!STACK 0
java.lang.NullPointerException
	at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTInstructionCompiler.visit(ASTInstructionCompiler.java:3143)
	at org.eclipse.jdt.core.dom.QualifiedName.accept0(QualifiedName.java:166)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2476)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2523)
	at org.eclipse.jdt.core.dom.ReturnStatement.accept0(ReturnStatement.java:135)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2476)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2546)
	at org.eclipse.jdt.core.dom.Block.accept0(Block.java:135)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2476)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2523)
	at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:501)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2476)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2546)
	at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:483)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2476)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2546)
	at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:213)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2476)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine.createExpressionFromAST(ASTEvaluationEngine.java:414)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine.getCompiledExpression(ASTEvaluationEngine.java:229)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine.evaluate(ASTEvaluationEngine.java:114)
	at org.eclipse.jdt.internal.debug.ui.JavaWatchExpressionDelegate$EvaluationRunnable.run(JavaWatchExpressionDelegate.java:144)
	at org.eclipse.jdt.internal.debug.core.model.JDIThread$ThreadJob.run(JDIThread.java:2608)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
!SUBENTRY 1 org.eclipse.jdt.debug 4 120 2009-05-23 15:38:07.108
!MESSAGE Exception processing async thread queue
!STACK 0
java.lang.NullPointerException
	at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTInstructionCompiler.getTypeId(ASTInstructionCompiler.java:3767)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTInstructionCompiler.visit(ASTInstructionCompiler.java:1575)
	at org.eclipse.jdt.core.dom.Assignment.accept0(Assignment.java:307)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2476)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2523)
	at org.eclipse.jdt.core.dom.ExpressionStatement.accept0(ExpressionStatement.java:143)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2476)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2546)
	at org.eclipse.jdt.core.dom.Block.accept0(Block.java:135)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2476)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2523)
	at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:501)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2476)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2546)
	at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:483)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2476)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2546)
	at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:213)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2476)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine.createExpressionFromAST(ASTEvaluationEngine.java:414)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine.getCompiledExpression(ASTEvaluationEngine.java:229)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine.evaluate(ASTEvaluationEngine.java:114)
	at org.eclipse.jdt.internal.debug.ui.JavaWatchExpressionDelegate$EvaluationRunnable.run(JavaWatchExpressionDelegate.java:144)
	at org.eclipse.jdt.internal.debug.core.model.JDIThread$ThreadJob.run(JDIThread.java:2608)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 1 Ralf Hauser CLA 2009-05-24 02:00:39 EDT
just upgraded to ganymede v3.4 Build id: M20090211-1700 and it still happens at slightly different code locations

!SUBENTRY 1 org.eclipse.jdt.debug 4 120 2009-05-24 07:58:51.040
!MESSAGE Exception processing async thread queue
!STACK 0
java.lang.NullPointerException
	at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTInstructionCompiler.visit(ASTInstructionCompiler.java:3153)
	at org.eclipse.jdt.core.dom.QualifiedName.accept0(QualifiedName.java:167)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2525)
	at org.eclipse.jdt.core.dom.ReturnStatement.accept0(ReturnStatement.java:136)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2548)
	at org.eclipse.jdt.core.dom.Block.accept0(Block.java:136)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2525)
	at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:502)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2548)
	at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:484)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2548)
	at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:214)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine.createExpressionFromAST(ASTEvaluationEngine.java:413)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine.getCompiledExpression(ASTEvaluationEngine.java:229)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine.evaluate(ASTEvaluationEngine.java:114)
	at org.eclipse.jdt.internal.debug.ui.JavaWatchExpressionDelegate$EvaluationRunnable.run(JavaWatchExpressionDelegate.java:144)
	at org.eclipse.jdt.internal.debug.core.model.JDIThread$ThreadJob.run(JDIThread.java:2614)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
!SUBENTRY 1 org.eclipse.jdt.debug 4 120 2009-05-24 07:58:51.040
!MESSAGE Exception processing async thread queue
!STACK 0
java.lang.NullPointerException
	at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTInstructionCompiler.getTypeId(ASTInstructionCompiler.java:3769)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTInstructionCompiler.visit(ASTInstructionCompiler.java:1583)
	at org.eclipse.jdt.core.dom.Assignment.accept0(Assignment.java:308)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2525)
	at org.eclipse.jdt.core.dom.ExpressionStatement.accept0(ExpressionStatement.java:144)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2548)
	at org.eclipse.jdt.core.dom.Block.accept0(Block.java:136)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2525)
	at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:502)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2548)
	at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:484)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2548)
	at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:214)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2478)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine.createExpressionFromAST(ASTEvaluationEngine.java:413)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine.getCompiledExpression(ASTEvaluationEngine.java:229)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine.evaluate(ASTEvaluationEngine.java:114)
	at org.eclipse.jdt.internal.debug.ui.JavaWatchExpressionDelegate$EvaluationRunnable.run(JavaWatchExpressionDelegate.java:144)
	at org.eclipse.jdt.internal.debug.core.model.JDIThread$ThreadJob.run(JDIThread.java:2614)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 2 Darin Wright CLA 2009-05-26 12:57:12 EDT
Can you provide a sample watch expression/program that cause this problem?
Comment 3 Krzysztof Daniel CLA 2010-07-07 07:36:17 EDT
Created attachment 173636 [details]
TestCase

I know it is not a minimal testcase, but I do not dare to reduce it further. The watch expression looks like that:

Test.par.new Result(b).toString();

The Result has protected constructor and therefore is not accessible in Watch view. I am not sure howto fix it.
Comment 4 Darin Wright CLA 2010-07-14 21:50:25 EDT
Created attachment 174366 [details]
patch

This patch adds null checks in the AST instruction compiler to report errors, abort evaluations and avoid NPEs when bindings cannot be resolved.
Comment 5 Darin Wright CLA 2010-07-14 21:52:02 EDT
(In reply to comment #3)
> Created an attachment (id=173636) [details]
> TestCase
> I know it is not a minimal testcase, but I do not dare to reduce it further.
> The watch expression looks like that:
> Test.par.new Result(b).toString();
> The Result has protected constructor and therefore is not accessible in Watch
> view. I am not sure howto fix it.

In this particular case the field Test.par is not visible, so the compiler is not providing a binding for the Result constructor. There's nothing the evaluation engine can do but abort (unless JDT were to provide the constructor binding).
Comment 6 Darin Wright CLA 2010-07-14 21:55:54 EDT
Created attachment 174367 [details]
updated patch with NLS strings
Comment 7 Krzysztof Daniel CLA 2010-07-15 04:57:36 EDT
Created attachment 174374 [details]
Patch backported to 3.4 stream
Comment 8 Ross Wagner CLA 2010-07-15 08:43:57 EDT
Has this patch made it into a build yet?  I'd like to be able to download the plugins affected by this patch so I can make a patch for 3.4.2

Thanks,
Ross
Comment 9 Darin Wright CLA 2010-07-15 10:13:51 EDT
(In reply to comment #8)
> Has this patch made it into a build yet?  

No, the patch is not in a build yet.
Comment 10 Darin Wright CLA 2010-07-15 10:16:45 EDT
*** Bug 249241 has been marked as a duplicate of this bug. ***
Comment 11 Darin Wright CLA 2010-07-15 10:17:29 EDT
*** Bug 282548 has been marked as a duplicate of this bug. ***
Comment 12 Darin Wright CLA 2010-07-15 10:17:57 EDT
*** Bug 318298 has been marked as a duplicate of this bug. ***
Comment 13 Darin Wright CLA 2010-07-15 10:18:29 EDT
*** Bug 234769 has been marked as a duplicate of this bug. ***
Comment 14 Darin Wright CLA 2010-07-15 11:21:46 EDT
Bug 320000 was created for a 3.4.2+ fix.
Comment 15 Darin Wright CLA 2010-07-15 11:49:35 EDT
Bug 320004 was created for a 3.5.2+ patch.
Comment 16 Darin Wright CLA 2010-07-15 11:50:10 EDT
Created attachment 174414 [details]
patch

patch for 3.6.1
Comment 17 Darin Wright CLA 2010-07-15 11:53:54 EDT
Released to HEAD (3.7) and 3.6.1
Comment 18 Dani Megert CLA 2010-08-27 03:34:55 EDT
Can someone please verify this bug against M20100825-0800. Thanks.
Comment 19 Michael Rennie CLA 2010-08-27 11:31:42 EDT
Verified. The fix no longer throws NPEs for non-visible members.
Comment 20 Michael Rennie CLA 2012-07-11 09:46:13 EDT
*** Bug 318544 has been marked as a duplicate of this bug. ***