Bug 100179

Summary: ArrayIndexOutOfBoundsException during AST creation
Product: [Eclipse Project] JDT Reporter: Dan Campers <campers>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: CLOSED WORKSFORME QA Contact:
Severity: critical    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 RC3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
zip of the eclipse project none

Description Dan Campers CLA 2005-06-15 09:54:53 EDT
I have a problem that has appeared just recently, that I think was about the 
time I started using RC1 (previously on M7). I have just done a clean install of 
RC2 and made a new project, so there is no other residue from other plugins, and 
made a test project. I have stripped out most of my code and can still reproduce 
the problem.

The problem is that I can do a trivial modification, like adding a space in a 
comment, and saving the java file, then eclipse can't find an existing class 
(test.Position), that is for one of my source files. In one case (see the test.
TestProjectBuildErrors class), if I enter another space and save, then eclipse 
finds it again.

If I make a trivial modification in another particular class, eclipse cant find 
that class file again (test.Position), and then the only way to get eclipse to 
'find' it again it to clean the project and do a rebuild (eg make a modification 
in test.Portfolio)
Comment 1 Dan Campers CLA 2005-06-15 10:03:18 EDT
Created attachment 23190 [details]
zip of the eclipse project

Zip of the eclipse project that demonstrates the bug. You will need to add
log4j to the /lib folder and updated the build path.
Comment 2 Dan Campers CLA 2005-06-15 10:10:32 EDT
My .log file appeared, couldnt see it before. Stack trace is

!MESSAGE Error in JDT Core during AST creation
!STACK 0
java.lang.ArrayIndexOutOfBoundsException: 438
	at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.
createMethod(BinaryTypeBinding.java:318)
	at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.
createMethods(BinaryTypeBinding.java:452)
	at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.
cachePartsFrom(BinaryTypeBinding.java:263)
	at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.
createBinaryTypeFrom(LookupEnvironment.java:482)
	at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.
createBinaryTypeFrom(LookupEnvironment.java:465)
	at org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:190)
	at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.
askForType(LookupEnvironment.java:125)
	at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.
getTypeOrPackage(PackageBinding.java:178)
	at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.
findImport(CompilationUnitScope.java:403)
	at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.
findSingleImport(CompilationUnitScope.java:456)
	at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.
faultInImports(CompilationUnitScope.java:321)
	at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.
faultInTypes(CompilationUnitScope.java:390)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.
resolve(CompilationUnitResolver.java:814)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.
resolve(CompilationUnitResolver.java:498)
	at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:
779)
	at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:588)
	at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider$1.run(ASTProvider.
java:566)
	at org.eclipse.core.internal.runtime.InternalPlatform.
run(InternalPlatform.java:1038)
	at org.eclipse.core.runtime.Platform.run(Platform.java:775)
	at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.
createAST(ASTProvider.java:563)
	at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.
java:493)
	at org.eclipse.jdt.internal.ui.viewsupport.
SelectionListenerWithASTManager$PartListenerGroup.
calculateASTandInform(SelectionListenerWithASTManager.java:165)
	at org.eclipse.jdt.internal.ui.viewsupport.
SelectionListenerWithASTManager$3.run(SelectionListenerWithASTManager.java:142)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
Comment 3 Dan Campers CLA 2005-06-15 10:29:09 EDT
Updated summary after seeing the stack trace
Comment 4 Kent Johnson CLA 2005-06-15 11:22:40 EDT
Sorry I cannot read your zip file... not in standard 2.0 format.

Can you please attach the files individually or use another zip utility.

thanks
Comment 5 Kent Johnson CLA 2005-06-15 11:25:39 EDT
forget it - got it.
Comment 6 Kent Johnson CLA 2005-06-15 12:01:36 EDT
Cannot reproduce on the latest but was able to reproduce on RC2.

Please reopen if the problem still exists in your full workspace.
Comment 7 Dan Campers CLA 2005-06-17 23:31:37 EDT
Verified problem is fixed with eclipse-SDK-I20050617-1618-win32 (~RC3)