Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337996

Summary: NPE in console logs from I20110222-0800 build
Product: [Eclipse Project] Platform Reporter: Michael Rennie <Michael_Rennie>
Component: AntAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.7   
Target Milestone: 3.7 M6   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
fix none

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