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

Bug 529451

Summary: Open Resource dialog throws SIOOBE
Product: [Eclipse Project] Platform Reporter: Noopur Gupta <noopur_gupta>
Component: UIAssignee: Lucas Bullen <lbullen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, kalyan_prasad, karsten.thoms
Version: 4.7.1   
Target Milestone: 4.8 M6   
Hardware: PC   
OS: Windows 7   
See Also: https://git.eclipse.org/r/115072
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=56d367cbdef9fbb2bf130076ff757d80de5971ac
https://git.eclipse.org/r/115910
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=79565c1f6874c35b23d1eb44b159d6c587a953a8
https://git.eclipse.org/r/116051
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=5c9c638c83b7aba091320a4699ca567ff5e7776e
Whiteboard:
Bug Depends on: 520250    
Bug Blocks:    

Description Noopur Gupta CLA 2018-01-05 08:01:43 EST
I20180101-2000

Type the pattern *$ in Open Resource dialog. It results in the following exception:

java.lang.StringIndexOutOfBoundsException: Invalid offset (17) or length (1)
	at org.eclipse.jface.viewers.StyledString.setStyle(StyledString.java:368)
	at org.eclipse.ui.dialogs.FilteredResourcesSelectionDialog$ResourceItemLabelProvider.markRegions(FilteredResourcesSelectionDialog.java:692)
	at org.eclipse.ui.dialogs.FilteredResourcesSelectionDialog$ResourceItemLabelProvider.getStyledText(FilteredResourcesSelectionDialog.java:653)
	at org.eclipse.ui.dialogs.FilteredItemsSelectionDialog$ItemsListLabelProvider.getStyledText(FilteredItemsSelectionDialog.java:1609)
	at org.eclipse.ui.dialogs.FilteredItemsSelectionDialog$ItemsListLabelProvider.update(FilteredItemsSelectionDialog.java:1626)
...
Comment 1 Eclipse Genie CLA 2018-01-08 16:03:40 EST
New Gerrit change created: https://git.eclipse.org/r/115072
Comment 3 Lucas Bullen CLA 2018-01-22 12:50:22 EST
Verified fixed in I20180122-0800
Comment 4 Lucas Bullen CLA 2018-01-23 14:32:56 EST
Fix causes failure in win32 tests as '>' and '<' are not allowed in file names.
Comment 5 Eclipse Genie CLA 2018-01-23 14:38:04 EST
New Gerrit change created: https://git.eclipse.org/r/115910
Comment 7 Kalyan Prasad Tatavarthi CLA 2018-01-25 10:01:27 EST
The test testBug529541 fails with the below exception with the latest changes

org.eclipse.core.internal.resources.ResourceException: | is an invalid character in resource name '^${skip}[])(+|s-'.
	at org.eclipse.core.internal.resources.Resource.checkValidPath(Resource.java:433)
	at org.eclipse.core.internal.resources.File.create(File.java:103)
	at org.eclipse.core.internal.resources.File.create(File.java:181)
	at org.eclipse.ui.tests.dialogs.ResourceItemLabelTest.getStyleRanges(ResourceItemLabelTest.java:196)
	at org.eclipse.ui.tests.dialogs.ResourceItemLabelTest.testBug529451(ResourceItemLabelTest.java:129)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at junit.framework.TestCase.runTest(TestCase.java:176)
	at junit.framework.TestCase.runBare(TestCase.java:141)
	at junit.framework.TestResult$1.protect(TestResult.java:122)
	at junit.framework.TestResult.runProtected(TestResult.java:142)
	at junit.framework.TestResult.run(TestResult.java:125)
	at junit.framework.TestCase.run(TestCase.java:129)
	at junit.framework.TestSuite.runTest(TestSuite.java:252)
	at junit.framework.TestSuite.run(TestSuite.java:247)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:538)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460)
	at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:178)
	at org.eclipse.pde.internal.junit.runtime.PlatformUITestHarness.lambda$0(PlatformUITestHarness.java:43)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:37)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4218)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3825)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:681)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:595)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
	at org.eclipse.pde.internal.junit.runtime.NonUIThreadTestApplication.runApp(NonUIThreadTestApplication.java:52)
	at org.eclipse.pde.internal.junit.runtime.UITestApplication.runApp(UITestApplication.java:43)
	at org.eclipse.pde.internal.junit.runtime.NonUIThreadTestApplication.start(NonUIThreadTestApplication.java:46)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:656)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:592)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1498)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1471)
Comment 8 Eclipse Genie CLA 2018-01-25 10:45:15 EST
New Gerrit change created: https://git.eclipse.org/r/116051