Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 407329 - Attempting to open an include file which is not found in the build path produces exceptions
Summary: Attempting to open an include file which is not found in the build path produ...
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: RDT (show other bugs)
Version: 6.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 6.0.6   Edit
Assignee: Chris Recoskie CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-06 15:52 EDT by Violaine Batthish CLA
Modified: 2013-05-06 16:22 EDT (History)
2 users (show)

See Also:


Attachments
Patch to check for when header file not found (897 bytes, text/plain)
2013-05-06 16:15 EDT, Violaine Batthish CLA
recoskie: iplog+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Violaine Batthish CLA 2013-05-06 15:52:59 EDT
To reproduce:
1. In a remote project, have an include statement to an invalid header file
2. Click to open the file from the outline view.
The following exception is produced and displayed in a dialog:
!ENTRY org.eclipse.jface 4 2 2013-05-06 15:34:51.573
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.StringIndexOutOfBoundsException
	at java.lang.String.charAt(String.java:555)
	at org.eclipse.rse.internal.efs.RSEFileSystem.getURIFor(RSEFileSystem.java:101)
	at org.eclipse.rse.internal.efs.RSEFileStore.toURI(RSEFileStore.java:335)
	at org.eclipse.core.filesystem.provider.FileStore.getFileSystem(FileStore.java:338)
	at org.eclipse.ptp.internal.rdt.ui.editor.OpenIncludeAction.run(OpenIncludeAction.java:124)
	at org.eclipse.cdt.internal.ui.editor.AbstractCModelOutlinePage$5.doubleClick(AbstractCModelOutlinePage.java:502)
	at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:845)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:843)
	at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1477)
	at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1246)
	at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:249)
	at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:246)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:307)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:613)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1414)


I have attached a suggested patch
Comment 1 Violaine Batthish CLA 2013-05-06 16:15:31 EDT
Created attachment 230549 [details]
Patch to check for when header file not found
Comment 2 Chris Recoskie CLA 2013-05-06 16:22:07 EDT
Patch applied to ptp_6_0 and master.  Thanks V.