RuntimeError: Set changed size during iteration
djrodgerspryor opened this issue · comments
Describe the bug
When starting the sorbet language server I get a RuntimeError and a message that the server has crashed.
LSP: starting ['/opt/homebrew/lib/ruby/gems/3.2.0/bin/srb', 'tc', '--typed', 'true', '--enable-all-experimental-lsp-features', '--lsp', '--disable-watchman'] in /Users/drp/dev-environment
Traceback (most recent call last):
File "/Users/drp/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/plugin/core/transports.py", line 188, in invoke
File "/Users/drp/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/plugin/core/sessions.py", line 2125, in on_transport_close
File "/Users/drp/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/plugin/core/windows.py", line 390, in on_post_exit_async
File "./python3.3/_weakrefset.py", line 60, in __iter__
RuntimeError: Set changed size during iteration
LSP: sorbet crashed (5 / 5 times in the last 180.0 seconds), exit code 1, exception: None
I'm not sure if the crash is causing the exception or vice-versa, but changing a set during iteration looks like an error in sublime LSP either way.
To Reproduce
Steps to reproduce the behavior:
- Enable sorbet languages server
I'm not sure if it's something specific to my configuration or how the server is behaving that's triggering this.
Expected behavior
Either no crash, or a clean server crash with no unexpected errors from sublimelsp itself.
Environment (please complete the following information):
- OS: MacOS 13.4.1
- Sublime Text version: 4152
- LSP version: 1.25.0
- Language servers used: sorbet
I'm not sure if the crash is causing the exception
Yes, it looks like that to me. Which means that fixing the exception wouldn't help with this server crashing.
But yes, there is probably something wrong in LSP that makes it not account for server crashing during certain step in the flow.
Does LSP: Log panel provide more information (you can open it from the Command Palette)?