Bug 79772 - Internal compiler error with I20041123/24/30
Summary: Internal compiler error with I20041123/24/30
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.1 M4   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-30 09:48 EST by Marco Qualizza CLA
Modified: 2004-12-07 10:07 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 Marco Qualizza CLA 2004-11-30 09:48:40 EST
Right now I can only report the error that I've been receiving with the last 3
builds.  I'm trying to reproduce it with a simple test case (that I can release
;-) ) but no luck so far.

here is the JDT compiler's error:

Internal compiler error
java.lang.ArrayIndexOutOfBoundsException: 0
at
org.eclipse.jdt.internal.compiler.classfmt.FieldInfo.readModifierRelatedAttributes(FieldInfo.java:272)
at
org.eclipse.jdt.internal.compiler.classfmt.FieldInfo.getModifiers(FieldInfo.java:101)
at
org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.createFields(BinaryTypeBinding.java:293)
at
org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.cachePartsFrom(BinaryTypeBinding.java:269)
at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:329)
at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:312)
at org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:193)
at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:122)
at
org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:176)
at
org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findImport(CompilationUnitScope.java:371)
at
org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findSingleImport(CompilationUnitScope.java:424)
at
org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInImports(CompilationUnitScope.java:308)
at
org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:358)
at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:503)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:335)
at
org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:215)
at
org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:188)
at
org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:49)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:212)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:135)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:574)
at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:616)
at org.eclipse.core.runtime.Platform.run(Platform.java:747)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:158)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:192)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:221)
at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:616)
at org.eclipse.core.runtime.Platform.run(Platform.java:747)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:224)
at
org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:243)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:272)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:142)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:203)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)
Comment 1 Marco Qualizza CLA 2004-11-30 09:50:58 EST
I'm building against JDK 1.4.2_05 and running Eclipse on JDK 5.0.
Comment 2 Philipe Mulet CLA 2004-11-30 10:03:12 EST
Interestingly the offending method spans from line 171 to 193.
Comment 3 Olivier Thomann CLA 2004-11-30 10:11:50 EST
This would mean that an attribute name is empty in a .class file. Would it be
possible to get a bigger test case if you cannot isolate it?
This would definitely help me to reproduce it.
Comment 4 Marco Qualizza CLA 2004-11-30 10:15:20 EST
Unfortunately, I can't release the code that this is happening in. :-(  I
*could* (with your extensive help ;-) ) try to get Eclipse up self-hosting and
then try to reproduce the error on the hosted environment...
Comment 5 Olivier Thomann CLA 2004-11-30 12:34:41 EST
Problem occured with obfuscated .class files.
Added extra check to check the size of the attribute name. We got an empty name.
Fixed and released in HEAD.
Marco, please validate the fix.
Comment 6 Marco Qualizza CLA 2004-12-07 10:07:38 EST
The patch did fix the problem for I20041130.  I was able to get a copy of the
unobfuscated jar, which was built with Ant against JDK 1.3.1.  The attribute
that was renamed is the Synthetic attribute -- specifically (in this case)
class$...  There were no problems running unpatched Eclipse I20041130 against
the unobfuscated jar.  As of I20041207, there are no problems with either the
obfuscated jar or the unobfuscated jar (no patches).  Fix verified.