Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337996 - NPE in console logs from I20110222-0800 build
Summary: NPE in console logs from I20110222-0800 build
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.7 M6   Edit
Assignee: Michael Rennie CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-23 11:29 EST by Michael Rennie CLA
Modified: 2011-02-23 16:52 EST (History)
0 users

See Also:


Attachments
fix (10.97 KB, patch)
2011-02-23 16:51 EST, Michael Rennie CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Rennie CLA 2011-02-23 11:29:21 EST
The following NPE was found in the console logs for Windows for the I20110222-0800 build:

Exception in thread "Ant Build Server Connection" java.lang.NullPointerException
     [java] 	at org.eclipse.ant.internal.launching.launchConfigurations.RemoteAntBuildListener.generateLink(RemoteAntBuildListener.java:266)
     [java] 	at org.eclipse.ant.internal.launching.launchConfigurations.RemoteAntBuildListener.receiveTaskMessage(RemoteAntBuildListener.java:254)
     [java] 	at org.eclipse.ant.internal.launching.launchConfigurations.RemoteAntBuildListener.receiveMessage(RemoteAntBuildListener.java:160)
     [java] 	at org.eclipse.ant.internal.launching.debug.model.RemoteAntDebugBuildListener.receiveMessage(RemoteAntDebugBuildListener.java:94)
     [java] 	at org.eclipse.ant.internal.launching.launchConfigurations.RemoteAntBuildListener$ServerConnection.run(RemoteAntBuildListener.java:95)
Comment 1 Michael Rennie CLA 2011-02-23 12:21:00 EST
Looks like the build listener has been shut down (via a call the shutdown()) and then reads another message from the socket - at this point the backing ILaunch object has been null'd out, causing the NPE.

Looks like we should take note of when the listener has been shut down and stop processing messages from the socket.
Comment 2 Michael Rennie CLA 2011-02-23 16:51:40 EST
Created attachment 189649 [details]
fix

fix for the NPE and code clean-up removing some JDT warnings about assigning values to parameters.
Comment 3 Michael Rennie CLA 2011-02-23 16:52:04 EST
applied to HEAD