Community
Participate
Working Groups
I use AspectJ 1.1 from within eclipse. After some time of developing, I get following stack trace (Wrapped in the eclipse gui), when I try to compile a java file with a huge amount of syntax errors, missing variables, and other problems. As soon as I have fixed these issues, I can comnpile normally as ever. Unfortunatly I can not provide any more detailed information because: this errors pops up randomly, disappears when the bug is fixed, I have neither the time nor the permission to create a more accurate sample java.lang.NullPointerException at java.lang.String.<init>(String.java:214) at org.aspectj.ajdt.internal.core.builder.AsmBuilder.visit (AsmBuilder.java:231) at org.aspectj.ajdt.internal.core.builder.AsmBuilder.visit (AsmBuilder.java:259) at org.eclipse.jdt.internal.compiler.ast.AnonymousLocalTypeDeclaration.traverse (AnonymousLocalTypeDeclaration.java:138) at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.traverse (QualifiedAllocationExpression.java:342) at org.eclipse.jdt.internal.compiler.ast.MessageSend.traverse (MessageSend.java:299) at org.eclipse.jdt.internal.compiler.ast.Block.traverse(Block.java:147) at org.eclipse.jdt.internal.compiler.ast.ForStatement.traverse (ForStatement.java:347) at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.traverse (MethodDeclaration.java:157) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse (TypeDeclaration.java:946) at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse (CompilationUnitDeclaration.java:303) at org.aspectj.ajdt.internal.core.builder.AsmBuilder.internalBuild (AsmBuilder.java:169) at org.aspectj.ajdt.internal.core.builder.AsmBuilder.build (AsmBuilder.java:66) at org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.finishedCompilationUnit (EclipseFactory.java:303) at org.aspectj.ajdt.internal.compiler.AjCompiler.process(AjCompiler.java:67) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:338) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation (AjBuildManager.java:372) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild (AjBuildManager.java:133) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild (AjBuildManager.java:78) at org.aspectj.ajde.internal.CompilerAdapter.compile (CompilerAdapter.java:117) at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run (AspectJBuildManager.java:164) LoadTest.java CrefoClient/src/com/dcbank/scoring/socketserver kind regards Arno Schmidmeier
This appears to be caused by an invalid local type declaration causing the asm builder to be confused. I'm assigning this to Mik in the hopes that he'll have the time to isolate this into a test case. The fix is almost certainly to add a null check on AsmBuilder.java:231; however, I'd like to get a test case that reproduces the bug before fixing it.
Added AsmBuilderTest class that tests handling for this and related null parameters.