Bug 271426 - NPE in CoreCompilerConfiguration.flushOutputLocationManagerIfNecessary()
Summary: NPE in CoreCompilerConfiguration.flushOutputLocationManagerIfNecessary()
Status: RESOLVED FIXED
Alias: None
Product: AJDT
Classification: Tools
Component: Core (show other bugs)
Version: 1.6.5   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 2.0.0   Edit
Assignee: AJDT-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-07 05:18 EDT by Neale Upstone CLA
Modified: 2009-05-11 17:52 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Neale Upstone CLA 2009-04-07 05:18:58 EDT
Build ID: 3.4.2  M20090211-1700

This was on my first, and subsequent builds after updating to:
Version: 1.6.5.20090406092227
AspectJ version: 1.6.5.20090406084900


The problem went away after uninstall/reinstall of AJDT components via the updates UI.


It may be worth a quick look at the code to see if there's an obvious explanation/fix.



More information:
java.lang.NullPointerException
at org.eclipse.ajdt.internal.core.ajde.CoreCompilerConfiguration.flushOutputLocationManagerIfNecessary(CoreCompilerConfiguration.java:201)
at org.eclipse.ajdt.core.builder.AJBuilder.build(AJBuilder.java:231)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:633)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 1 Andrew Eisenberg CLA 2009-04-07 11:44:05 EDT
Yes.  It's conceivable that the locationManager field can be null at this point (might happen on the compile after a compile that was canceled).  A null check here should do the trick.

Added the check.  Leaving open for now until I commit the fix.
Comment 2 Andrew Eisenberg CLA 2009-04-08 13:27:16 EDT
This is now available in the latest dev build.  Keeping this bug open in case you see it again.
Comment 3 Andrew Eisenberg CLA 2009-04-16 23:13:24 EDT
Closing this bug since it has been addressed.