Bug 564801 - Expressions view and conditional breakpoints are broken when inside of a lambda expression
Summary: Expressions view and conditional breakpoints are broken when inside of a lamb...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.11   Edit
Hardware: PC Windows 10
: P3 normal with 1 vote (vote)
Target Milestone: 4.18 M1   Edit
Assignee: Gayan Perera CLA
QA Contact:
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2020-06-30 12:54 EDT by Matt Forsythe CLA
Modified: 2021-01-30 11:13 EST (History)
3 users (show)

See Also:


Attachments
Minimal Program (1.03 KB, text/java)
2020-06-30 12:54 EDT, Matt Forsythe CLA
no flags Details
Variables View Working (87.15 KB, image/png)
2020-06-30 12:55 EDT, Matt Forsythe CLA
no flags Details
Conditional Breakpoints Not Working (8.67 KB, image/png)
2020-06-30 12:55 EDT, Matt Forsythe CLA
no flags Details
Working Outside Lambda (81.03 KB, image/png)
2020-06-30 12:57 EDT, Matt Forsythe CLA
no flags Details
Not Working Inside Lambda (87.80 KB, image/png)
2020-06-30 12:58 EDT, Matt Forsythe CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Forsythe CLA 2020-06-30 12:54:24 EDT
Created attachment 283448 [details]
Minimal Program

Both the expressions view and conditional breakpoints seem to be completely broken anytime you are inside of a lambda.  The "variables" view seems to work fine, but trying to display those same variables in the expressions view does not.  Even trying simple, non-variable expressions like "1" or "1+2" displays the "<errors(s)_during_evaluation>" message.

Conditional breakpoints display the same behavior.  Even using "2>1" as a breakpoint condition causes an error (see screenshot).

Both expressions view and conditional breakpoints begin working again as soon as the lambda either calls into another method or completes and returns to the caller.  So, for example, in the minimal program attached, breakpoints on lines 18 or 25 work fine.  Breakpoints on line 16 display the behavior.
Comment 1 Matt Forsythe CLA 2020-06-30 12:55:30 EDT
Created attachment 283449 [details]
Variables View Working
Comment 2 Matt Forsythe CLA 2020-06-30 12:55:55 EDT
Created attachment 283450 [details]
Conditional Breakpoints Not Working
Comment 3 Matt Forsythe CLA 2020-06-30 12:57:39 EDT
Created attachment 283451 [details]
Working Outside Lambda
Comment 4 Matt Forsythe CLA 2020-06-30 12:58:00 EDT
Created attachment 283452 [details]
Not Working Inside Lambda
Comment 5 Matt Forsythe CLA 2020-06-30 13:00:27 EDT
Also - I tested the minimal program on an older version of Eclipse (Oxygen) and it is working there.
Comment 6 Andrey Loskutov CLA 2020-07-05 07:48:35 EDT
I can confirm that this is broken in 4.17 head and also last working version is 4.10, so regression is in 4.11.

4.17 reports "Compile error during code evaluation: T cannot be resolved to a type" warning in error log without stack trace.

The "T" is coming from TimSort generics, see stack below:

Thread [main] (Suspended (breakpoint at line 16 in Test))	
Test.lambda$0(Test$Thing, Test$Thing) line: 16	
1159785389.compare(Object, Object) line: not available	
TimSort<T>.countRunAndMakeAscending(T[], int, int, Comparator<? super T>) line: 355	
TimSort<T>.sort(T[], int, int, Comparator<? super T>, T[], int, int) line: 220	
Arrays.sort(T[], int, int, Comparator<? super T>) line: 1515	
ArrayList<E>.sort(Comparator<? super E>) line: 1749	
Test.main(String[]) line: 15
Comment 7 Eclipse Genie CLA 2020-07-06 16:18:34 EDT
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.debug/+/165923
Comment 8 Matt Forsythe CLA 2020-08-28 17:41:47 EDT
Is this ready to go into the next release?  I'm not sure that I completely understand the steps in the process, but it looks like a code change was created for this bug.
Comment 9 Sarika Sinha CLA 2020-08-28 18:00:48 EDT
This got missed. Will release as soon as the master is open for 4.18.
Comment 11 Sarika Sinha CLA 2020-09-20 16:19:16 EDT
Thanks Gayan and Matt!
Comment 12 Sarika Sinha CLA 2020-10-06 14:33:05 EDT
I20201005-1800