Bug 241044

Summary: Internal compiler error java.lang.IllegalArgumentException: info cannot be null
Product: [Eclipse Project] JDT Reporter: MJ <michael.jordan>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: VERIFIED DUPLICATE QA Contact:
Severity: critical    
Priority: P3 CC: bsprice, jerome_lanneluc, Olivier_Thomann, philippe_mulet
Version: 3.4   
Target Milestone: 3.4.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description MJ CLA 2008-07-16 03:10:54 EDT
Build ID: I20080617-2000

Steps To Reproduce:
Unfortunately, I don't think there was anything specific that provoked this. I'm hoping the stack trace will be enough. The error was shown in the 'problems' tab in the 'errors' section.


More information:
Internal compiler error
java.lang.IllegalArgumentException: info cannot be null
	at org.eclipse.jdt.internal.compiler.codegen.StackMapFrame.addStackItem(StackMapFrame.java:81)
	at org.eclipse.jdt.internal.compiler.ClassFile.traverse(ClassFile.java:7545)
	at org.eclipse.jdt.internal.compiler.ClassFile.completeCodeAttribute(ClassFile.java:1613)
	at org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration.internalGenerateCode(ConstructorDeclaration.java:336)
	at org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration.generateCode(ConstructorDeclaration.java:192)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:530)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:581)
	at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.generateCode(CompilationUnitDeclaration.java:356)
	at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:755)
	at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:137)
	at java.lang.Thread.run(Unknown Source)
Comment 1 MJ CLA 2008-07-16 04:16:22 EDT
It seems that this is triggered by setting the compiler for the project to 1.6. Using 1.5 generates a few compiler errors about a method being labelled @override, but the class file extending an interface (ie: it's doing what it's supposed to), but when changed to 1.6, the compiler crashes with the listed exception trace. Cleaning the project and/or refreshing the project do not make any difference.
Comment 2 Ben CLA 2008-07-16 07:58:54 EDT
I'm able to reproduce this problem using the following class:

package com.test;

public class Test {

    public Test() {}

    public Test(String s) {}

    {
        for (int i : new int[] {1}) {};
    }
}

If you create the following class, it will fail to compile using eclipse ganymede (3.4 build I20080617-2000)

The error produced is:

Internal compiler error
java.lang.IllegalArgumentException: info cannot be null

	at org.eclipse.jdt.internal.compiler.codegen.StackMapFrame.addStackItem(StackMapFrame.java:81)

	at org.eclipse.jdt.internal.compiler.ClassFile.traverse(ClassFile.java:7498)

	at org.eclipse.jdt.internal.compiler.ClassFile.completeCodeAttribute(ClassFile.java:1613)

	at org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration.internalGenerateCode(ConstructorDeclaration.java:336)

	at org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration.generateCode(ConstructorDeclaration.java:192)

	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:530)

	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:581)

	at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.generateCode(CompilationUnitDeclaration.java:356)

	at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:755)

	at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:137)

	at java.lang.Thread.run(Unknown Source)

Comment 3 Philipe Mulet CLA 2008-07-16 09:28:01 EDT
dup of bug 238923

*** This bug has been marked as a duplicate of bug 238923 ***
Comment 4 Kent Johnson CLA 2008-08-06 15:05:05 EDT
Verified for 3.5M1 using I20080805-1307
Comment 5 Jerome Lanneluc CLA 2008-08-28 12:15:14 EDT
Reproduced using test case from comment 2 in a 1.6 project.

Verified for 3.4.1 using M20080827-2000.