Skip to content

STS freezes during code autocomplete when running under OpenJDK 11 and Windows #140

Closed

Description

@logicg8

Steps to reproduce:

(Preconditions - Windows 7 with latest patches installed and running; Oracle's Open JDK 11 downloaded and on local file system; Oracle's JDK 1.8.0_191 downloaded and on local file system)

  1. In SpringToolSuite4.ini, enter line -vm <path-to-Oracle-OpenJDK11.0.1> or set as Windows' default JDK via PATH and JAVA_HOME environment variables.
  2. Execute SpringToolSuite4.exe
  3. Add another JRE to STS
    a. Click Window->Preferences
    b. Click Java->Installed JREs
    c. Click Add...
    d. Click Standard VM
    e. Click Next>
    f. Click Directory and navigate to bin directory of Oracle's JDK 1.8.0_191
    g. Click Finish
    h. Click Apply and Close
  4. Create a Java project
    a. Click File->New->JavaProject
    b. Click "Use a project specific JRE"
    c. Select the jdk1.8.0_191 added in step 3.
    c. Click Finish
  5. Create a Class
    a. Right click on project
    b. Click New->Class
    c. Enter a class name
    d. Click Finish
  6. In the editor, type in the full package name of a class.
  7. Use backspace and change to a different.
  8. Repeat step 7 several times.

At step 7, system starts to lag and eventually freezes. Note: Issue occurs more rapidly if Java 11 Support for Eclipse 2018-09 is installed. Consistently reproduced on Windows 7. Unable to reproduce on a Mac High Sierra.

Activity

  1. changed the title [-]STS freezes during code autocomplete when running under OpenJDK 11 and Windows 7[/-] [+]STS freezes during code autocomplete when running under OpenJDK 11 and Windows[/+] on Nov 15, 2018
  2. logicg8 commented on Nov 15, 2018

    @logicg8
    Author

    Also reproduced on Windows 10

  3. added this to the 4.0.2 milestone on Nov 22, 2018
  4. kdvolder commented on Nov 23, 2018

    @kdvolder
    Member

    Step 6: In the editor, type in the full package name of a class.

    Type it where exactly? If this bug has something to do with content assist processing, which seems likely, I'd expect it really matter where exactly in the file we are typing because this sort of functionality is very context sensitive.

  5. kdvolder commented on Nov 23, 2018

    @kdvolder
    Member

    Couldn't reproduce in Linux. Now switching to Windows 10 VM.

  6. kdvolder commented on Nov 23, 2018

    @kdvolder
    Member

    Can't reproduce this on Windows 10 either. I followed instructions to the letter.

    For the part where we type package name repeatedly I tried both in the place where we declare package, as well as in the class body. I didn't experience any ui freezes.

    If you can please add some details / clariication around exactly what I'm supposed to do for steps 7 and 8, that would be nice. For example:

    • where exactly are we typing
    • are we typing existing package names, or new package names, or just whatever.
    • are we keeping content assist active while typing.
    • are we keeping content assist active while backspacing.
    • are we typing every letter or using content assist to complete (parts of) the package names

    I did try a bit with different variations like that but no freezes / slowdowns where observed.

    Still, knowing exactly what it is you do might help and I could give it another.

  7. kdvolder commented on Nov 23, 2018

    @kdvolder
    Member

    Another question. Have you tried reproducing this on a Vanilla Eclipse 4.9? It seems likely this not specifically an STS bug. By trying it with a plain Eclipse this could be confirmed. If I could reproduce it myself, I would try Vanilla Eclipse myself, but since I am not yet able to reproduce it at all...

  8. logicg8 commented on Nov 26, 2018

    @logicg8
    Author
  9. logicg8 commented on Nov 26, 2018

    @logicg8
    Author
  10. logicg8 commented on Nov 26, 2018

    @logicg8
    Author
  11. 22 remaining items

  12. martinlippert commented on Feb 6, 2019

    @martinlippert
    Member

    I worked on the performance issues that your thread dumps seemed to reveal and was able to make some progress, I think. I removed a lot of duplicate internal calculations from the mechanism that updates the live hovers every 5 sec, so using these fixes should show up in lower CPU consumption on your end.

    It would be great if you could give it a shot to see if that lowers the CPU utilization on your end (and in your case) too. So if you have a moment, please download the latest CI builds for SZS 4.1.2 and Eclipse 4.10 from the nightly download page: http://dist.springsource.com/snapshot/STS4/nightly-distributions.html

    There are builds for Eclipse 4.11 already, but I would recommend to use the one for Eclipse 4.10.

  13. mohyeid commented on May 6, 2019

    @mohyeid

    This issue for me was because of STS plugin (Spring Tools 4) and once removed, all is good now.

  14. BoykoAlex commented on May 6, 2019

    @BoykoAlex
    Contributor

    @mohyeid If you have a lot of projects in the workspace it might have been due to #282

  15. mohyeid commented on May 6, 2019

    @mohyeid

    Yes, that might be the case. I have 11 projects and 4 of them were open, but they are kinda big in the size. Thanks for pointing the other issue out

  16. martinlippert commented on May 7, 2019

    @martinlippert
    Member

    @mohyeid I would be quite interested to learn more about the slowness that you observe when running the Spring Tools 4 in your Eclipse IDE together with your workspace. Would you be interested in a bit of collaboration to investigate this issue? That would be awesome.

    First thing to try would be a nightly distribution of STS 4.2.2 (based on Eclipse 2019-03, 4.11) to see if that behaves differently when working with your workspace. We worked quite a bit on performance and memory footprint over the last couple of releases and CI builds, so depending on the version that you used there might be a noticeable difference.

    So the first question would be: does using the latest CI build still slows down your workflow with the IDE? If so, in which situations? If you have a reproducible setting where the slowness occurs, would it be possible for your to take a thread dump of the JVM? Or look at the processes (the IDE and the language server) with jconsole to get a rough impression about what is going on?

    You could also enable the log output for the Spring Boot language server (in the preferences) to see if there is anything strange going on on the language server side. Once enabled, it will open a console area that shows all the internal logs of the language server process.

    Would love to hear more details from you.

  17. iSeanWeiDev commented on Oct 8, 2019

    @iSeanWeiDev

    Correctly, I had god same terrible on my Ubuntu19.4 vm, currently I am working on Spring Boot project with beginner, so I don't know what exactly happend around my setting.
    My ubuntu spec like this:
    Cpu: 2.4G(4)
    Ram: 6GB
    HardDisk: 160GB
    I really want to know what exactly wrong on my steps

  18. martinlippert commented on Oct 29, 2019

    @martinlippert
    Member

    @panamacheng Please provide more details about what you are trying to do and what doesn't work. This issue in general might be specifically related to running on Windows, but you are running on top of Ubuntu. So please provide detailed steps how to reproduce the issue, maybe attach a sample project, and we will for sure find out what is going wrong here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions