Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318132 - "Exception processing async thread queue" when a breakpoint in an aspect is reached
Summary: "Exception processing async thread queue" when a breakpoint in an aspect is r...
Status: RESOLVED FIXED
Alias: None
Product: AJDT
Classification: Tools
Component: UI (show other bugs)
Version: 2.0.2   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: 2.1.1   Edit
Assignee: Andrew Eisenberg CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-27 15:10 EDT by yoav CLA
Modified: 2010-07-22 17:51 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yoav CLA 2010-06-27 15:10:42 EDT
Build Identifier: 20100218-1602

When placing a breakpoint inside an aspect, every time the breakpoint is reached a dialog box appears: Exception processing async thread queue
The call stack is:

java.lang.NullPointerException
	at org.eclipse.jdt.internal.debug.eval.ast.engine.SourceBasedSourceGenerator.getTypeName(SourceBasedSourceGenerator.java:748)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.SourceBasedSourceGenerator.buildMethodDeclaration(SourceBasedSourceGenerator.java:474)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.SourceBasedSourceGenerator.buildBody(SourceBasedSourceGenerator.java:421)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.SourceBasedSourceGenerator.buildTypeBody(SourceBasedSourceGenerator.java:370)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.SourceBasedSourceGenerator.buildTypeDeclaration(SourceBasedSourceGenerator.java:632)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.SourceBasedSourceGenerator.endVisit(SourceBasedSourceGenerator.java:988)
	at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:487)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2480)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2551)
	at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:219)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2480)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.EvaluationSourceGenerator.createEvaluationSourceFromSource(EvaluationSourceGenerator.java:152)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.EvaluationSourceGenerator.getSource(EvaluationSourceGenerator.java:213)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine.getCompiledExpression(ASTEvaluationEngine.java:226)
	at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine.evaluate(ASTEvaluationEngine.java:115)
	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:2751)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)


Reproducible: Always

Steps to Reproduce:
1. Create a project with an aspect
2. Export project to a jar
3. Run JVM in debug mode (outside Eclipse)
4. Attach to JVM 
5. Breakpoint is reached - exception occurs. The debugging can continue but each time the breakpoint is reached I get the exception.
Comment 1 Andrew Clement CLA 2010-06-27 16:01:43 EDT
looks like an AJDT problem
Comment 2 Andrew Eisenberg CLA 2010-06-27 17:11:27 EDT
I think I know what the problem is here.  It looks like the transformed version of the source code (the version that the debugger sees) for advice does not have a return value.  Since code in the debugger is expected to have a return type, there is no null check in the JDT debug code at this point.

The solution, I believe, is to add a return type to the transformed version.  Since this may have big implications for the rest of AJDT, this will not be able to make it into 2.1.0 (out next week), but I'll try to get a fix in a dev build shortly after the release.
Comment 3 Andrew Eisenberg CLA 2010-07-22 14:23:18 EDT
Working on this now.  I have a fix locally for before advice.  I am going to look at after advice.

The changes I am making may be somewhat destabilizing in that I am changing the representation of Aspect files when it is passed to JDT for parsing.  I will need to add some more tests for this.
Comment 4 Andrew Eisenberg CLA 2010-07-22 17:18:37 EDT
OK.  Fix for after advice is available.  Some relevant tests are passing, but I have not checked on full test suite yet (takes too long).  I'll be committing shortly.
Comment 5 Andrew Eisenberg CLA 2010-07-22 17:51:36 EDT
Done.

Build server is currently down, but I will notify you when there is a build available.  So you can try it.