Bug 121212 - NullPointer in compiler when used in Eclipse 3.1
Summary: NullPointer in compiler when used in Eclipse 3.1
Status: RESOLVED WONTFIX
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-16 09:49 EST by christian campo CLA
Modified: 2006-02-15 06:15 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description christian campo CLA 2005-12-16 09:49:21 EST
java.lang.NullPointerException
at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1015)
at org.aspectj.ajdt.internal.compiler.AjCompilerAdapter.weave(AjCompilerAdapter.java:300)
at org.aspectj.ajdt.internal.compiler.AjCompilerAdapter.afterCompiling(AjCompilerAdapter.java:178)
at org.aspectj.ajdt.internal.compiler.CompilerAdapter.ajc$afterReturning$org_aspectj_ajdt_internal_compiler_CompilerAdapter$2$f9cc9ca0(CompilerAdapter.aj:70)
at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:367)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:759)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:249)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.incrementalBuild(AjBuildManager.java:158)
at org.aspectj.ajde.internal.CompilerAdapter.compile(CompilerAdapter.java:117)
at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run(AspectJBuildManager.java:191)

NullPointerException thrown: null
Comment 1 Helen Beeken CLA 2005-12-16 10:03:17 EST
Christian - could you provide more information about what you were doing when you saw the NPE? For example, how many aspects do you have? What do your aspects look like? Are you seeing this all the time? Was this after a full or incremental build? Are you using AspectJ RC1?

Just as a note, the stack trace provided here is the same as that reported in bug 112529.
Comment 2 christian campo CLA 2005-12-16 10:24:08 EST
I was browsing through the buglist but couldn't find any simular stacktrace. The bug you pointed to could be the same problem.
Eclipse shows Version of AspectJ as 1.5.0.20051011134207. Not sure whether that is also RC1 or RC2.

The bug has happened within Eclipse when I did a Clean on the Project with the Aspect AND on the Project where I have the classes on which the aspect is applied too. I only have ONE aspect defined (with several pointcuts and advices.

I did a clean because I found that sometimes when I change an Aspect that not all classes that are using it are automatically recompiled. So to be on the save side I alway clean all affected projects manually.

It happened only ONCE so far and I have been working on it now for 2 days (not much but the aspect has already several pages)

anything more ?
christian
Comment 3 Helen Beeken CLA 2005-12-16 11:16:01 EST
Thanks for responding so quickly :-)

> Version of AspectJ as 1.5.0.20051011134207

I think this build of AspectJ is just after 1.5.0 M4 (M4 was released on 7th October). I know it's a pain, but would you be able to upgrade to the latest AJDT? This is AJDT 1.3.0 RC1 which includes AspectJ 1.5.0 RC1. The reason I ask is that bug 112529 was also raised against aspectj 1.5.0 M4 and Andy put a comment in there saying that he added some improved handling code on 14th october. This means that we can get more diagnostics if things go wrong for you in the lastest version. 

Thanks, Helen
Comment 4 Adrian Colyer CLA 2005-12-16 13:43:59 EST
yep... the error as reported can't happen in the current code base. That doesn't mean there might not be another issue lurking, but this exact problem is certainly nailed in RC1...
Comment 5 Andrew Clement CLA 2006-02-15 06:15:57 EST
Doesnt seem to be anything we can do on this bug right now.  So I'm closing it - we can reopen if a similar problem manifests in the future.