Community
Participate
Working Groups
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)
I'm building against JDK 1.4.2_05 and running Eclipse on JDK 5.0.
Interestingly the offending method spans from line 171 to 193.
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.
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...
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.
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.