Bug 92115 - [search] NPE in MethodLocator.matchReportReference
Summary: [search] NPE in MethodLocator.matchReportReference
Status: RESOLVED DUPLICATE of bug 92315
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.1 M7   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-20 13:05 EDT by Nick Edgar CLA
Modified: 2005-04-22 12:20 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Edgar CLA 2005-04-20 13:05:03 EDT
build I20050413

- Platform UI in source
- opened type on ColorUtils (in org.eclipse.ui.internal.themes)
- search for refs to the static private method "process"
- got the following

!ENTRY org.eclipse.core.runtime 4 2 2005-04-20 12:53:25.869
!MESSAGE An internal error occurred during: "Java Search".
!STACK 0
java.lang.NullPointerException
	at
org.eclipse.jdt.internal.core.search.matching.MethodLocator.matchReportReference(MethodLocator.java:218)
	at
org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:1792)
	at
org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:2056)
	at
org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:1859)
	at
org.eclipse.jdt.internal.core.search.matching.MatchLocator.process(MatchLocator.java:1397)
	at
org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:932)
	at
org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:973)
	at
org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1090)
	at
org.eclipse.jdt.internal.core.search.JavaSearchParticipant.locateMatches(JavaSearchParticipant.java:94)
	at
org.eclipse.jdt.internal.core.search.BasicSearchEngine.findMatches(BasicSearchEngine.java:208)
	at
org.eclipse.jdt.internal.core.search.BasicSearchEngine.search(BasicSearchEngine.java:394)
	at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:532)
	at org.eclipse.jdt.internal.ui.search.JavaSearchQuery.run(JavaSearchQuery.java:131)
	at
org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:93)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:67)
Comment 1 Nick Edgar CLA 2005-04-20 13:05:57 EDT
It should have found the single reference in
 public static RGB getColorValue(String rawValue)
Comment 2 Frederic Fusier CLA 2005-04-20 16:09:08 EDT
Nick,

I cannot reproduce this problem. It sounds that something wrong happens which
should not (see bug 90233).
Is it reproducible in your workspace? Do you have other project in your
workspace? Are they all source or some of them are binary ones? How *exactly*
did you launch the search (dialog or menu items, scope, etc...)?

Looking at your build ID, I wonder this was not an usable build. I'm using build
I20040414-1547 and does not have any trouble: I always find match in
getColorValue method...

Any other hits to help me to find what happens here?
Comment 3 Nick Edgar CLA 2005-04-20 16:46:41 EDT
I'm using:
VM: pj9n142ifx-20041206
command line: eclipse -clean -vm D:\pj9n142ifx-20041206\bin\java -data
d:\eclipse-new\plugins -showLocation -debug -dev bin -console -vmargs -Xj9 
-Xjit:disableEDO
-Xdump:heap+java:events=throw,filter=java/lang/IllegalMonitorStateException

The last two are to work around a JIT bug which was causing spurious
IllegalMonitorStateException's.

I have lots of projects in my workspace (runtime, resources, JFace, Workbench,
Text) and several host plug-ins added to the Java search path (JDT UI, PDE UI,
Debug UI, ...).

I invoke search using Ctrl+Shift+G with the caret on the method name.
Comment 4 Nick Edgar CLA 2005-04-20 16:54:41 EDT
Some of my projects are closed.

I just switched to the Sun JDK 1.4.2_01, and the same problem occurred, which
suggests it's not a JIT bug.

In order to help track this down, I suggest breaking the line up, using separate
vars for each step, and asserting that they're not null.
Comment 5 Frederic Fusier CLA 2005-04-22 12:20:36 EDT
Nick, you can delete your workspace. I got one example in duplicate bug I can
reproduce easily.
Thanks

*** This bug has been marked as a duplicate of 92315 ***