Bug 44697 - Bug when i search reference of 'String' in 3.0M4
Summary: Bug when i search reference of 'String' in 3.0M4
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M5   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-11 13:25 EDT by Michel D. CLA
Modified: 2003-11-20 12:45 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michel D. CLA 2003-10-11 13:25:38 EDT
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)
Comment 1 Michel D. CLA 2003-10-11 14:21:24 EDT
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
Comment 2 Philipe Mulet CLA 2003-10-11 15:41:27 EDT
Did you start Eclipse with option: -vmargs -Xmx256Mb to give more memory to the 
Java VM ? 

Kent - the NPE looks suspicious.
Comment 3 Michel D. CLA 2003-10-11 16:22:31 EDT
It's OK for 'Vector' with more memory
but for 'String' there is still the NPE !
Comment 4 Kent Johnson CLA 2003-10-14 11:39:13 EDT
Added protection in the SourceMapper for the declaringType being null.
Comment 5 Michel D. CLA 2003-10-16 07:58:38 EDT
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)
Comment 6 Kent Johnson CLA 2003-10-17 13:58:19 EDT
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.
Comment 7 Michel D. CLA 2003-10-20 16:19:43 EDT
I can not reproduce the bug so i close it.
Comment 8 David Audel CLA 2003-11-20 12:45:45 EST
Verified.