Bug 575736 - UI freezes on code completion
Summary: UI freezes on code completion
Status: CLOSED DUPLICATE of bug 574912
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.20   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2021-09-01 03:43 EDT by Sebastian Thomschke CLA
Modified: 2021-09-19 18:01 EDT (History)
2 users (show)

See Also:


Attachments
Multiple thread dumps taken from the frozen Eclipse process (34.31 KB, application/x-zip-compressed)
2021-09-01 03:43 EDT, Sebastian Thomschke CLA
no flags Details
UI thread as seen in visual vm (136.47 KB, image/png)
2021-09-01 03:44 EDT, Sebastian Thomschke CLA
no flags Details
100% CPU Usage in StreamMessageProducer and "Consume LS error stream" thread (35.37 KB, image/png)
2021-09-15 14:36 EDT, Sebastian Thomschke CLA
no flags Details
Reproducer Java Project (3.00 KB, application/x-zip-compressed)
2021-09-15 15:00 EDT, Sebastian Thomschke CLA
no flags Details
Reproducer Java Project (3.39 KB, application/x-zip-compressed)
2021-09-15 16:01 EDT, Sebastian Thomschke CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Thomschke CLA 2021-09-01 03:43:58 EDT
Created attachment 287060 [details]
Multiple thread dumps taken from the frozen Eclipse process

The UI very often freezes forever when triggering Java code completion in inner classes/lambdas. I did not experience this in earlier Eclipse releases.

I am attaching some thread dumps and a screenshot from visualvm when running the thread sampler.
Comment 1 Sebastian Thomschke CLA 2021-09-01 03:44:35 EDT
Created attachment 287061 [details]
UI thread as seen in visual vm
Comment 2 Andrey Loskutov CLA 2021-09-10 14:07:44 EDT
Could you provide steps to reproduce? Ideally a simple self containing example file or project.
Comment 3 Sebastian Thomschke CLA 2021-09-15 14:35:16 EDT
It is very difficult to create a reproducer as I am having the issue mainly in a complex internal project.

I am attaching another screenshot where it looks like most of the time is spent in 
LSP4J's StreamMessageProcessor and the "Consume LS error stream" thread.
Comment 4 Sebastian Thomschke CLA 2021-09-15 14:36:41 EDT
Created attachment 287136 [details]
100% CPU Usage in StreamMessageProducer and "Consume LS error stream" thread
Comment 5 Sebastian Thomschke CLA 2021-09-15 15:00:55 EDT
Created attachment 287137 [details]
Reproducer Java Project

After another 20 forced crashes I managed to create a reproducer.
If you import the project, open the Reproducer.java and insert dot (.)
in Line 10, this will freeze the Eclipse UI.
Comment 6 Sebastian Thomschke CLA 2021-09-15 16:01:31 EDT
Created attachment 287138 [details]
Reproducer Java Project

I added a second Java file to reproduce the issue
Comment 7 Holger Voormann CLA 2021-09-19 18:01:06 EDT
I can reproduce this issue with the attached Java project in 4.20, but not anymore in 4.21 and in I20210917-1800.

It seems to be a duplicate of bug 574912.

Sebastian, thanks for reporting. Please upgrade to Eclipse 2021-09 (4.21) to get this and other content assist fixes (see bug 574913).

*** This bug has been marked as a duplicate of bug 574912 ***