Community
Participate
Working Groups
Doing a particular search for the attached project creates a "String out of range error". Steps: 1) Import attach project 2) Go to Search->Search and search for: b* Search error: String index out of range: -1 Log: !ENTRY org.eclipse.jdt.ui 4 10001 Feb 20, 2004 09:59:30.734 !MESSAGE Internal Error !STACK 0 java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:283) at org.eclipse.search.internal.ui.util.ExtendedDialogWindow.run (ExtendedDialogWindow.java:180) at org.eclipse.jdt.internal.ui.search.JavaSearchPage.performOldSearch (JavaSearchPage.java:189) at org.eclipse.jdt.internal.ui.search.JavaSearchPage.performAction (JavaSearchPage.java:135) at org.eclipse.search.internal.ui.SearchDialog.performAction (SearchDialog.java:363) at org.eclipse.search.internal.ui.util.ExtendedDialogWindow.buttonPressed (ExtendedDialogWindow.java:147) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:402) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:627) at org.eclipse.search.internal.ui.OpenSearchDialogAction.run (OpenSearchDialogAction.java:60) at org.eclipse.search.ui.SearchUI.openSearchDialog(SearchUI.java:110) at org.eclipse.jdt.internal.ui.search.OpenJavaSearchPageAction.run (OpenJavaSearchPageAction.java:47) at org.eclipse.ui.internal.PluginAction.runWithEvent (PluginAction.java:273) at org.eclipse.ui.internal.WWinPluginAction.runWithEvent (WWinPluginAction.java:207) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:536) at org.eclipse.jface.action.ActionContributionItem.access$2 (ActionContributionItem.java:488) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent (ActionContributionItem.java:420) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1526) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench (Workbench.java:265) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:139) at org.eclipse.ui.internal.ide.IDEApplication.run (IDEApplication.java:47) at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformActivator.java:257) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:104) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:84) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:59) at java.lang.reflect.Method.invoke(Method.java:389) at org.eclipse.core.launcher.Main.basicRun(Main.java:279) at org.eclipse.core.launcher.Main.run(Main.java:742) at org.eclipse.core.launcher.Main.main(Main.java:581) Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java(Compiled Code)) at org.eclipse.jdt.internal.core.SourceMapper.findSourceFileName (SourceMapper.java(Compiled Code)) at org.eclipse.jdt.internal.core.search.matching.PossibleMatch.getSourceFileName (PossibleMatch.java(Compiled Code)) at org.eclipse.jdt.internal.core.search.matching.PossibleMatch.getQualifiedName (PossibleMatch.java(Compiled Code)) at org.eclipse.jdt.internal.core.search.matching.PossibleMatch.<init> (PossibleMatch.java(Inlined Compiled Code)) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches (MatchLocator.java(Compiled Code)) at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.locateMatches (JavaSearchParticipant.java(Compiled Code)) at org.eclipse.jdt.internal.core.search.pattern.InternalSearchPattern.findMatches (InternalSearchPattern.java(Compiled Code)) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:716) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:684) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:99) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:91) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1567) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:105) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:101)
Created attachment 8075 [details] project Java Project to import
Workbench build wswb-3.0M7-200402191300
What libraries are you using? 1.5 libraries? Could you please give us the VM used? Thanks.
The VM: java version "1.4.2" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2) Classic VM (build 1.4.2, J2RE 1.4.2 IBM Windows 32 build cndev-20040128 (JIT ena bled: jitc))
Using M7 build, I cannot reproduce this exception trying different parameters neither on Java search nor on File search... Can you be a little bit more precise on parameters you used on your search? Is this exception always reproduceable in your workspace? Thanks
Created attachment 8107 [details] workspace Workspace without the indexes. Still can create the bug easily.
I can reproduce this bug everytime I try it with the workbench build. So i have included my workspace. Steps: 1) Start eclipse with the attached workspace. 2) Go to "Search->Search" and type: b* 3) Press Search I get the above exception.
You didn't really answer my first question: when you do Search->Search, I guess your in Java search by default, is it correct? Which kind of search do you perform: Type search, Method search, other? What are you looking for: References, Declarations, other? On which scope are you searching: workspace, working set, other? These are the parameters you used I wanted to know to perform _exactly_ the same search than you...
Sorry about that. Search details: -Java Search -Search For: -Type -Limit To: -References -Scope: -Workspace
I still cannot reproduce it using your workspace, your parameters, 3.0 M7- I20040212 build or last integration build I20040919 and VM JDK1.4.2_02 or VM IBM1.4.1 (I haven't got latest IBM 1.4.2...) There's one thing I don't understand in your context: which build reference 3.0M7-200402191300 refers to? Official 3.0 M7 build has timestamp: I200402122000 Following integration build has timestamp: I200402190800 So I wonder what kind of build you're using?!
After lots of investigations, I figured out that the bug happens in the IBM JRE 1.4.2. So I will send a bug to them. Thanks Frederic for your time. Bug closed.