Community
Participate
Working Groups
Build ID: I20080617-2000 Steps To Reproduce: 1. Compile the following class in Eclipse 3.4: public class Error { { for (boolean b : new boolean[] {}) { } } public Error() { } public Error(boolean gg) { } } 2. You should get the following 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) More information: It compiles successfully with Sun's Javac 1.6 as well as Eclipse 3.2, but not with Ganymede Eclipse 3.4.
Created attachment 106772 [details] Patch + regression tests for HEAD
Created attachment 106773 [details] Simplified patch + regression test for HEAD
Created attachment 106774 [details] Same fix for 3.4 maintenance stream
+1 for 3.4.1
Released for 3.4.1.
Thanks very much Olivier and Philippe :)
(In reply to comment #6) > Thanks very much Olivier and Philippe :) You are welcome. Good test cases deserve quick fixes :-). I was on vacations till yesterday otherwise it would have been fixed earlier.
*** Bug 241044 has been marked as a duplicate of this bug. ***
Verified for 3.5M1 using I20080805-1307
To reproduce you need to have a 1.6 compiler compliance level. Verified for 3.4.1 using M20080827-2000
I just reproduced this bug (not using the test code) with Version: 3.4.1 Build id: M20080911-1700 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:7497) at org.eclipse.jdt.internal.compiler.ClassFile.completeCodeAttribute(ClassFile.java:1613) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.generateCode(AbstractMethodDeclaration.java:244) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.generateCode(AbstractMethodDeclaration.java:179) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:530) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:564) at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.generateCode(QualifiedAllocationExpression.java:169) at org.eclipse.jdt.internal.compiler.ast.FieldDeclaration.generateCode(FieldDeclaration.java:104) at org.eclipse.jdt.internal.compiler.ast.Clinit.generateCode(Clinit.java:253) at org.eclipse.jdt.internal.compiler.ast.Clinit.generateCode(Clinit.java:103) 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) Can you confirm this was supposed to be fixed in that version ?
Can you provide a test case to make sure this is the same problem? The stack trace is not identical.
It could also be bug 251539 which we could not reproduce so far. So a test case would be awesome for a fix in 3.5. Please update bug 251539 with a test case. Many thanks.
indeed. following up on bug 251539