Community
Participate
Working Groups
Eclipse: 3.2RC5 I was trying to find references to variable in SWT class CBanner, when this happened. Note that this worked initially but after while it kept producing null pointer. This problem occurred even after workbench restart and closing and reopening of files. !ENTRY org.eclipse.core.jobs 4 2 2006-05-26 13:52:40.854 !MESSAGE An internal error occurred during: "Java Search". !STACK 0 java.lang.NullPointerException at org.eclipse.jdt.internal.core.search.matching.FieldLocator.matchReportReference(FieldLocator.java:221) at org.eclipse.jdt.internal.core.search.matching.PatternLocator.matchReportReference(PatternLocator.java:398) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:2034) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:2440) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:2187) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.process(MatchLocator.java:1548) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1033) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1074) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1180) at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.locateMatches(JavaSearchParticipant.java:94) at org.eclipse.jdt.internal.core.search.BasicSearchEngine.findMatches(BasicSearchEngine.java:212) at org.eclipse.jdt.internal.core.search.BasicSearchEngine.search(BasicSearchEngine.java:503) at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:538) at org.eclipse.jdt.internal.ui.search.JavaSearchQuery.run(JavaSearchQuery.java:143) at org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:93) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
I cannot reproduce your problem using either 3.2 RC6 or 3.2 RC5. It works also using either a 1.4.2 VM (build 1.4.2_12-b02) or a 1.5.0 one (build 1.5.0_07-b02), what VM were you using? Has your workspace something special or are you able to reproduce in a fresh new one?
My JVM is 1.5b06
And about reproduce this issue in a new workspace?
Please reopen if you get this NPE again using 3.2 GA. If you cannot reproduce in a brand new workspace, then let me know where I can get your corrupted workpsace in order to help me to reproduce this issue, thanks
Reopen as David got this NPE. Here's a simple test case based on his workspace's example: X.java: package q; public class X { String str; } Test.java: package p; import q.X; public class Test { String foo(X x) { return x.str; } } Search reference to field X.str => NPE!
The important point is that reference to 'str' field is flagged by compiler as not visible... Binding seems to be missing and explains the NPE!
Created attachment 56845 [details] Proposed patch
Released for 3.3 M5 in HEAD stream.
Verified for 3.3 M5 using build I20070205-1824.