Bug 510548 - Eclipse completely freezes when content assist is triggered in a lambda
Summary: Eclipse completely freezes when content assist is triggered in a lambda
Status: NEW
Alias: None
Product: AJDT
Classification: Tools
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: AJDT-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-17 03:29 EST by Sergey Zolotaryov CLA
Modified: 2017-01-17 15:30 EST (History)
1 user (show)

See Also:


Attachments
jstack output (49.84 KB, application/octet-stream)
2017-01-17 03:29 EST, Sergey Zolotaryov CLA
no flags Details
jstack output (49.84 KB, text/plain)
2017-01-17 03:29 EST, Sergey Zolotaryov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Zolotaryov CLA 2017-01-17 03:29:02 EST
Created attachment 266318 [details]
jstack output

Trying to invoke content assist in a lambda freezes Eclipse completely. I observe it only in certain cases. The example below is trying to override a method of a javafx component inside a lambda:

ListView<String> view = new ListView<>();
view.setCellFactory(view-> {
  new ListCell<String>() {
     hitting ctrl+space here freezes IDE
  }
});

Looks like Eclipse code assist is stuck on the org.eclipse.jdt.internal.compiler.parser.Scanner.<init>(Scanner.java:160).
Comment 1 Sergey Zolotaryov CLA 2017-01-17 03:29:56 EST
Created attachment 266319 [details]
jstack output
Comment 2 Sergey Zolotaryov CLA 2017-01-17 03:40:28 EST
If I refactor the anonymous class to a nested class completion does not freeze.
Comment 3 Stephan Herrmann CLA 2017-01-17 12:22:02 EST
Seeing AspectJ in the stacktrace it would be interesting to know if the problem can be reproduced with a pristince JDT, i.e., with now AJDT installed?

If indeed we are talking about a recent version JDT, then this would be the source code on lines 159/160:

	public /*static*/ final char[][][][] charArray_length =
		new char[OptimizedLength][TableSize][InternalTableSize][];

Obviously nothing that could freeze Eclipse unless we're going out of memory.
Comment 4 Sergey Zolotaryov CLA 2017-01-17 15:02:16 EST
I'll try to do it on a clean installation.
Comment 5 Sergey Zolotaryov CLA 2017-01-17 15:26:38 EST
It cannot be reproduced on a fresh installation with a Java Project.
Comment 6 Stephan Herrmann CLA 2017-01-17 15:30:10 EST
(In reply to Sergey Zolotaryov from comment #5)
> It cannot be reproduced on a fresh installation with a Java Project.

Thanks for confirming.

Moving to AJDT for consideration.