Skip to content

ArrayIndexOutOfBound for Node Application launchers with PreferenceConstants.NODE_PASS_ALL_ENVIRONMENT_VARIABLES disabled. #198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ThottChief opened this issue Sep 24, 2015 · 4 comments
Milestone

Comments

@ThottChief
Copy link

Whenever I try to launch a .js file as a node application I get

java.lang.ArrayIndexOutOfBoundsException: 5
    at org.nodeclipse.debug.launch.LaunchConfigurationDelegate.getEnvironmentVariables(LaunchConfigurationDelegate.java:281)
    at org.nodeclipse.debug.launch.LaunchConfigurationDelegate.launch(LaunchConfigurationDelegate.java:221)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
    at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
    at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Happens to all normal node application launchers as well as debug launchers.

Nodeclipse version : 1.0.1.201509240713
Eclipse: 4.5.0

@ThottChief
Copy link
Author

Could determine through Github the relevant code at
https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.debug/src/org/nodeclipse/debug/launch/LaunchConfigurationDelegate.java
Line: 257

Worked around it by simply enabling PreferenceConstants.NODE_PASS_ALL_ENVIRONMENT_VARIABLES aka "pass all environment variables of Eclipse to launched Node.js app" in preferences pane.

Didn't disable it on purpose maybe on accident. Seems to be a bug anyway so I leave this here changing the title appropriately.

@ThottChief ThottChief changed the title ArrayIndexOutOfBound for Node Application launchers ArrayIndexOutOfBound for Node Application launchers with PreferenceConstants.NODE_PASS_ALL_ENVIRONMENT_VARIABLES disabled. Sep 24, 2015
@paulvi
Copy link
Member

paulvi commented Sep 25, 2015

Thanks for raising.

likely related to #197 and #81

@paulvi paulvi modified the milestones: 1.1, 1.0 Sep 25, 2015
@paulvi
Copy link
Member

paulvi commented Sep 25, 2015

OK, that is bug, because of c40583e was not checked well

@paulvi paulvi added bug and removed question labels Sep 25, 2015
@paulvi paulvi modified the milestones: 1.1, 1.0 Sep 25, 2015
@paulvi paulvi closed this as completed in 53de627 Sep 25, 2015
@paulvi paulvi modified the milestones: 1.0, 1.1 Sep 25, 2015
@paulvi
Copy link
Member

paulvi commented Sep 25, 2015

Made a 1.0.2 release because of this.

It will be published today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants