Bug 131540 - NullPointerException in CompilationResult.computePriority()
Summary: NullPointerException in CompilationResult.computePriority()
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.5.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-13 11:06 EST by Rob Grzywinski CLA
Modified: 2006-05-10 12:22 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Grzywinski CLA 2006-03-13 11:06:02 EST
Eclipse SDK
Version: 3.1.2
Build id: M20060118-1600

Eclipse AspectJ Development Tools
Version: 1.3.0
Build id: 20051220093604
AspectJ version: 1.5.0

I haven't correlated this to anything yet unfortunately.  Once I get it though, I will continue to get it unless I do a new build.


java.lang.NullPointerException
at org.aspectj.org.eclipse.jdt.internal.compiler.CompilationResult.computePriority(CompilationResult.java:121)
at org.aspectj.org.eclipse.jdt.internal.compiler.CompilationResult.quickPrioritize(CompilationResult.java:373)
at org.aspectj.org.eclipse.jdt.internal.compiler.CompilationResult.getProblems(CompilationResult.java:278)
at org.aspectj.org.eclipse.jdt.internal.compiler.CompilationResult.getAllProblems(CompilationResult.java:169)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager$4.acceptResult(AjBuildManager.java:874)
at org.aspectj.ajdt.internal.compiler.AjCompilerAdapter.acceptResult(AjCompilerAdapter.java:239)
at org.aspectj.ajdt.internal.compiler.WeaverAdapter.finishedWith(WeaverAdapter.java:206)
at org.aspectj.ajdt.internal.compiler.WeaverAdapter.next(WeaverAdapter.java:116)
at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1089)
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:811)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:254)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.incrementalBuild(AjBuildManager.java:163)
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 2006-03-13 11:57:04 EST
You said you hadn't been able to narrow this down to specific steps in order to reproduce.....are you able to say whether you were making changes to an aspect when this happened? 

Just as a note, its going wrong in the processing and reporting of problems so at the point this happened there must have been either compilation errors or warnings if this helps you narrow down when it's happening. 
Comment 2 Rob Grzywinski CLA 2006-03-13 12:08:36 EST
There are .aj (aspects) in the project but I was editing and saving a .java file (class) at the time.  Specifically this occurred after I saved and it was doing a build.  I believe that there were either errors before the save or after it -- but there definitely were errors in the class.

Keep in mind that this isn't something that I can reproduce.  It doesn't always occur when I have errors in the file or even errors in a file on a certain member that just so happens to be linked to an aspect (for example).

I wish I could reproduce it so that I could not do whatever it is so I would not need to keep killing the IDE :)

I am trying to reproduce.
Comment 3 Andrew Clement CLA 2006-03-14 03:43:29 EST
Stack trace looks the same as in the older bug 117190

In that bug I put in a fix for the scenario reported by Ron Bodkin, this bug may cover another route to the problem.  That code can go wrong if there are > 100 warnings/errors against a file since it tries to work out which are the most important 100.
Comment 4 Andrew Clement CLA 2006-03-14 11:17:01 EST
Without a test scenario we can't determine the route being taken to error reporting that causes us to fail to later at line 121 (the stack trace isn't it).
So, I've just committed the change that I didn't really want to do that guards for the NPE - this may fix it ... but it may cause us to fail later with something even more hideous.
Comment 5 Rob Grzywinski CLA 2006-03-14 11:21:27 EST
Is there anything that I can do (any way that I can run the environment) to get you more useful information?  I just copied that stack trace out of the convenient window that you folks provided :)
Comment 6 Rob Grzywinski CLA 2006-03-14 18:14:39 EST
I just had this happen again.  There were no errors in the project (84 warnings out of 3836 items (filters are enabled)) before I saved.  There was a single warning on the file but it existed for previous saves.  I just added some text to a javadoc (which included a {@link }) and saved when I got the popup with the stacktrace.

Again, do let me know if there is anything that I can do to help track this down.
Comment 7 Andrew Clement CLA 2006-03-15 03:05:01 EST
thanks for the offer... But the best thing to do is wait for the next AJDT that includes an AspectJ upgrade as that will stop the NPE occurring - it may give you another error to report as it'll be making it further ... or ... it may just work.

I suspect it is the 3836 items you have, that's a lot - the filters in eclipse just filter whats displayed, not whats reported back from the compiler.  As to why it was just when you edited javadoc, I'm not sure.
Comment 8 Andrew Clement CLA 2006-03-27 16:43:06 EST
the fix should be through for this in the latest AJDT - does it make any difference for you?
Comment 9 Rob Grzywinski CLA 2006-03-27 17:23:07 EST
Do the lastest builds versions require Eclipse 3.2Mx?
Comment 10 Andrew Clement CLA 2006-03-28 02:01:04 EST
The latest builds for Eclipse 3.1 or Eclipse 3.2 contain the possible fix.

The Eclipse 3.1 update site is:
http://download.eclipse.org/technology/ajdt/31/dev/update

The Eclipse 3.2 update site is: 
http://download.eclipse.org/technology/ajdt/32/dev/update

(URLs from http://eclipse.org/ajdt/downloads )
Comment 11 Wes Isberg CLA 2006-05-10 12:22:36 EDT
No response to Andy's saying the fix is available, so presumed fixed.
stalebug