| Summary: | NPE from remote java script launch delegate | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] JSDT | Reporter: | Curtis Windatt <curtis.windatt.public> | ||||
| Component: | Debug | Assignee: | Michael Rennie <Michael_Rennie> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Simon Kaegi <simon_kaegi> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | thatnitind | ||||
| Version: | 3.2 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Curtis Windatt
I wasn't paying attention, the name isn't null, the vm is. There should probably be a null check with a more descriptive error sent. If the connector fails to establish a connection to the crossfire extension it may return null instead of throwing an IOException. That could be a bug in the connector.
To make it a little better experience for me I added the following to RemoteJavaScriptLaunchDelegate just before the JavaScriptDebugTarget is created.
if (vm == null){
Status status = new Status(IStatus.ERROR, JavaScriptDebugPlugin.PLUGIN_ID, "Connection with the vm could not be established"); //$NON-NLS-1$
throw new CoreException(status);
}
Created attachment 171537 [details]
fix
The underlying problem was that I did not respect my own API doc :)
In the Crossfire connector I was catching an IOException and returning null, when I should have been re-throwing the exception
I updated the patch on bug 312844 to include a fix to avoid the two cases where the connector could return null. applied patch to HEAD (to the crossfire dev bundle) - also throws an IOException for trying to auto-launch browser not on localhost. |