Community
Participate
Working Groups
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.
looks like an AJDT problem
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.
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.
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.
Done. Build server is currently down, but I will notify you when there is a build available. So you can try it.