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

Using diff in gutters twice makes Helix get stuck #11027

Open
fintara opened this issue Jun 23, 2024 · 0 comments · May be fixed by #11092
Open

Using diff in gutters twice makes Helix get stuck #11027

fintara opened this issue Jun 23, 2024 · 0 comments · May be fixed by #11092
Labels
C-bug Category: This is a bug

Comments

@fintara
Copy link

fintara commented Jun 23, 2024

Summary

I tried to put "diff" twice in the gutters option, and after reloading the config, Helix got stuck - I had to kill it with -9. When I then try to open a file that is part of a git repository - the same thing happens. Opening a file not part of any repository is fine.

Reproduction Steps

# config.toml
[editor]
gutters = ["diff", "diff"]

Helix log

~/.cache/helix/helix.log

with two "diff":

# start with 'broken' config
2024-06-23T18:34:51.250 globset [DEBUG] glob converted to regex: Glob { glob: "*/Dockerfile.*", re: "(?-u)^.*/Dockerfile\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('D'), Literal('o'), Literal('c'), Literal('k'), Literal('e'), Literal('r'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-06-23T18:34:51.250 globset [DEBUG] glob converted to regex: Glob { glob: "*/dockerfile.*", re: "(?-u)^.*/dockerfile\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('d'), Literal('o'), Literal('c'), Literal('k'), Literal('e'), Literal('r'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-06-23T18:34:51.250 globset [DEBUG] glob converted to regex: Glob { glob: "*/Containerfile.*", re: "(?-u)^.*/Containerfile\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('C'), Literal('o'), Literal('n'), Literal('t'), Literal('a'), Literal('i'), Literal('n'), Literal('e'), Literal('r'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-06-23T18:34:51.250 globset [DEBUG] glob converted to regex: Glob { glob: "*/containerfile.*", re: "(?-u)^.*/containerfile\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('c'), Literal('o'), Literal('n'), Literal('t'), Literal('a'), Literal('i'), Literal('n'), Literal('e'), Literal('r'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-06-23T18:34:51.250 globset [DEBUG] glob converted to regex: Glob { glob: "*/BUILD.*", re: "(?-u)^.*/BUILD\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('B'), Literal('U'), Literal('I'), Literal('L'), Literal('D'), Literal('.'), ZeroOrMore]) }
2024-06-23T18:34:51.250 globset [DEBUG] glob converted to regex: Glob { glob: "*/.env.*", re: "(?-u)^.*/\\.env\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('.'), Literal('e'), Literal('n'), Literal('v'), Literal('.'), ZeroOrMore]) }
2024-06-23T18:34:51.250 globset [DEBUG] glob converted to regex: Glob { glob: "*/.envrc.*", re: "(?-u)^.*/\\.envrc\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('.'), Literal('e'), Literal('n'), Literal('v'), Literal('r'), Literal('c'), Literal('.'), ZeroOrMore]) }
2024-06-23T18:34:51.250 globset [DEBUG] glob converted to regex: Glob { glob: "*/Jenkinsfile.*", re: "(?-u)^.*/Jenkinsfile\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('J'), Literal('e'), Literal('n'), Literal('k'), Literal('i'), Literal('n'), Literal('s'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-06-23T18:34:51.250 globset [DEBUG] built glob set; 1 literals, 0 basenames, 0 extensions, 0 prefixes, 121 suffixes, 5 required extensions, 8 regexes
2024-06-23T18:34:51.254 helix_view::clipboard::provider [DEBUG] No native clipboard provider found. Yanking by OSC 52 and pasting will be internal to Helix
2024-06-23T18:34:51.259 helix_view::editor [DEBUG] Language server not found for `source.toml` taplo command 'taplo' not found: cannot find binary path
2024-06-23T18:34:51.259 helix_view::editor [DEBUG] editor status: Loaded 1 file.
2024-06-23T18:34:51.259 mio::poll [TRACE] registering event source with poller: token=Token(94330180865152), interests=READABLE | WRITABLE
2024-06-23T18:34:51.259 mio::poll [TRACE] registering event source with poller: token=Token(94330180917120), interests=READABLE | WRITABLE
2024-06-23T18:34:51.259 mio::poll [TRACE] registering event source with poller: token=Token(0), interests=READABLE
2024-06-23T18:34:51.259 mio::poll [TRACE] registering event source with poller: token=Token(1), interests=READABLE
2024-06-23T18:34:51.267 helix_tui::backend::crossterm [DEBUG] The keyboard enhancement protocol is not supported in this terminal (checked in 7.901806ms)
# kill -9

with one "diff":

# start with 'working' config:
2024-06-23T18:37:58.030 globset [DEBUG] glob converted to regex: Glob { glob: "*/Dockerfile.*", re: "(?-u)^.*/Dockerfile\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('D'), Literal('o'), Literal('c'), Literal('k'), Literal('e'), Literal('r'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-06-23T18:37:58.030 globset [DEBUG] glob converted to regex: Glob { glob: "*/dockerfile.*", re: "(?-u)^.*/dockerfile\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('d'), Literal('o'), Literal('c'), Literal('k'), Literal('e'), Literal('r'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-06-23T18:37:58.030 globset [DEBUG] glob converted to regex: Glob { glob: "*/Containerfile.*", re: "(?-u)^.*/Containerfile\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('C'), Literal('o'), Literal('n'), Literal('t'), Literal('a'), Literal('i'), Literal('n'), Literal('e'), Literal('r'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-06-23T18:37:58.030 globset [DEBUG] glob converted to regex: Glob { glob: "*/containerfile.*", re: "(?-u)^.*/containerfile\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('c'), Literal('o'), Literal('n'), Literal('t'), Literal('a'), Literal('i'), Literal('n'), Literal('e'), Literal('r'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-06-23T18:37:58.030 globset [DEBUG] glob converted to regex: Glob { glob: "*/BUILD.*", re: "(?-u)^.*/BUILD\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('B'), Literal('U'), Literal('I'), Literal('L'), Literal('D'), Literal('.'), ZeroOrMore]) }
2024-06-23T18:37:58.030 globset [DEBUG] glob converted to regex: Glob { glob: "*/.env.*", re: "(?-u)^.*/\\.env\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('.'), Literal('e'), Literal('n'), Literal('v'), Literal('.'), ZeroOrMore]) }
2024-06-23T18:37:58.030 globset [DEBUG] glob converted to regex: Glob { glob: "*/.envrc.*", re: "(?-u)^.*/\\.envrc\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('.'), Literal('e'), Literal('n'), Literal('v'), Literal('r'), Literal('c'), Literal('.'), ZeroOrMore]) }
2024-06-23T18:37:58.030 globset [DEBUG] glob converted to regex: Glob { glob: "*/Jenkinsfile.*", re: "(?-u)^.*/Jenkinsfile\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('J'), Literal('e'), Literal('n'), Literal('k'), Literal('i'), Literal('n'), Literal('s'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-06-23T18:37:58.030 globset [DEBUG] built glob set; 1 literals, 0 basenames, 0 extensions, 0 prefixes, 121 suffixes, 5 required extensions, 8 regexes
2024-06-23T18:37:58.034 helix_view::clipboard::provider [DEBUG] No native clipboard provider found. Yanking by OSC 52 and pasting will be internal to Helix
2024-06-23T18:37:58.038 helix_view::editor [DEBUG] Language server not found for `source.toml` taplo command 'taplo' not found: cannot find binary path
2024-06-23T18:37:58.038 helix_view::editor [DEBUG] editor status: Loaded 1 file.
2024-06-23T18:37:58.039 mio::poll [TRACE] registering event source with poller: token=Token(94881824723200), interests=READABLE | WRITABLE
2024-06-23T18:37:58.039 mio::poll [TRACE] registering event source with poller: token=Token(94881824980864), interests=READABLE | WRITABLE
2024-06-23T18:37:58.039 mio::poll [TRACE] registering event source with poller: token=Token(0), interests=READABLE
2024-06-23T18:37:58.039 mio::poll [TRACE] registering event source with poller: token=Token(1), interests=READABLE
2024-06-23T18:37:58.046 helix_tui::backend::crossterm [DEBUG] The keyboard enhancement protocol is not supported in this terminal (checked in 6.740482ms)
2024-06-23T18:37:58.046 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-06-23T18:37:58.047 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-06-23T18:37:58.285 helix_term::application [DEBUG] received editor event: IdleTimer
2024-06-23T18:37:59.323 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-06-23T18:37:59.575 helix_term::application [DEBUG] received editor event: IdleTimer
2024-06-23T18:38:00.526 helix_term::commands::typed [DEBUG] quitting...
2024-06-23T18:38:00.526 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-06-23T18:38:00.644 helix_term::commands::typed [DEBUG] quitting...
2024-06-23T18:38:00.644 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-06-23T18:38:00.644 helix_term::job [DEBUG] waiting on jobs...
2024-06-23T18:38:00.644 helix_term::job [DEBUG] waiting on jobs...
2024-06-23T18:38:00.646 mio::poll [TRACE] deregistering event source from poller
2024-06-23T18:38:00.647 mio::poll [TRACE] deregistering event source from poller
# quit with :q

Platform

Linux

Terminal Emulator

gnome-terminal

Installation Method

dnf install

Helix Version

helix 24.3 (2cadec0)

@fintara fintara added the C-bug Category: This is a bug label Jun 23, 2024
kanielrkirby pushed a commit to kanielrkirby/helix that referenced this issue Jul 5, 2024
- Added a new method to `DiffHandle`, `try_load`, which returns an `Option<Diff>`, since deadlocks can happen here.
- Use said method in `gutter.rs` `diff()`, which will use a blank `GutterFn` instead.

Should fix helix-editor#11027.
@kanielrkirby kanielrkirby linked a pull request Jul 5, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant