helix-editor / helix

A post-modern modal text editor.
https://helix-editor.com
Mozilla Public License 2.0
33.95k stars 2.51k forks source link

Helix crashes or segfaults while editing a Nix file #7963

Closed cab404 closed 1 year ago

cab404 commented 1 year ago

Summary

Helix crashes while editing this file: https://github.com/cab404/home/blob/master/modules/home-manager/user-shell.nix

Here's a full rust backtrace: mow.txt

Reproduction Steps

https://asciinema.org/a/bfn2y49Vh4ULrYfTTjQfMnoJ3

I tried this:

  1. hx ./user-shell.nix

I expected this to happen: everything works

Instead, this happened: crash, terminal corruption, absolute devastation!

Helix log

~/.cache/helix/helix.log ``` 2023-08-16T16:18:47.372 helix_term::application [WARN] failed to load theme `base16` - Theme: file not found for: base16 2023-08-16T16:19:15.290 helix_term::application [WARN] failed to load theme `base16` - Theme: file not found for: base16 2023-08-16T16:20:09.612 helix_term::application [WARN] failed to load theme `base16` - Theme: file not found for: base16 2023-08-16T18:51:57.443 helix_term::application [WARN] failed to load theme `base16` - Theme: file not found for: base16 2023-08-16T19:39:08.439 helix_term::application [WARN] failed to load theme `base16` - Theme: file not found for: base16 2023-08-16T19:39:39.549 helix_term::application [WARN] failed to load theme `base16` - Theme: file not found for: base16 2023-08-16T19:40:21.462 helix_term::application [WARN] failed to load theme `base16` - Theme: file not found for: base16 2023-08-16T19:40:45.818 helix_term::application [WARN] failed to load theme `base16` - Theme: file not found for: base16 2023-08-16T19:41:16.997 helix_term::application [WARN] failed to load theme `base16` - Theme: file not found for: base16 2023-08-16T19:43:22.506 helix_term::application [WARN] failed to load theme `base16` - Theme: file not found for: base16 2023-08-16T19:43:44.035 helix_term::application [WARN] failed to load theme `base16` - Theme: file not found for: base16 ```

Platform

Linux

Terminal Emulator

Alacritty

Helix Version

helix 23.05 (7f5940be)

the-mikedavis commented 1 year ago

See https://github.com/helix-editor/helix/issues/7896#issuecomment-1673230947

cab404 commented 1 year ago

@the-mikedavis Maybe pin some «If you are experiencing a crash on 23.05» issue so it is easier to find before posting?

I think there will be a lot of users with nixos-unstable packaging coming here, and diverting them early would reduce amount of issues posted

(thank you!)

pascalkuthe commented 1 year ago

this has alerady been fixed on nix unstable by backporting the patch so its only temporary until people update again

nilsherzig commented 1 year ago
nix shell github:helix-editor/helix # test in your shell 
nix profile install github:helix-editor/helix # use as default hx for your profile

Using the flake works for me. Since the syntax for the language server config changed since 23.05, you will have to change your config file according to: https://github.com/helix-editor/helix/blob/master/book/src/languages.md

dont follow the guide on the website, its for v 23.05 not the current master branch

the-mikedavis commented 1 year ago

Master docs are published separately

nilsherzig commented 1 year ago

Well looks like I should have read the docs index page, thanks :)