Bug 567081 - Debug is broken after upgrade to 2020-09
Summary: Debug is broken after upgrade to 2020-09
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: LTWeaving (show other bugs)
Version: 1.8.10   Edit
Hardware: PC All
: P3 major with 5 votes (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo, regression
: 567498 568924 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-09-17 12:42 EDT by Fernando Giannetti CLA
Modified: 2021-06-18 06:56 EDT (History)
15 users (show)

See Also:


Attachments
workspace log (67.32 KB, text/plain)
2020-09-23 12:02 EDT, Aharon Ha CLA
no flags Details
a simple prject (3.39 KB, application/x-zip-compressed)
2020-09-23 13:25 EDT, Aharon Ha CLA
no flags Details
Installation Details - Configuration (2.21 MB, text/plain)
2020-09-24 02:46 EDT, Jose M Beleta CLA
no flags Details
installation details (1.97 MB, text/plain)
2020-09-24 02:53 EDT, Aharon Ha CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fernando Giannetti CLA 2020-09-17 12:42:13 EDT
After upgrade my IDE to 2020-09 using the Check for Update menu option, I cant debug anymore.
The application is freeze on breakpoint, but the IDE don't do anything (don't light the breakpoint line) and the Resume button is disabled.

When click the Debug tab a popup shows up with the error:

An internal error occurred during: "Initialize Java Debug Session".
Expecting a stackmap frame at branch target 8
Exception Details:
  Location:
    org/eclipse/jdt/internal/debug/core/model/JDIStackFrame.$SWITCH_TABLE$org$eclipse$jdt$internal$debug$core$model$MethodResult$ResultType()[I @4: ifnull
  Reason:
    Expected stackmap frame at this location.
  Bytecode:
    0000000: b204 0c59 c600 04b0 57b8 040e bebc 0a4b
    0000010: 2ab2 0412 b601 d204 4fa7 0004 572a b204
    0000020: 15b6 01d2 064f a700 0457 2ab2 0418 b601
    0000030: d208 4fa7 0004 572a b204 1bb6 01d2 054f
    0000040: a700 0457 2ab2 041e b601 d207 4fa7 0004
    0000050: 572a 59b3 040c b0                      
  Exception Handler Table:
    bci [16, 25] => handler: 28
    bci [29, 38] => handler: 41
    bci [42, 51] => handler: 54
    bci [55, 64] => handler: 67
    bci [68, 77] => handler: 80

Im using JDK 11

Before the update all was working fine
Comment 1 Aharon Ha CLA 2020-09-23 11:05:38 EDT
I get the same behavior but not same error, using jdk 8 (1.8.0_251) and 14 (14.0.1) on WIN 10 x64

An internal error occurred during: "Initialize Java Debug Session".
Expecting a stackmap frame at branch target 12
Exception Details:
  Location:
    org/eclipse/jdt/internal/debug/core/model/JDIStackFrame.equals(Ljava/lang/Object;Ljava/lang/Object;)Z @1: ifnonnull
  Reason:
    Expected stackmap frame at this location.
  Bytecode:
    0000000: 2bc7 000b 2cc7 0005 04ac 03ac 2b2c b600
    0000010: c1ac
Comment 2 Andrey Loskutov CLA 2020-09-23 11:23:50 EDT
@JDT core: sounds like a JDT compiler issue with org/eclipse/jdt/internal/debug/core/model/JDIStackFrame class.

(In reply to Aharon Ha from comment #1)
> I get the same behavior but not same error, using jdk 8 (1.8.0_251) and 14
> (14.0.1) on WIN 10 x64

You mean, that this was the debugged application JVM, not the JVM that was used to run Eclipse? Eclipse 4.17 requires at least Java 11.

Which JVM was used to run debugger itself?
Can you provide steps to reproduce?

@all who seen that bug: could you please provide full error log (can be found in workspace/.metadata/.log)?
Comment 3 Fernando Giannetti CLA 2020-09-23 12:02:30 EDT
(In reply to Andrey Loskutov from comment #2)
> @JDT core: sounds like a JDT compiler issue with
> org/eclipse/jdt/internal/debug/core/model/JDIStackFrame class.
> 
> (In reply to Aharon Ha from comment #1)
> > I get the same behavior but not same error, using jdk 8 (1.8.0_251) and 14
> > (14.0.1) on WIN 10 x64
> 
> You mean, that this was the debugged application JVM, not the JVM that was
> used to run Eclipse? Eclipse 4.17 requires at least Java 11.
> 
> Which JVM was used to run debugger itself?
> Can you provide steps to reproduce?
> 
> @all who seen that bug: could you please provide full error log (can be
> found in workspace/.metadata/.log)?

Hi Andrey

This is the .log file content after the debugger error. Hope it helps!:

!ENTRY org.eclipse.debug.core 4 2 2020-09-23 12:58:44.931
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.debug.core".
!STACK 0
java.lang.VerifyError: Expecting a stackmap frame at branch target 8
Exception Details:
  Location:
    org/eclipse/jdt/internal/debug/core/model/JDIStackFrame.$SWITCH_TABLE$org$eclipse$jdt$internal$debug$core$model$MethodResult$ResultType()[I @4: ifnull
  Reason:
    Expected stackmap frame at this location.
  Bytecode:
    0000000: b204 0c59 c600 04b0 57b8 040e bebc 0a4b
    0000010: 2ab2 0412 b601 d204 4fa7 0004 572a b204
    0000020: 15b6 01d2 064f a700 0457 2ab2 0418 b601
    0000030: d208 4fa7 0004 572a b204 1bb6 01d2 054f
    0000040: a700 0457 2ab2 041e b601 d207 4fa7 0004
    0000050: 572a 59b3 040c b0
  Exception Handler Table:
    bci [16, 25] => handler: 28
    bci [29, 38] => handler: 41
    bci [42, 51] => handler: 54
    bci [55, 64] => handler: 67
    bci [68, 77] => handler: 80

        at org.eclipse.jdt.internal.debug.core.model.JDIThread.computeStackFrames(JDIThread.java:658)
        at org.eclipse.jdt.internal.debug.core.model.JDIThread.computeStackFrames(JDIThread.java:718)
        at org.eclipse.jdt.internal.debug.core.model.JDIThread.getTopStackFrame(JDIThread.java:1401)
        at org.eclipse.debug.internal.ui.contexts.LaunchSuspendTrigger.notifySuspend(LaunchSuspendTrigger.java:105)
        at org.eclipse.debug.internal.ui.contexts.LaunchSuspendTrigger.handleDebugEvents(LaunchSuspendTrigger.java:87)
        at org.eclipse.debug.core.DebugPlugin$EventNotifier.run(DebugPlugin.java:1201)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
        at org.eclipse.debug.core.DebugPlugin$EventNotifier.dispatch(DebugPlugin.java:1235)
        at org.eclipse.debug.core.DebugPlugin$EventDispatchJob.run(DebugPlugin.java:465)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

!ENTRY org.eclipse.debug.core 4 125 2020-09-23 12:58:44.932
!MESSAGE An exception occurred while dispatching debug events.
!STACK 0
java.lang.VerifyError: Expecting a stackmap frame at branch target 8
Exception Details:
  Location:
    org/eclipse/jdt/internal/debug/core/model/JDIStackFrame.$SWITCH_TABLE$org$eclipse$jdt$internal$debug$core$model$MethodResult$ResultType()[I @4: ifnull
  Reason:
    Expected stackmap frame at this location.
  Bytecode:
    0000000: b204 0c59 c600 04b0 57b8 040e bebc 0a4b
    0000010: 2ab2 0412 b601 d204 4fa7 0004 572a b204
    0000020: 15b6 01d2 064f a700 0457 2ab2 0418 b601
    0000030: d208 4fa7 0004 572a b204 1bb6 01d2 054f
    0000040: a700 0457 2ab2 041e b601 d207 4fa7 0004
    0000050: 572a 59b3 040c b0
  Exception Handler Table:
    bci [16, 25] => handler: 28
    bci [29, 38] => handler: 41
    bci [42, 51] => handler: 54
    bci [55, 64] => handler: 67
    bci [68, 77] => handler: 80

        at org.eclipse.jdt.internal.debug.core.model.JDIThread.computeStackFrames(JDIThread.java:658)
        at org.eclipse.jdt.internal.debug.core.model.JDIThread.computeStackFrames(JDIThread.java:718)
        at org.eclipse.jdt.internal.debug.core.model.JDIThread.getTopStackFrame(JDIThread.java:1401)
        at org.eclipse.debug.internal.ui.contexts.LaunchSuspendTrigger.notifySuspend(LaunchSuspendTrigger.java:105)
        at org.eclipse.debug.internal.ui.contexts.LaunchSuspendTrigger.handleDebugEvents(LaunchSuspendTrigger.java:87)
        at org.eclipse.debug.core.DebugPlugin$EventNotifier.run(DebugPlugin.java:1201)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
        at org.eclipse.debug.core.DebugPlugin$EventNotifier.dispatch(DebugPlugin.java:1235)
        at org.eclipse.debug.core.DebugPlugin$EventDispatchJob.run(DebugPlugin.java:465)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

!ENTRY org.eclipse.core.jobs 4 2 2020-09-23 12:58:56.461
!MESSAGE An internal error occurred during: "Initialize Java Debug Session".
!STACK 0
java.lang.VerifyError: Expecting a stackmap frame at branch target 8
Exception Details:
  Location:
    org/eclipse/jdt/internal/debug/core/model/JDIStackFrame.$SWITCH_TABLE$org$eclipse$jdt$internal$debug$core$model$MethodResult$ResultType()[I @4: ifnull
  Reason:
    Expected stackmap frame at this location.
  Bytecode:
    0000000: b204 0c59 c600 04b0 57b8 040e bebc 0a4b
    0000010: 2ab2 0412 b601 d204 4fa7 0004 572a b204
    0000020: 15b6 01d2 064f a700 0457 2ab2 0418 b601
    0000030: d208 4fa7 0004 572a b204 1bb6 01d2 054f
    0000040: a700 0457 2ab2 041e b601 d207 4fa7 0004
    0000050: 572a 59b3 040c b0
  Exception Handler Table:
    bci [16, 25] => handler: 28
    bci [29, 38] => handler: 41
    bci [42, 51] => handler: 54
    bci [55, 64] => handler: 67
    bci [68, 77] => handler: 80

        at org.eclipse.jdt.internal.debug.core.model.JDIThread.computeStackFrames(JDIThread.java:658)
        at org.eclipse.jdt.internal.debug.core.model.JDIThread.computeStackFrames(JDIThread.java:718)
        at org.eclipse.jdt.internal.debug.core.model.JDIThread.getTopStackFrame(JDIThread.java:1401)
        at org.eclipse.debug.internal.ui.viewers.update.DebugTargetProxy.getNextSuspendedThreadDelta(DebugTargetProxy.java:125)
        at org.eclipse.jdt.internal.debug.ui.threadgroups.JavaDebugTargetProxy.doInstalled(JavaDebugTargetProxy.java:115)
        at org.eclipse.jdt.internal.debug.ui.threadgroups.JavaDebugTargetProxy$1.run(JavaDebugTargetProxy.java:92)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Comment 4 Aharon Ha CLA 2020-09-23 12:02:34 EDT
Created attachment 284239 [details]
workspace log

can be tested with simple snippet code on a blank java project (not even maven)
Comment 5 Aharon Ha CLA 2020-09-23 12:12:22 EDT
(In reply to Andrey Loskutov from comment #2)
> @JDT core: sounds like a JDT compiler issue with
> org/eclipse/jdt/internal/debug/core/model/JDIStackFrame class.
> 
> (In reply to Aharon Ha from comment #1)
> > I get the same behavior but not same error, using jdk 8 (1.8.0_251) and 14
> > (14.0.1) on WIN 10 x64
> 
> You mean, that this was the debugged application JVM, not the JVM that was
> used to run Eclipse? Eclipse 4.17 requires at least Java 11.
> 
> Which JVM was used to run debugger itself?
> Can you provide steps to reproduce?
> 
> @all who seen that bug: could you please provide full error log (can be
> found in workspace/.metadata/.log)?

seems like eclipse runs the internal debugger. eclipse itself runs on jdk14

> !SESSION 2020-06-17 17:05:06.817 -----------------------------------------------
> eclipse.buildId=4.15.0.I20200305-0155
> java.version=14.0.1
> java.vendor=Oracle Corporation
> BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
> Framework arguments:  -product org.eclipse.epp.package.java.product
> Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product

the debug commandline is
> C:\Users\Aharon Ha\.p2\pool\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_14.0.2.v20200815-0932\jre\bin\javaw.exe -XX:+ShowCodeDetailsInExceptionMessages -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:64327 "-javaagent:C:\Users\Aharon Ha\eclipse\java-2020-03\eclipse\configuration\org.eclipse.osgi\1357\0\.cp\lib\javaagent-shaded.jar" -Dfile.encoding=UTF-8 -p "C:\Users\Aharon Ha\eclipse-workspace\just-debug\bin" -m simple/snippet.Snippet

I tried another JRE (pre installed j14), so the debug command line is:
> C:\Program Files\java\jdk-14.0.1\bin\javaw.exe -XX:+ShowCodeDetailsInExceptionMessages -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:64499 "-javaagent:C:\Users\Aharon Hacmon\eclipse\java-2020-03\eclipse\configuration\org.eclipse.osgi\1357\0\.cp\lib\javaagent-shaded.jar" -Dfile.encoding=UTF-8 -p "C:\Users\Aharon Hacmon\eclipse-workspace\just-debug\bin" -m simple/snippet.Snippet
Comment 6 Andrey Loskutov CLA 2020-09-23 12:37:05 EDT
While searching for duplicates I've found one new comment on bug 322126 comment 11:

!ENTRY org.eclipse.debug.core 4 125 2020-09-17 18:12:06.939
!MESSAGE An exception occurred while dispatching debug events.
!STACK 0
java.lang.VerifyError: Expecting a stackmap frame at branch target 23
Exception Details:
  Location:
    org/eclipse/jdt/internal/debug/core/model/JDIStackFrame.exists()Z @7: aload_0
  Reason:
    Expected stackmap frame at this location.
  Bytecode:
    0000000: 2ab4 0052 594c c22a b400 3d02 9f00 0704
    0000010: a700 0403 2bc3 ac2b c3bf               
  Exception Handler Table:
    bci [7, 22] => handler: 23
    bci [23, 25] => handler: 23

	at org.eclipse.jdt.internal.debug.core.model.JDIThread.computeStackFrames(JDIThread.java:658)
	at org.eclipse.jdt.internal.debug.core.model.JDIThread.computeStackFrames(JDIThread.java:718)
	at org.eclipse.jdt.internal.debug.core.model.JDIThread.getTopStackFrame(JDIThread.java:1401)
	at org.eclipse.debug.internal.ui.contexts.LaunchSuspendTrigger.notifySuspend(LaunchSuspendTrigger.java:105)
	at org.eclipse.debug.internal.ui.contexts.LaunchSuspendTrigger.handleDebugEvents(LaunchSuspendTrigger.java:87)
	at org.eclipse.debug.core.DebugPlugin$EventNotifier.run(DebugPlugin.java:1201)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.debug.core.DebugPlugin$EventNotifier.dispatch(DebugPlugin.java:1235)
	at org.eclipse.debug.core.DebugPlugin$EventDispatchJob.run(DebugPlugin.java:465)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

The log is same as te one provided by Aaron.

Could be a "side effect" of bug 565417 (we compile jdt.debug now with Java 11 target) or bug 565510 (the only code change on JDIStackFrame in 4.17 I see), or both together.

But if I compile the jdt.debug with Java 8 target, the difference in the bytecode of generated class files is minimal and especially the affected parts are *identical*.

The bytecode for "private equals(Object, Object) : boolean", 
"static synthetic $SWITCH_TABLE$org$eclipse$jdt$internal$debug$core$model$MethodResult$ResultType() : int[]" and for "protected exists() : boolean" is *identical* if compiled with 11 or 8 target.

Wondering if we have stricter bytecode checks for class files compiled with Java 11 target on Java 11+ JVM?

I myself used debugger without issues on Java 11.0.7 / 11.0.8 with almost every recent 4.17 - 4.18 build, so may be it affects only *some* JDK releases? Aaron used Java 14.0.1 to run Eclipse.

@Fernando, Bohdan: which *exact* JDK version was used to run Eclipse?
Do you use any special JVM flags to run Eclipse?
Comment 7 Andrey Loskutov CLA 2020-09-23 12:38:54 EDT
(In reply to Aharon Ha from comment #4)
> Created attachment 284239 [details]
> workspace log
> 
> can be tested with simple snippet code on a blank java project (not even
> maven)

If you can reproduce on a simple Java project, please attach the entire project here.
Comment 8 Aharon Ha CLA 2020-09-23 13:25:21 EDT
Created attachment 284240 [details]
a simple prject
Comment 9 Andrey Loskutov CLA 2020-09-23 14:09:38 EDT
(In reply to Aharon Ha from comment #4)
> Created attachment 284239 [details]
> workspace log
> 
> can be tested with simple snippet code on a blank java project (not even
> maven)

Have tried this with 14.0.2 JDK & 4.17 / 4.18 head, no problems. Any specific breakpoint / debug configuration to use?
Comment 10 Fernando Giannetti CLA 2020-09-23 14:12:27 EDT
(In reply to Andrey Loskutov from comment #6)

> @Fernando, Bohdan: which *exact* JDK version was used to run Eclipse?
> Do you use any special JVM flags to run Eclipse?

I'm running Eclipse with JDK 11.0.2 with no special flags
Comment 11 Jose M Beleta CLA 2020-09-24 00:43:35 EDT
I have the same error on macOS 10.15.6 (19G2021), running Eclipse with jdk-15.jdk and my program with Java SE JDK 8 [1.8.0_261].

No special flags.
Comment 12 Andrey Loskutov CLA 2020-09-24 01:34:21 EDT
(In reply to Jose M Beleta from comment #11)
> I have the same error on macOS 10.15.6 (19G2021), running Eclipse with
> jdk-15.jdk and my program with Java SE JDK 8 [1.8.0_261].
> 
> No special flags.

@All who can't debug: which exact Eclipse version / package do you have, how did you install that (via installer or by extracting) and do you use any of the Java agent / bytecode weaving software?

I'm asking because the problem we see can be caused by:

1) Bug in compiler that produced "wrong" bytecode of some Eclipse classes, so it doesn't pass checks in JVM. But that seem to be unlikely, because we only have few reporters complaining.

2) Bug in JVM that refuses to load valid bytecode for some reason. Could be, but that again must be a very special JVM build.

3) Bug in installer that somehow messed up jdt.debug files (e.g. used not default but some broken integration build update site).

4) Bug in some Java agent that is configured to modify classes before loading them, and modifies in a way that breaks the class structure.

5) Bug in some OSGI bytecode weaving framework (I believe Object Teams do that) that breaks the class after "weaving", same as in 4).

To simplify our all life, could you please simply save the entire text from "Help - About - Installation Details - Configuration" to a file and attach this file to the bug (it is too big for a comment). I hope to see there some common configuration details that could explain the problem.
Comment 13 Jose M Beleta CLA 2020-09-24 02:46:24 EDT
Created attachment 284242 [details]
Installation Details - Configuration
Comment 14 Aharon Ha CLA 2020-09-24 02:53:58 EDT
Created attachment 284243 [details]
installation details
Comment 15 Andrey Loskutov CLA 2020-09-24 03:48:37 EDT
(In reply to Jose M Beleta from comment #13)
> Created attachment 284242 [details]
> Installation Details - Configuration

You have Lombok java agent active: -javaagent:/Applications/Eclipse.app/Contents/Eclipse/lombok.jar

It would be nice if you could try without that (I have no idea who and how added that to Eclipse, but you should be able to get rid of it by modifying your eclipse.ini file I guess).

(In reply to Aharon Ha from comment #14)
> Created attachment 284243 [details]
> installation details

You have no agents defined, good.

What I see in *both* installations, and what I don't see in my is "org.eclipse.equinox.weaving.hook" that belongs to Aspect Weaving Hooks Plug-in.

I've just tried to download "Eclipse IDE for Enterprise Java Developers" but that seem not to contain this bundle. How did you get that into your installation? Is this one of the packages listed here : https://www.eclipse.org/downloads/packages/ ? If yes, which one?

Could you please uninstall that "Aspect Weaving" thing (or the thing that included that as a part) and try debugging?
Comment 16 Jose M Beleta CLA 2020-09-24 04:50:26 EDT
I will try what you suggest, but let me add some comments:

1) I have made the same clean installation, including Lombok, that was used with 2020-06 and there I could debug with no problem.
2) Lombok was installed by me I need it to compile my project. Never had a problem with it. https://projectlombok.org/
3) The "org.eclipse.equinox.weaving.hook" is installed by Kotling plugin by Jetbrains, I have it installed in 2020-06 with no problem.

All points that this is an Eclipse 2020-09 problem and not an installation one.
Comment 17 Andrey Loskutov CLA 2020-09-24 04:56:10 EDT
(In reply to Jose M Beleta from comment #16)
> All points that this is an Eclipse 2020-09 problem and not an installation
> one.

Sure, something changed in Eclipse 2020-09, and we are trying to bisect what. 

Current assumption is that the "Aspect Weaving" modifies bytecode of jdt.debug classes before they are loaded by JVM in the way that it breaks them. 

If uninstalling "Aspect Weaving" fixes the problem, we have found the root cause. My guess that "Aspect Weaving" can't properly handle Java 11 class files - jdt.debug is compiled to Java 11 bytecode in Eclipse 4.17.
Comment 18 Aharon Ha CLA 2020-09-24 05:00:13 EDT
> I've just tried to download "Eclipse IDE for Enterprise Java Developers" but
> that seem not to contain this bundle. How did you get that into your
> installation? Is this one of the packages listed here :
> https://www.eclipse.org/downloads/packages/ ? If yes, which one?
> 
> Could you please uninstall that "Aspect Weaving" thing (or the thing that
> included that as a part) and try debugging?

I have removed the weaving package. It was added as part of Kotlin plugin, so I have removed it altogether.

I can't reproduce the bug now, so it seems to be fixed.

One of my projects contain Kotlin code and it might require this plugin again.

Is it possible that as part of switching to JDK11+ as runtime for eclipse - the kotlin plugin is missing something / creating an invalid binaries?
Comment 19 Jose M Beleta CLA 2020-09-24 05:27:53 EDT
Removing the Kotlin plugin did the trick!

However as I mentioned in my previous comment Kotlin was enabled in the 2020-06 version and I could debug with no problem.

Thanks a lot Andrey for your help, but perhaps this can be solved changing things in JDT or Equinox.
Comment 20 Andrey Loskutov CLA 2020-09-24 05:35:45 EDT
(In reply to Aharon Ha from comment #18)
> I have removed the weaving package. It was added as part of Kotlin plugin,
> so I have removed it altogether.
> 
> I can't reproduce the bug now, so it seems to be fixed.

Great to know!

> Is it possible that as part of switching to JDK11+ as runtime for eclipse -
> the kotlin plugin is missing something / creating an invalid binaries?

See my comment 17 - my guess is that "Aspect Weaving" can't properly handle Java 11 class files - jdt.debug is compiled to Java 11 bytecode in Eclipse 4.17.

This is the point 5 from my list on the comment 12. The Kotlin guys seem to modify some/all JDT debug classes, probably to provide Kotlin specific functionality. So if you want to use Kotlin in the future with Eclipse, please create bug for them (I guess this is at https://github.com/JetBrains/kotlin-eclipse) and they should debug what is wrong with the code now. 

I will move this bug to "AspectJ" project. I guess they should look closer if that is a generic issue with weaving Java 11 class files, so not only Kotlin could be affected.
Comment 21 Andrey Loskutov CLA 2020-09-24 05:37:48 EDT
(In reply to Andrey Loskutov from comment #20)
> I will move this bug to "AspectJ" project. I guess they should look closer
> if that is a generic issue with weaving Java 11 class files, so not only
> Kotlin could be affected.

After moving I see that the 1.8.10 version of org.aspectj.weaver is not the latest one - I have no idea if there is some update site where you could get the latest greatest stuff? May be together with latest greatest Kotlin plugins?
Comment 22 Charlie Oehlrich CLA 2020-09-24 06:26:02 EDT
After uninstalling the Kotlin plugin I had noticed that they were using a version of AspectJ that was released almost 4 years ago and after installing AspectJ Development Tools so that i had an updated version of AspectJ (which was released in July of this year) and reinstalling the Kotlin plugin via the update site and attempting to debug a project, I didn't get the error.
Comment 23 Fernando Giannetti CLA 2020-09-24 08:45:11 EDT
(In reply to Andrey Loskutov from comment #12)
> (In reply to Jose M Beleta from comment #11)
> > I have the same error on macOS 10.15.6 (19G2021), running Eclipse with
> > jdk-15.jdk and my program with Java SE JDK 8 [1.8.0_261].
> > 
> > No special flags.
> 
> @All who can't debug: which exact Eclipse version / package do you have, how
> did you install that (via installer or by extracting) and do you use any of
> the Java agent / bytecode weaving software?
> 

I'm using Eclipse Version: 2020-09 (4.17.0) Build id: 20200910-1200
Installed by update from 2020-06 and using Lombok and Kotlin plugin.
This one fails on debug

Then I try a fresh install of 2020-09 from scratch and with a new workspace directory and this one debugs OK, with Lombok installed too

Thanks!
Comment 24 Andrey Loskutov CLA 2020-10-01 01:26:58 EDT
*** Bug 567498 has been marked as a duplicate of this bug. ***
Comment 25 Daniel Munzinger CLA 2020-10-02 08:50:09 EDT
Removing the Kotlin plugin did the trick for me too!

Eclipse IDE for Enterprise Java Developers (includes Incubating components)
Version: 2020-09 (4.17.0)
Build id: 20200910-1200
OS: Windows 10, v.10.0, x86_64 / win32
Java version: 11.0.8
Comment 26 Romain Grosjean CLA 2020-10-07 04:43:46 EDT
Ah great!! Thank you guys!
Since 3 days I'm installing reinstalling Eclipse to find out the issue.

Removing the Kotlin plugin or installing the latest AspectJ Dev Tool solved the issue for me
Comment 27 Andrey Loskutov CLA 2020-10-07 04:46:28 EDT
(In reply to Romain Grosjean from comment #26)
> Ah great!! Thank you guys!
> Since 3 days I'm installing reinstalling Eclipse to find out the issue.
> 
> Removing the Kotlin plugin or installing the latest AspectJ Dev Tool solved
> the issue for me

Could any of Kotlin plugin users here report the issue to Kotlin plugin developers? I guess this is at https://github.com/JetBrains/kotlin-eclipse
Comment 28 Andrey Loskutov CLA 2020-11-19 03:42:52 EST
*** Bug 568924 has been marked as a duplicate of this bug. ***
Comment 29 Christof Luick CLA 2021-03-18 07:08:28 EDT
As a side note from me a very similar Error can appear if you install the feature "JDT weaving for Scale", which is part of the Eclipse Scala IDE. Uninstalling the feature solves the problem just like it's described above.
Comment 30 Alexander Kriegisch CLA 2021-06-08 07:03:46 EDT
In their POM on the main branch

https://github.com/JetBrains/kotlin-eclipse/blob/3da0a1a34c193783e984264d368b36218e20b812/pom.xml#L38-L39

I still see

<aspectj.version>1.8.7</aspectj.version>
<aspectj.plugin.version>1.8</aspectj.plugin.version>

So please, to some of the people here who know how to reproduce the error: Create an issue in that project, like Andrey suggested. It is not going to fix itself. If there is an issue ticket already, please link to it from here. Thank you.

BTW: AspectJ 1.8.x only supports Java 8-, but 1.8.7 is still outdated, 1.8.13 would be the latest 1.8.x release. For Java 9+ you need AspectJ 1.9.x, e.g. 1.9.6 for Java 14, the upcoming 1.9.7 (currently 1.9.7.M3 on Central) for Java 15+16. They are still backward compatible to Java 8, don't worry.
Comment 31 Heiko Feldmann CLA 2021-06-18 06:56:32 EDT
--launcher.library
C:\Entwicklung\eclipse\\plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.2.200.v20210429-1609\eclipse_11401.dll
-startup
C:\Entwicklung\eclipse\\plugins/org.eclipse.equinox.launcher_1.6.200.v20210416-2027.jar
-product
org.eclipse.epp.package.jee.product
Java (for Eclipse and Project): OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.8+10, mixed mode)

I am facing the same problem with stuck debugger when stepping through the code.
I recognized a similar problem using VS Cede, when loading i.e.larger SQL files. So maybe it was a problem with language server? I removed every plugin from eclipse wich uses a language server. This improved the situation but not completely fixed it. What could cause a problem with language servers? I thought about antivirus scanner. I turned it of and the debugging problem disappeared (Company policy prevents revealing the scanner). How could that be? I am running the debug sessions with same jvm parameters as in production which a serious of test has shown as optimum for our software.
-XX:NewRatio=4 -XX:CompileThreshold=500 -XX:ReservedCodeCacheSize=400m -XX:MaxInlineLevel=20 -XX:FreqInlineSize=700 -XX:MaxInlineSize=400 -XX:CICompilerCount=4 
I removed them and it got better (with antivirus) but not completely. So I took extrem measures and run the debug session with:
-Djava.compiler=NONE -Xint -XX:-Inline 
It was horrible slow but did not stuck.
My hypothesis is that the antivirus somehow interferes with the debugger synchronizing the steps in the source code in eclipse with the actual running and highly optimized code on the JVM.