Bug 100074 - ClassCastException while doing a Java Search
Summary: ClassCastException while doing a Java Search
Status: RESOLVED WORKSFORME
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.2 M6   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-14 16:38 EDT by Nicholaus Shupe CLA
Modified: 2006-03-27 07:00 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 Nicholaus Shupe CLA 2005-06-14 16:38:57 EDT
While doing a JavaSearch, and having things blow up, I found the following in my
log:

!ENTRY org.eclipse.core.runtime 4 2 2005-06-13 14:15:45.56
!MESSAGE An internal error occurred during: "Java Search".
!STACK 0
java.lang.ClassCastException:
org.eclipse.jdt.internal.compiler.lookup.MemberTypeBinding
	at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:477)
	at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:465)
	at
org.eclipse.jdt.internal.core.search.matching.MatchLocator.accept(MatchLocator.java:342)
	at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:99)
	at
org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:43)
	at
org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:85)
	at
org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveTypesFor(BinaryTypeBinding.java:751)
	at
org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.methods(BinaryTypeBinding.java:734)
	at
org.eclipse.jdt.internal.core.search.matching.ClassFileMatchLocator.locateMatches(ClassFileMatchLocator.java:71)
	at
org.eclipse.jdt.internal.core.search.matching.MatchLocator.process(MatchLocator.java:1423)
	at
org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:939)
	at
org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:980)
	at
org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1097)
	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:421)
	at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:532)
	at org.eclipse.jdt.internal.ui.search.JavaSearchQuery.run(JavaSearchQuery.java:135)
	at
org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:93)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
Comment 1 Philipe Mulet CLA 2005-06-15 07:59:03 EDT
Please provide steps to reproduce.
Comment 2 Kent Johnson CLA 2005-06-15 10:40:43 EDT
Can you please see if any of your source files have an Internal Compiler error 
attached... it would give us a starting point for a testcase if you could 
attach the source for that file/project.

thanks
Comment 3 Nicholaus Shupe CLA 2005-06-16 12:06:14 EDT
(In reply to comment #2)
> Can you please see if any of your source files have an Internal Compiler error 
> attached... it would give us a starting point for a testcase if you could 
> attach the source for that file/project.
> 
> thanks

Sadly enough, I can't reproduce the error itself nor do I have the permission to
send you guys any of the source code.  The .log file also doesn't indicate which
file caused the problem.  Usually ClassCastExceptions are easy to fix for me, so
I figured I'd send the trace.

Here's the steps I did initially:

1.  Select a workspace with 5 projects in it.
2.  Press Control-H with 3 editors open.
3.  Enter in "sessionFactory"
4.  Select field, all occurrences, selected resources.
5.  Click search.

Right now, the bug isn't reproducing itself.  Perhaps it was caused by high
energy particles from space flipping bits.
Comment 4 Kent Johnson CLA 2005-06-16 12:14:28 EDT
This ClassCastException makes no sense... that's why we need a testcase to 
figure it out.

If it happens again, please reopen this PR with any additional info that you 
have.

But just to clarify, you are NOT seeing this at compile time? All of your 
source compiles fine?
Comment 5 Philipe Mulet CLA 2006-03-27 07:00:01 EST
reopening to close properly
Comment 6 Philipe Mulet CLA 2006-03-27 07:00:12 EST
closing since didn't hear back in a long time.