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

Crash when attempting to edit version controlled file #8577

Closed
torkleyy opened this issue Oct 20, 2023 · 2 comments
Closed

Crash when attempting to edit version controlled file #8577

torkleyy opened this issue Oct 20, 2023 · 2 comments
Labels
C-bug Category: This is a bug

Comments

@torkleyy
Copy link

torkleyy commented Oct 20, 2023

Summary

In my Rust projects, whenever I go into insert mode and type a single character, helix will crash.
Interestingly, whether I was able to trigger the error seemed to depend on the file opened, some files would work fine (I suspect very small files were okay).

It either crashes with a panic or a segmentation fault.
Whenever it panicked, it seemed part of the editor was still running, but it wasn't rendering correctly anymore (I could see the panic message intermixed with stuff helix drew before, new keystrokes would appear as I wrote them but without any theming, but I would still have to exit helix as usual to get back to my shell).

I was able to reproduce with language server installed and without, below log is without.

Panic

(Sorry for the bad screenshot)

image

Segmentation fault

'hx src/extensions.rs' terminated by signal SIGSEV (Address boundary error)

Reproduction Steps

  1. git clone git@github.com:ron-rs/ron
  2. cd ron
  3. hx src/extensions.rs
  4. A<CR>

I expected this to happen: A newline gets inserted at the end of the first line.

Instead, this happened: Editor crashes with SIGSEV or panic.

Helix log

~/.cache/helix/helix.log
2023-10-20T10:31:57.326 helix_view::clipboard [DEBUG] Using pbcopy+pbpaste to interact with the system clipboard
2023-10-20T10:31:57.371 helix_view::editor [DEBUG] editor status: Loaded 1 file.
2023-10-20T10:31:57.371 helix_lsp::client [INFO] Using custom LSP config: {"inlayHints":{"bindingModeHints":{"enable":false},"closingBraceHints":{"minLines":10},"closureReturnTypeHints":{"enable":"with_block"},"discriminantHints":{"enable":"fieldless"},"lifetimeElisionHints":{"enable":"skip_trivial"},"typeHints":{"hideClosureInitialization":false}}}
2023-10-20T10:31:57.371 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"general":{"positionEncodings":["utf-8","utf-32","utf-16"]},"textDocument":{"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"completion":{"completionItem":{"deprecatedSupport":true,"insertReplaceSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{}},"hover":{"contentFormat":["markdown"]},"inlayHint":{"dynamicRegistration":false},"publishDiagnostics":{"versionSupport":true},"rename":{"dynamicRegistration":false,"honorsChangeAnnotations":false,"prepareSupport":true},"signatureHelp":{"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown"],"parameterInformation":{"labelOffsetSupport":true}}}},"window":{"workDoneProgress":true},"workspace":{"applyEdit":true,"configuration":true,"didChangeConfiguration":{"dynamicRegistration":false},"executeCommand":{"dynamicRegistration":false},"inlayHint":{"refreshSupport":false},"symbol":{"dynamicRegistration":false},"workspaceEdit":{"documentChanges":true,"failureHandling":"abort","normalizesLineEndings":false,"resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"helix","version":"23.05 (7f5940be)"},"initializationOptions":{"inlayHints":{"bindingModeHints":{"enable":false},"closingBraceHints":{"minLines":10},"closureReturnTypeHints":{"enable":"with_block"},"discriminantHints":{"enable":"fieldless"},"lifetimeElisionHints":{"enable":"skip_trivial"},"typeHints":{"hideClosureInitialization":false}}},"processId":36470,"rootPath":"/Users/thomas/Workspace/ron","rootUri":"file:///Users/thomas/Workspace/ron","workspaceFolders":[{"name":"ron","uri":"file:///Users/thomas/Workspace/ron"}]},"id":0}
2023-10-20T10:31:57.371 helix_tui::backend::crossterm [DEBUG] The keyboard enhancement protocol is not supported in this terminal (checked in 138.25µs)
2023-10-20T10:31:57.372 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-10-20T10:31:57.728 helix_term::application [DEBUG] received editor event: IdleTimer
2023-10-20T10:31:57.820 helix_lsp::transport [ERROR] err <- "error: 'rust-analyzer' is not installed for the toolchain 'stable-aarch64-apple-darwin'\n"
2023-10-20T10:31:57.821 helix_lsp [ERROR] failed to initialize language server: server closed the stream
2023-10-20T10:31:57.821 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, Notification(Notification { jsonrpc: None, method: "exit", params: None })))
2023-10-20T10:31:57.821 helix_view::editor [DEBUG] editor status: Language server exited
2023-10-20T10:31:57.821 helix_lsp::transport [ERROR] err: <- StreamClosed
2023-10-20T10:31:57.821 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-10-20T10:31:58.633 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-10-20T10:31:58.798 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-10-20T10:31:58.942 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-10-20T10:31:59.077 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-10-20T10:31:59.219 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-10-20T10:31:59.353 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-10-20T10:31:59.627 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-10-20T10:31:59.878 helix_vcs::diff::worker [INFO] Diff computation timed out, update of diffs might appear delayed
2023-10-20T10:31:59.878 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-10-20T10:32:00.259 helix_term::application [DEBUG] received editor event: IdleTimer
2023-10-20T10:32:00.260 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-10-20T10:32:10.500 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-10-20T10:32:10.503 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-10-20T10:32:10.504 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-10-20T10:32:10.506 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-10-20T10:32:10.907 helix_term::application [DEBUG] received editor event: IdleTimer
2023-10-20T10:32:10.909 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-10-20T10:32:13.144 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 1
2023-10-20T10:32:13.147 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 1
2023-10-20T10:32:13.148 helix_term::commands::typed [DEBUG] quitting...
2023-10-20T10:32:13.149 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 1
2023-10-20T10:32:13.150 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 1
2023-10-20T10:32:13.150 helix_term::job [DEBUG] waiting on jobs...
2023-10-20T10:32:13.150 helix_term::job [DEBUG] waiting on jobs...

Platform

macOS aarch64

Terminal Emulator

alacritty 0.12.3 (5efb069)

Helix Version

helix 23.05 (7f5940b)

@torkleyy torkleyy added the C-bug Category: This is a bug label Oct 20, 2023
@torkleyy torkleyy changed the title Crash when attempting to edit non-root Rust file Crash when attempting to edit version controlled file Oct 20, 2023
@torkleyy
Copy link
Author

torkleyy commented Oct 20, 2023

The issue is not Rust specific, it happens with other repositories as well. Judging by the panic, it's related to version control.

EDIT: Yes, if I delete the .git folder, it doesn't crash.

@pascalkuthe
Copy link
Member

#8571 (comment)

@pascalkuthe pascalkuthe closed this as not planned Won't fix, can't repro, duplicate, stale Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

2 participants