Bug 541103 - [content assist] Invalid lambda syntax causes Eclipse to hang indefinitely
Summary: [content assist] Invalid lambda syntax causes Eclipse to hang indefinitely
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.9   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-13 12:30 EST by Helo Spark CLA
Modified: 2023-05-30 18:25 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Helo Spark CLA 2018-11-13 12:30:44 EST
Reproduction steps:

Create a class and enter the following content (note, annotation can be anything):

@JavaBean(data -> {
  data.
})
public class Main() {

}

Ask for competition after "data.", note that Eclipse never response, UI becomes unresponsive, one CPU core is at 100%.

Expected:

While the syntax is invalid as of Java 11, Eclipse should not enter into an infinite loop.

Dev notes:

Infinite loop is at "org.eclipse.jdt.internal.compiler.parser.Parser:11556"

ProcessTerminals : for (;;) {

resumeOnSyntaxError() call always returns "RESTART" which causes the parser to jump back to ProcessTerminals.
Comment 1 Stephan Herrmann CLA 2018-11-14 18:46:49 EST
Thanks for the example, likely duplicate of bug 539685
Comment 2 Eclipse Genie CLA 2020-11-05 07:29:31 EST
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.
Comment 3 Mauro Molinari CLA 2020-11-05 08:51:38 EST
This still applies to 2020-09.
Comment 4 Stephan Herrmann CLA 2021-05-22 17:25:16 EDT
Corrected, copy-pastable example:

//---
import java.beans.JavaBean;

@JavaBean(data -> {
  data.
})
public class Main {

}
//---

completion still times out on HEAD.
Comment 5 Eclipse Genie CLA 2023-05-30 18:25:36 EDT
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.