Bug 196301 - NPE when launching an SSH Shell
Summary: NPE when launching an SSH Shell
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P1 major (vote)
Target Milestone: 2.0.1   Edit
Assignee: David McKnight CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on: 191599
Blocks:
  Show dependency tree
 
Reported: 2007-07-12 09:00 EDT by Martin Oberhuber CLA
Modified: 2007-07-12 11:23 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 Martin Oberhuber CLA 2007-07-12 09:00:52 EDT
+++ This bug was initially created as a clone of Bug #191599 +++

Launching a Shell on an SSH Only connection gives two NPEs. This is a major limitation. I believe it was introduced as regression by the fix for bug #191599.

java.lang.NullPointerException: charsetName
	at java.io.InputStreamReader.<init>(InputStreamReader.java:82)
	at org.eclipse.rse.internal.services.ssh.shell.SshHostShell.<init>(SshHostShell.java:84)
	at org.eclipse.rse.internal.services.ssh.shell.SshShellService.launchShell(SshShellService.java:52)
	at org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystem.internalRunShell(ShellServiceSubSystem.java:146)
	at org.eclipse.rse.subsystems.shells.core.subsystems.RemoteCmdSubSystem.runShell(RemoteCmdSubSystem.java:812)
	at org.eclipse.rse.internal.shells.ui.actions.SystemCommandAction$RunShellJob.run(SystemCommandAction.java:115)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
java.lang.NullPointerException
	at org.eclipse.rse.internal.services.ssh.shell.SshHostShell.writeToShell(SshHostShell.java:155)
	at org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ServiceCommandShell.writeToShell(ServiceCommandShell.java:111)
	at org.eclipse.rse.internal.subsystems.shells.ssh.SshServiceCommandShell.writeToShell(SshServiceCommandShell.java:207)
	at org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystem.internalSendCommandToShell(ShellServiceSubSystem.java:180)
	at org.eclipse.rse.subsystems.shells.core.subsystems.RemoteCmdSubSystem.sendCommandToShell(RemoteCmdSubSystem.java:910)
	at org.eclipse.rse.internal.shells.ui.view.CommandsViewPage.sendInput(CommandsViewPage.java:449)
	at org.eclipse.rse.internal.shells.ui.view.CommandsViewPage.sendInput(CommandsViewPage.java:436)
	at org.eclipse.rse.internal.shells.ui.view.CommandsViewPage$1.handleEvent(CommandsViewPage.java:110)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:947)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:975)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:971)
	at org.eclipse.swt.widgets.Widget.wmKeyUp(Widget.java:1670)
	at org.eclipse.swt.widgets.Control.WM_KEYUP(Control.java:3996)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:3702)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:291)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4364)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2264)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3291)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
	at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1144)
Comment 1 Martin Oberhuber CLA 2007-07-12 09:01:42 EDT
Dave can you please fix this regression, I'm considering re-spinning today's I-build when done.
Comment 2 David McKnight CLA 2007-07-12 09:31:15 EDT
My fault, I assumed that an encoding would always be available for the host, but apparently that's not the case.
Comment 3 David McKnight CLA 2007-07-12 09:34:25 EDT
I've committed a fix for this that checks whether the encoding is null or not before using it.
Comment 4 Martin Oberhuber CLA 2007-07-12 11:22:57 EDT
Wouldn't the same change also be needed for Telnet?
It's a clone of SSH but it looks like it doesn't observe the encoding right now.
Comment 5 Martin Oberhuber CLA 2007-07-12 11:23:12 EDT
Oops, wrong bug...