Community
Participate
Working Groups
Searching reference of "String" (after selecting java element "String" in source) in workspace, hierarchy and project cause an error : !ENTRY org.eclipse.jdt.ui 4 10001 Oct 11, 2003 18:53:34.586 !MESSAGE Internal Error !STACK 0 java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:283) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run (ProgressMonitorDialog.java:386) at org.eclipse.jdt.ui.actions.FindAction.run(FindAction.java:292) at org.eclipse.jdt.ui.actions.FindReferencesAction.run (FindReferencesAction.java:83) at org.eclipse.jdt.ui.actions.FindAction.run(FindAction.java:238) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:196) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:172) at org.eclipse.jface.action.Action.runWithEvent(Action.java:842) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:541) at org.eclipse.jface.action.ActionContributionItem.access$4 (ActionContributionItem.java:494) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent (ActionContributionItem.java:466) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:847) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2173) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1863) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2347) at org.eclipse.ui.internal.Workbench.run(Workbench.java:2330) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.core.launcher.Main.basicRun(Main.java:299) at org.eclipse.core.launcher.Main.run(Main.java:765) at org.eclipse.core.launcher.Main.main(Main.java:599) Caused by: java.lang.NullPointerException at org.eclipse.jdt.internal.core.SourceMapper.findSourceFileName (SourceMapper.java:842) at org.eclipse.jdt.internal.core.search.matching.PossibleMatch.getSourceFileName (PossibleMatch.java:125) at org.eclipse.jdt.internal.core.search.matching.PossibleMatch.getQualifiedName (PossibleMatch.java:101) at org.eclipse.jdt.internal.core.search.matching.PossibleMatch.<init> (PossibleMatch.java:38) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches (MatchLocator.java:740) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:568) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:495) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:96) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:71) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1555) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1572) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:85) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:101)
Same thing while searching 'Vector' : bug a few seconds after the beginning of the progress information dialog. If it can help, my project consist of 1102 java files. The error log is : !ENTRY org.eclipse.jdt.ui 4 10001 Oct 11, 2003 19:59:20.119 !MESSAGE Internal Error !STACK 0 java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:283) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run (ProgressMonitorDialog.java:386) at org.eclipse.jdt.ui.actions.FindAction.run(FindAction.java:292) at org.eclipse.jdt.ui.actions.FindReferencesAction.run (FindReferencesAction.java:83) at org.eclipse.jdt.ui.actions.FindAction.run(FindAction.java:238) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:196) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:172) at org.eclipse.jface.action.Action.runWithEvent(Action.java:842) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:541) at org.eclipse.jface.action.ActionContributionItem.access$4 (ActionContributionItem.java:494) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent (ActionContributionItem.java:466) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:847) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2173) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1863) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2347) at org.eclipse.ui.internal.Workbench.run(Workbench.java:2330) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.core.launcher.Main.basicRun(Main.java:299) at org.eclipse.core.launcher.Main.run(Main.java:765) at org.eclipse.core.launcher.Main.main(Main.java:599) Caused by: java.lang.OutOfMemoryError
Did you start Eclipse with option: -vmargs -Xmx256Mb to give more memory to the Java VM ? Kent - the NPE looks suspicious.
It's OK for 'Vector' with more memory but for 'String' there is still the NPE !
Added protection in the SourceMapper for the declaringType being null.
There is the same problem in I20031015. Problems occurs when you search for a string variable reference in the workspace for example. Sample of code : String urlStr = url.toString(); Searching reference for 'urlStr' does a bug. Error log : !ENTRY org.eclipse.jdt.ui 4 10001 Oct 16, 2003 13:35:39.869 !MESSAGE Internal Error !STACK 0 java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:283) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run (ProgressMonitorDialog.java:386) at org.eclipse.jdt.ui.actions.FindAction.run(FindAction.java:292) at org.eclipse.jdt.ui.actions.FindReferencesAction.run (FindReferencesAction.java:83) at org.eclipse.jdt.ui.actions.FindAction.run(FindAction.java:238) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:196) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:172) at org.eclipse.jface.action.Action.runWithEvent(Action.java:842) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:547) at org.eclipse.jface.action.ActionContributionItem.access$4 (ActionContributionItem.java:494) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent (ActionContributionItem.java:466) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:847) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2173) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1863) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2361) at org.eclipse.ui.internal.Workbench.run(Workbench.java:2344) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.core.launcher.Main.basicRun(Main.java:299) at org.eclipse.core.launcher.Main.run(Main.java:765) at org.eclipse.core.launcher.Main.main(Main.java:599) Caused by: java.lang.NullPointerException at org.eclipse.jdt.internal.core.search.matching.PossibleMatch.getQualifiedName (PossibleMatch.java:105) at org.eclipse.jdt.internal.core.search.matching.PossibleMatch.<init> (PossibleMatch.java:38) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches (MatchLocator.java:740) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:568) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:495) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:96) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:71) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1555) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1572) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:85) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:101)
You cannot select a local variable & search for references. I'm having no problems searching for references to the type String, as long as I have enough memory available.
I can not reproduce the bug so i close it.
Verified.