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

:quit panic #278

Closed
robinvd opened this issue Jun 16, 2021 · 3 comments
Closed

:quit panic #278

robinvd opened this issue Jun 16, 2021 · 3 comments
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug

Comments

@robinvd
Copy link
Contributor

robinvd commented Jun 16, 2021

Reproduction steps

Hard to reproduce, but in using helix i've had it multiple times.

  1. run the :quit command
  2. see the error
thread 'tokio-runtime-worker' panicked at 'called `Option::unwrap()` on a `None` value', helix-lsp/src/transport.rs:100:45
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Environment

  • Platform: linux
  • Helix version: v0.0.10-66-g9baf1ec
@robinvd robinvd added the C-bug Category: This is a bug label Jun 16, 2021
@archseer
Copy link
Member

I'm guessing the LSP terminates early and the receive loop fails. We probably want to send proper shutdown signals to LSPs before exiting. I suspect this is also the cause of #266 (also \cc-ing @batonius for thoughts, they've cleaned up a bunch of other panics in that crate)

A quick fix would be

let content_length = content_length.unwrap();

and

let msg = String::from_utf8(content).unwrap();

replacing .unwrap() with ? so we don't panic.

(Sidenote: your Helix version seems to be different, it's still on 0.0.10 but contains new commits)

@archseer
Copy link
Member

Can you still reproduce this with #287 merged?

@robinvd
Copy link
Contributor Author

robinvd commented Jun 20, 2021

Ill test it for a while, and report back.

@archseer archseer added the A-helix-term Area: Helix term improvements label Jun 23, 2021
@robinvd robinvd closed this as completed Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

2 participants