Community
Participate
Working Groups
Eclipse IDE for Java Developers (includes Incubating components) Version: 2020-09 (4.17.0) Build id: 20200910-1200 OS: Linux, v.5.4.0-52-generic, x86_64 / gtk 3.24.20, WebKit 2.28.4 Java version: 11.0.9.1 Internal compiler error: java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 2 at org.eclipse.jdt.internal.compiler.codegen.ExceptionLabel.placeEnd(ExceptionLabel.java:58) What I tried: - recreate workspace - remove special characters from the java class - apply dos2unix on my java file
Please attach error log and ideally small standalone code example that reproduces the problem.
Hi. I can't provide a piece of code because my company does not allow that. But I can provide more details. There is a method on my class that has 132 lines. When I remove the method body (just return null to not break) the error disappeared. The error I got on the problem window: Description Resource Path Location Type Internal compiler error: java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 2 at org.eclipse.jdt.internal.compiler.codegen.ExceptionLabel.placeEnd(ExceptionLabel.java:58) line 0 Java Problem
(In reply to Daniel Teixeira from comment #2) > The error I got on the problem window: Please open Error log view and copy *full* stack trace to this bug.
eclipse.buildId=4.17.0.I20200902-1800 java.version=11.0.9.1 java.vendor=Ubuntu BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=pt_BR Framework arguments: -product org.eclipse.epp.package.java.product Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product This is a continuation of log file /home/user/workspace/.metadata/.bak_3.log Created Time: 2020-11-25 14:22:35.257 java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 2 at org.eclipse.jdt.internal.compiler.codegen.ExceptionLabel.placeEnd(ExceptionLabel.java:58) at org.eclipse.jdt.internal.compiler.ast.TryStatement.generateCode(TryStatement.java:577) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.generateCode(AbstractMethodDeclaration.java:357) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.generateCode(AbstractMethodDeclaration.java:294) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:747) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:817) at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.generateCode(CompilationUnitDeclaration.java:408) at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:913) at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:145) at java.base/java.lang.Thread.run(Thread.java:834)
Hmm... looking at the exception trace and the relevant code, I can't figure out much. (In reply to Daniel Teixeira from comment #2) > There is a method on my class that has 132 lines. When I remove the method > body (just return null to not break) the error disappeared. Daniel, please see if you can isolate that code into a small testcase.
You mean, develop junit test for it?
I Updated my eclipse to 2020-12 (4.18) the error is gone.