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

Rust analyzer stops responding after adding a bunch of emojis #3286

Closed
A-Walrus opened this issue Aug 1, 2022 · 0 comments · Fixed by #5711
Closed

Rust analyzer stops responding after adding a bunch of emojis #3286

A-Walrus opened this issue Aug 1, 2022 · 0 comments · Fixed by #5711
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug

Comments

@A-Walrus
Copy link
Contributor

A-Walrus commented Aug 1, 2022

Summary

fn main() {
    println!("Hello, world!");
    // 👆
}

Adding more of the "👆" emoji to the comment causes the language server to stop responding.

Might be related to #3283 which also has to do with emojis.

I don't think this is an upstream bug in rust-analyzer as trying this in vscode with rust-analyzer works fine

Reproduction Steps

asciinema

I tried this:

  1. hx .
  2. open the file with
fn main() {
    println!("Hello, world!");
    // 👆
}
  1. Wait for language server to respond (by hitting <space> k repeatedly
  2. Copy paste the emoji a bunch of times
  3. Try viewing the documentation for println! (by hitting <space> k), notice it doesn't respond

I expected this to happen:
I see the documentation for println!, like I did before adding the emojis.

Instead, this happened:
No documentation appeared

Helix log

~/.cache/helix/helix.log
2022-08-01T21:04:07.872 helix_lsp::transport [ERROR] err <- "Panic context:\n"
2022-08-01T21:04:07.872 helix_lsp::transport [ERROR] err <- "> \n"
2022-08-01T21:04:07.873 helix_lsp::transport [ERROR] err <- "version: 0.0.0 (7e2b983fd 2022-07-24)\n"
2022-08-01T21:04:07.873 helix_lsp::transport [ERROR] err <- "notification: textDocument/didChange\n"
2022-08-01T21:04:07.873 helix_lsp::transport [ERROR] err <- "\n"
2022-08-01T21:04:07.873 helix_lsp::transport [ERROR] err <- "thread 'LspServer' panicked at 'assertion failed: self.is_char_boundary(n)', /rustc/1.62.1/library/alloc/src/string.rs:1800:29\n"
2022-08-01T21:04:07.873 helix_lsp::transport [ERROR] err <- "stack backtrace:\n"
2022-08-01T21:04:07.873 helix_lsp::transport [ERROR] err <- "note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.\n"
2022-08-01T21:04:08.061 helix_lsp::transport [ERROR] err: <- StreamClosed
2022-08-01T21:04:08.061 helix_lsp::transport [ERROR] err: <- StreamClosed
2022-08-01T21:04:08.372 helix_lsp::transport [ERROR] err: <- IO(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
2022-08-01T21:04:08.403 helix_lsp::transport [ERROR] err: <- IO(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
2022-08-01T21:04:08.432 helix_lsp::transport [ERROR] err: <- IO(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
2022-08-01T21:04:08.463 helix_lsp::transport [ERROR] err: <- IO(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
2022-08-01T21:04:08.494 helix_lsp::transport [ERROR] err: <- IO(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
2022-08-01T21:04:08.525 helix_lsp::transport [ERROR] err: <- IO(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
2022-08-01T21:04:08.555 helix_lsp::transport [ERROR] err: <- IO(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
2022-08-01T21:04:08.586 helix_lsp::transport [ERROR] err: <- IO(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
2022-08-01T21:04:08.616 helix_lsp::transport [ERROR] err: <- IO(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
2022-08-01T21:04:08.647 helix_lsp::transport [ERROR] err: <- IO(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
2022-08-01T21:04:08.677 helix_lsp::transport [ERROR] err: <- IO(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
2022-08-01T21:04:08.708 helix_lsp::transport [ERROR] err: <- IO(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
2022-08-01T21:04:09.973 helix_lsp::transport [ERROR] err: <- IO(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
2022-08-01T21:04:13.802 helix_lsp::transport [ERROR] err: <- IO(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
2022-08-01T21:04:14.303 helix_term::application [ERROR] Timed out waiting for language servers to shutdown

Platform

Linux

Terminal Emulator

Kitty

Helix Version

helix 22.05

@A-Walrus A-Walrus added the C-bug Category: This is a bug label Aug 1, 2022
@the-mikedavis the-mikedavis added the A-helix-term Area: Helix term improvements label Aug 1, 2022
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

Successfully merging a pull request may close this issue.

2 participants