Skip to content
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

RuntimeError: Set changed size during iteration #2310

Open
djrodgerspryor opened this issue Aug 16, 2023 · 1 comment
Open

RuntimeError: Set changed size during iteration #2310

djrodgerspryor opened this issue Aug 16, 2023 · 1 comment
Labels

Comments

@djrodgerspryor
Copy link

djrodgerspryor commented Aug 16, 2023

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:

  1. 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.

Screenshots
Screenshot 2023-08-16 at 11 48 13 am

Environment (please complete the following information):

  • OS: MacOS 13.4.1
  • Sublime Text version: 4152
  • LSP version: 1.25.0
  • Language servers used: sorbet
Screenshot 2023-08-16 at 11 48 54 am
@rchl
Copy link
Member

rchl commented Aug 16, 2023

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)?

@rchl rchl added the bug label Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants