Bug 569136 - Internal compiler error: ExceptionLabel
Summary: Internal compiler error: ExceptionLabel
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.17   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2020-11-24 14:41 EST by Daniel Teixeira CLA
Modified: 2020-12-22 12:52 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Teixeira CLA 2020-11-24 14:41:04 EST
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
Comment 1 Andrey Loskutov CLA 2020-11-24 14:57:53 EST
Please attach error log and ideally small standalone code example that reproduces the problem.
Comment 2 Daniel Teixeira CLA 2020-11-25 12:28:44 EST
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
Comment 3 Andrey Loskutov CLA 2020-11-25 12:33:53 EST
(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.
Comment 4 Daniel Teixeira CLA 2020-11-25 12:43:36 EST
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)
Comment 5 Jay Arthanareeswaran CLA 2020-11-27 02:39:14 EST
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.
Comment 6 Daniel Teixeira CLA 2020-12-22 12:30:26 EST
You mean, develop junit test for it?
Comment 7 Daniel Teixeira CLA 2020-12-22 12:52:14 EST
I Updated my eclipse to 2020-12 (4.18) the error is gone.
Comment 8 Daniel Teixeira CLA 2020-12-22 12:52:48 EST
I Updated my eclipse to 2020-12 (4.18) the error is gone.