Bug 59983 - [1.5] Internal compiler error
Summary: [1.5] Internal compiler error
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 60729 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-04-26 13:34 EDT by Stefan Matthias Aust CLA
Modified: 2005-01-11 11:02 EST (History)
1 user (show)

See Also:


Attachments
Test case (2.78 KB, application/octet-stream)
2004-04-26 13:59 EDT, Stefan Matthias Aust CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Matthias Aust CLA 2004-04-26 13:34:11 EDT
With Cheetah04 and I200404220800, one class of my project doesn't compile
anymore.  It worked with 03. The stack trace is shown below.  I wasn't able to
create a minimal set of classes to reproduce the bug.  If I modify and save
another class, the affected class compiles correctly.  The generated code seems
to run. Once I edit the affected class, the error occurs again.

Internal compiler error
java.lang.Error: Undefined base type: >
	at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeFromSignature(LookupEnvironment.java:649)
	at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeFromTypeSignature(LookupEnvironment.java:691)
	at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeFromVariantTypeSignature(LookupEnvironment.java:742)
	at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeArgumentsFromSignature(LookupEnvironment.java:564)
	at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeFromTypeSignature(LookupEnvironment.java:697)
	at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeFromVariantTypeSignature(LookupEnvironment.java:742)
	at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeArgumentsFromSignature(LookupEnvironment.java:564)
	at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeFromTypeSignature(LookupEnvironment.java:697)
	at
org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.createFields(BinaryTypeBinding.java:241)
	at
org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.cachePartsFrom(BinaryTypeBinding.java:223)
	at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:312)
	at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:297)
	at org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:191)
	at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:81)
	at
org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:43)
	at
org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:49)
	at
org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:158)
	at
org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findOnDemandImport(CompilationUnitScope.java:355)
	at
org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findSingleTypeImport(CompilationUnitScope.java:414)
	at
org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInImports(CompilationUnitScope.java:291)
	at
org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:341)
	at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:518)
	at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:333)
	at
org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:209)
	at
org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:159)
	at
org.eclipse.jdt.internal.core.builder.IncrementalImageBuilder.build(IncrementalImageBuilder.java:113)
	at
org.eclipse.jdt.internal.core.builder.JavaBuilder.buildDeltas(JavaBuilder.java:223)
	at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:151)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:544)
	at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:609)
	at org.eclipse.core.runtime.Platform.run(Platform.java:541)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:148)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:240)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:178)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:208)
	at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:609)
	at org.eclipse.core.runtime.Platform.run(Platform.java:541)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:211)
	at
org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:259)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:288)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:150)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:189)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)


The affected class contains no ">" if that matters.  Neither does its
superclass. Both classes do NOT use generics or other 1.5 features.  The only
other class the first class refers to is a class using List<Player> in a
different package.  If I recreate the szenario in a new project, I can't
reproduce that error :(
Comment 1 Olivier Thomann CLA 2004-04-26 13:37:50 EDT
Could you please provide your test case?
Thanks.
Comment 2 Kent Johnson CLA 2004-04-26 13:43:17 EDT
This is a .class file related problem.

You will need to change & compile a class that refers to the type causing 
problems so that we read it as a .class file.
Comment 3 Stefan Matthias Aust CLA 2004-04-26 13:46:04 EDT
As I tried to explain - unfortunately, I've no test case.  And franky, I don't
want to attach my whole project here...
Comment 4 Stefan Matthias Aust CLA 2004-04-26 13:59:19 EDT
Created attachment 9974 [details]
Test case

Okay, got it.  The attached test.zip contains a project where compiling "PT"
raises the internal error.  If you edit "Cmd", the error goes away and if you
edit "PT" it comes back.

Hope this helps.
Comment 5 Philipe Mulet CLA 2004-04-26 17:09:49 EDT
Reproduced. Thanks for the good test case.
Comment 6 Philipe Mulet CLA 2004-04-26 17:25:06 EDT
We misgenerate a type signature, and thus fail to decode it:
Ljava/util/List<Lgame/Game<>;>;
Comment 7 Philipe Mulet CLA 2004-04-26 17:43:17 EDT
Reduced test case is:

import java.util.List;
public class X {
	private List<X> games;
}

Signature for field is incorrect, and thus causing incremental compilation 
failure.

Adding regression test: GenericTypeSignatureTest#test014
Comment 8 Philipe Mulet CLA 2004-04-26 17:51:43 EDT
Fixed.
Comment 9 Philipe Mulet CLA 2004-05-07 11:02:45 EDT
*** Bug 60729 has been marked as a duplicate of this bug. ***