emacs-lsp / lsp-treemacs

lsp-mode :heart: treemacs
GNU General Public License v3.0
398 stars 47 forks source link

Emacs frozens occasionally after call lsp-treemacs-call-hierarchy #72

Closed huangfeiyu closed 3 years ago

huangfeiyu commented 3 years ago

I experience this issue occasionally. After I call lsp-treemacs-call-hierarchy to try to check the call hierarchy of a method, emacs frozons immediately. When this issue occur, the emacs cpu usage increases to 15% and emacs keeps frozon. I have kill emacs manually. My emacs version is 26.1 the version with the debian 10. Thanks!

nbfalcon commented 3 years ago

Does C-g work? That function calls lsp-request for "textDocument/prepareCallHierarchy", which works synchronously. If your language server takes a long time to respond, Emacs will appear stuck.

huangfeiyu commented 3 years ago

C-g doesn't work, neither ESC-ESC-ESC, I have to kill emacs and lsp server manually. Can setting a timeout help? The issue occur occasionally.

yyoncho commented 3 years ago

have you tried to kill the language server?

huangfeiyu commented 3 years ago

Yes, I tried to kill language server by using task manager. And after the server killed, emacs remains freeze.

SreenivasVRao commented 3 years ago

Same behaviour seen with lsp-treemacs-references. I get "Refresh Completed" in the echo area and then emacs completely hangs. Have to force quit.

huangfeiyu commented 3 years ago

The Issue may has something to do with Wind Move mode https://www.emacswiki.org/emacs/WindMove. Sometimes I experience the issue when I use Wind Move mode to switch to the hierarchy window, but if I use other-window command, it works fine.

yyoncho commented 3 years ago

I think that the root cause was fixed as part of https://github.com/emacs-lsp/lsp-treemacs/commit/642e922e16fd2b2c3cc075d7cba68448f1aaa006 please reopen if you still lsee it.

huangfeiyu commented 3 years ago

Great! @yyoncho thanks!