Community
Participate
Working Groups
Created attachment 276789 [details] problem Please see the self-explanatory image attached
On which line is the debugger stopped?
}); CompletableFuture.runAsync(() -> { try { Parser.getDefault().parse(fDocument); } catch (XMLStreamException e) { Annotation error = prepareAnnotation(e); Position position = preparePosition(e); model.addAnnotation(error, position); On line -> Parser.getDefault().parse(fDocument); Rest of the information may be available from the image.
It's not happening in the normal case, I tried lambda within lambda also and this expands well. So something specific to that class. package xyz; import java.util.function.Function; public class Main { private int instanceField = 952; static public void main(String[] args) throws Exception { new Main().callLambda("hello"); } void callLambda(String outerArg) throws Exception { double outerLocal = Math.random(); // Effectively final Function<String, Integer> lambda = lambdaArg -> { int lambdaLocal = 6; System.out.println(instanceField); // bp1 System.out.println(outerArg); System.out.println(outerLocal); System.out.println(lambdaArg); System.out.println(lambdaLocal); Function<String, Integer> lambda1 = lambdaArg1 -> { System.out.println(instanceField); // bp1 System.out.println(outerArg); System.out.println(outerLocal); System.out.println(lambdaArg); System.out.println(lambdaLocal); return lambdaArg1.length(); }; System.out.println(lambda1); lambda1.apply("6"); return lambdaArg.length(); }; int result = lambda.apply("degenerate case"); System.out.println(result); } } Vikas, what are the steps to reproduce it ?
>>what are the steps to reproduce it ? You can try debugging the class shown in image attached. Put breakpoint in line mentioned in comment#2.
(In reply to Vikas Chandra from comment #4) > >>what are the steps to reproduce it ? > > You can try debugging the class shown in image attached. Put breakpoint in > line mentioned in comment#2. Just by launching I will hit this breakpoint ?
>>Just by launching I will hit this breakpoint ? Create a target editor file.
I was bale to reproduce on the SyntaxValidatorListener file. I tried reproducing by having my example code inside thread, but this still works. Still looks to me that it is due to some thread forking and un availability of class details to the debugger.
I can't reproduce on I20181128-1800 / 1.8.0_181 / RHEL 7.5. Which exact Eclipse build on which JVM is used?
I tried on Build id: I20181203-1800, Windows 7, with Java 8 as well as Java 11. Will try on Linux/Mac - Possibly a Windows issue !!
Tried in Mac, Was able to reproduce. The stack frame in Debug view -> the stack before lambda for run method states local variable not available.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
recreates on Version: 2020-12 (4.18) Build id: I20201123-1800