-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STS4 Java Editor Delays - Classpath Notifications #218
Comments
@neilbelchcdl Thanks for all that detail. What is this 'ui responsivness monitoring' you are talking about? That seems very usefu/interestingl to diagnose these kinds of problems! I'd appreciate a pointer to it, so we can install it ourselves, as well instruct other users reporting responsiveness issues to use it too. The stacktrace from the 'ui responsivness monitor' is very interesting. It shows that lsp4e is trying to initialize the language server on the IDE's UI thread. I think that is why the UI is getting stuck because it may take a few seconds for this process to complete. All the while the UI would be totally stuck. I don't see any of our own code showing up in that stacktrace so I think it is an lsp4e issue. We should raise an Eclipse bugzilla ticket agains lsp4e about this (unless we find an existing one). |
@kdvolder No worries. The monitoring is in Preferences > General > UI Responsiveness Monitoring. It populates the Error Log however I couldn't find any way to expand that log so I struggled to capture additional data. |
Bug raised: https://bugs.eclipse.org/bugs/show_bug.cgi?id=545454 Let's keep an eye on it and see what happens. The stacktrace is as close to a 'smoking gun' as you'll ever find. So I think they should be able to do something with that. |
Thanks. Learned something today that I'm sure will come in handy in the future! |
I have kind of similar problem when using Ctrl+Click on any java class/method. eclipse.buildId=4.2.0.201903290612-RELEASE org.eclipse.lsp4e java.util.concurrent.TimeoutException |
Also in Eclipse STS console I see the following error (not sure if it's related or not), especially puzzling why vscode is mentioned there: |
@slavap This looks clearly like the language server process is running out of memory. You can change that and configure the memory setting for that process: https://github.com/spring-projects/sts4/wiki/Custom-VM-Args Looks like the memory issue appears while the language server tries to scan the projects for symbols. You can also reduce the memory consumption of that process by passing If you want to provide more details, you could also capture a heap dump on that out-of-memory-error and send us the head dump for analysis. Sometimes this helps to get more insights into the issue (like we did for this one here: #212) Let me know if the new settings help. |
@martinlippert Yes, adding "-Dboot.ls.custom.vmargs=-Xmx3G" resolved out-of-memory problem for me, thank you. But CompletableFuture TimeoutException is still present, no any improvements with it. |
@BoykoAlex Is that the same problem as this one? At first sight it looks different. Though I guess it could have a common cause. |
Hi! I can confirm that as of STS 4.2.0 this is still a problem and a really annoying one at that point. Session Data
Stacktrace
Seems to be exactly the same problem as described by @neilbelchcdl Best regards, |
@ubreckner I saw you mentioning "ctrl+hover while pointing at a bean method". There was a bug around that for which we pushed the fix after 4.2.0. Any chance you can try updating from the nightly build update site: https://dist.springsource.com/snapshot/TOOLS/sts4/nightly/e4.11 and see if the problem is fixed in the snapshot? (If you have STS4 based eclipse 4.10 the site would be https://dist.springsource.com/snapshot/TOOLS/sts4/nightly/e4.10) |
@ubreckner the content-assist issue in your java editor seems to be a different one than the issue that @BoykoAlex talked about in the previous comment (which is about the hyperlink). I wonder why the content-assist from the spring-boot-language-server isn't responding (which could be super annoying, totally agree). It might be related to the language server consuming too much memory or running into another problem. One way to debug this would be to enable the log output streaming to the console via the preference settings at Another option would be to fire up Another good data point would be to indeed try the nightly builds mentioned above, there are a number of improvements (also around memory consumption) implemented that might help (in case this is the underlying problem). Also if you can share a project that could help us to reproduce the issue, that would be more than welcome (in case that is possible). As a quick fix, you could disable the Spring Boot language server being activated for Java files altogether in the preferences |
Hey @BoykoAlex, i will be updating from the nightly build and give you feedback. |
I had updated to nightly/e4.11 this morning and I noticed a difference. E.g. selecting "Open Implementation" was actually clickable in the appearing ctrl+click popup. Can't promise there's no "UI freeze" entries in the Eclipse error log anymore, as it is spammed immedeately with "Unhandled event loop exception" entries when looking at it. |
@mweirauch Can you post some details about the "Unhandled event loop exceptions", please? Would like to take a look and see what might be going wrong there. |
@martinlippert Not sure it is STS4 related. They appear when I move the mouse over or click an entry or mouse-over the search bar in the "Error Log" view itself.
|
@mweirauch Agree, looks indeed not related to anything Spring Tools specific, you should report that to bugs.eclipse.org for sure. In case you would like to take a look at the log file and search for items, you could also open that file using a random editor of your choice, it should be located at: |
@martinlippert, @BoykoAlex the hyperlink problem seems to be an memory issue as it appears with a timeout exception. I'm going to check whether more memory does the trick. Concerning the failing content assist: after restarting the IDE everything works fine. The responsiveness just starts fading after some hours. I have turned on the console debugging of the language server and keep an eye on it. If nothing pops up and the behavior is still the same i'll attach jconsole. Thanks for the hints. I'll get back to you once i have some updates. |
@martinlippert I've updated to 4.2.1 today and "Ctrl+Click on any java class/method" problem is resolved for me. |
As of 4.2.2 there are no further problems on my side. Thanks guys! |
Thanks @ubreckner and @slavap for the feedback and great to hear that things are working now for you. Closing this issue now. Thanks again for your help reporting and identifying the issue. Much appreciated. |
STS4
Version: 4.1.2.RELEASE
Build Id: 201902210640
Eclipse Platform 4.10.0.v20181206-0815
Eclipse Java Development Tools 3.16.0.v20181206-1038
When I edit a .java file, after a few seconds my entire STS environment freezes (including menu items, etc). A few seconds later it resumes, and whatever I typed/deleted appears in the editor. It makes the program basically unusable for Java editing.
I switched on UI Responsiveness Monitoring and can see that when the delay begins, the following data appears in the Error Log:
A stack trace is also present:
Session Data:
There is also this stack trace, output to the Error Log when the UI responsiveness monitoring is triggered:
At the point a .java file is opened (not edited) the following appears in the Console (with Spring Boot Language Server Console enabled):
Note that it mentions two different project names even though the java file belongs in some.project.name only (although a file in some.different.project is open in STS at the same time).
In STS3 the same files allow me to edit without issue.
Thanks,
Neil
The text was updated successfully, but these errors were encountered: