Bug 81825 - [1.5][compiler] Internal compiler error
Summary: [1.5][compiler] Internal compiler error
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.1 M5   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 81670 81957 82448 82474 83158 84764 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-12-22 16:20 EST by Eugene Kuleshov CLA
Modified: 2005-02-15 09:04 EST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Kuleshov CLA 2004-12-22 16:20:24 EST
I'm getting an Internal compiler error when trying to rebuild ASM code from the
HEAD using Eclipse 3.1M4. Exception is below. ASM CVS repository is at:

cvs -d:pserver:anonymous@cvs.forge.objectweb.org:/cvsroot/asm login
cvs -z3 -d:pserver:anonymous@cvs.forge.objectweb.org:/cvsroot/asm co asm

and here is the Java code that cause this issue (as it said in error log)

----
package annotations;

@ValuesAnnotation(
  byteValue = 1,
  charValue = 'A',
  booleanValue = true,
  intValue = 1,
  shortValue = 1,
  longValue = 1L,
  floatValue = 1.0f,
  doubleValue = 1.0d,
  stringValue = "A",

  enumValue = ValuesEnum.ONE,
  annotationValue = @ValueAttrAnnotation( "annotation"),
  classValue = Values.class,

  byteArrayValue = { 1, -1},
  charArrayValue = { 'c', 'b', (char)-1},
  booleanArrayValue = {true, false},
  intArrayValue = { 1, -1},
  shortArrayValue = { (short)1, (short)-1},
  longArrayValue = { 1L, -1L},
  floatArrayValue = { 1.0f, -1.0f},
  doubleArrayValue = { 1.0d, -1.0d},
  stringArrayValue = { "aa", "bb"},

  enumArrayValue = {ValuesEnum.ONE, ValuesEnum.TWO},
  annotationArrayValue = {@ValueAttrAnnotation( "annotation1"),
@ValueAttrAnnotation( "annotation2")},
  classArrayValue = {Values.class, Values.class}
)
@ValueAttrAnnotation1( "classAnnotation1")
@ValueAttrAnnotation2( "classAnnotation2")
public class Values {

  @ValueAttrAnnotation1( "fieldAnnotation1")
  @ValueAttrAnnotation2( "fieldAnnotation2")
  public String testfield = "test";

  @ValueAttrAnnotation1( "methodAnnotation1")
  @ValueAttrAnnotation2( "methodAnnotation2")
  @ValueAttrAnnotation()
  public void testMethod( 
      @ValueAttrAnnotation1( "param1Annotation1") 
      @ValueAttrAnnotation2( "param1Annotation2") String param1, 
      @ValueAttrAnnotation1( "param2Annotation1") 
      @ValueAttrAnnotation2( "param2Annotation2") int param2) {
    // @ValueAttrAnnotation( "codeAnnotation")
  }

}
----

-------------
2	Internal compiler error
java.lang.NullPointerException
	at
org.eclipse.jdt.internal.compiler.ast.Annotation.resolveType(Annotation.java:204)
	at
org.eclipse.jdt.internal.compiler.ast.ASTNode.resolveAnnotations(ASTNode.java:398)
	at
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:928)
	at
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1063)
	at
org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:280)
	at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:510)
	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:165)
	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:1044)
	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:1044)
	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.resources.Workspace.build(Workspace.java:198)
	at org.eclipse.ui.actions.GlobalBuildAction$1.run(GlobalBuildAction.java:190)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)
	Values.java	asm/test/conform/annotations	line 0	December 22,
Comment 1 Philipe Mulet CLA 2005-01-04 09:05:00 EST
Reproduced. Added AnnotationTest#test104.
The annotation analysis did not perform well when attributes were sorted
differently from annotation member methods.
Comment 2 Philipe Mulet CLA 2005-01-04 09:05:22 EST
Fixed
Comment 3 Eugene Kuleshov CLA 2005-01-04 09:09:59 EST
Thanks Philippe! Do you know when it will go into the nightly builds? There was
no new builds for last 2 weeks.
Comment 4 Philipe Mulet CLA 2005-01-04 09:20:05 EST
It just missed today's integration build. There should be a nightly build
tonight afaik.

As a workaround, simply ensure that the annotation attributes appear in same
order as the member declarations in annotation type.
Comment 5 Philipe Mulet CLA 2005-01-04 09:31:53 EST
Since today's build got delayed, we can release this fix for today's integration
build.
Comment 6 Eugene Kuleshov CLA 2005-01-04 09:36:32 EST
That is great. Thanks  Philippe.
Comment 7 Olivier Thomann CLA 2005-01-04 11:44:27 EST
*** Bug 81670 has been marked as a duplicate of this bug. ***
Comment 8 Olivier Thomann CLA 2005-01-04 17:35:02 EST
*** Bug 81957 has been marked as a duplicate of this bug. ***
Comment 9 Olivier Thomann CLA 2005-01-10 10:47:21 EST
*** Bug 82474 has been marked as a duplicate of this bug. ***
Comment 10 Philipe Mulet CLA 2005-01-10 10:58:34 EST
*** Bug 82448 has been marked as a duplicate of this bug. ***
Comment 11 Olivier Thomann CLA 2005-01-19 16:04:29 EST
*** Bug 83158 has been marked as a duplicate of this bug. ***
Comment 12 Philipe Mulet CLA 2005-02-09 05:57:31 EST
*** Bug 84764 has been marked as a duplicate of this bug. ***
Comment 13 Jerome Lanneluc CLA 2005-02-15 09:04:35 EST
Verified in I20050214