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 closing dot file buffers #3211

Closed
Hoidigan opened this issue Jul 27, 2022 · 2 comments
Closed

Crash when closing dot file buffers #3211

Hoidigan opened this issue Jul 27, 2022 · 2 comments
Labels
C-bug Category: This is a bug R-duplicate Duplicated issue: please refer to the linked issue

Comments

@Hoidigan
Copy link

Summary

After creating a dot file and writing the buffer, attempting to close the buffer while viewing a different buffer causes a crash.

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', helix-view\src\editor.rs:633:51

I ran into this after trying to write a .gitignore file.

Reproduction Steps

I tried this:

  1. hx
  2. :w .test
  3. :n
  4. :bca

I expected this to happen:

The .test buffer to close.

Instead, this happened:

The program crashed

Helix log

~/.cache/helix/helix.log
2022-07-27T00:41:28.692 helix_loader [DEBUG] Located configuration folders: []
2022-07-27T00:41:28.699 globset [DEBUG] glob converted to regex: Glob { glob: "*.{zip,gz,bz2,zst,lzo,sz,tgz,tbz2,lz,lz4,lzma,lzo,z,Z,xz,7z,rar,cab}", re: "(?-u)^[^/]*\\.(cab|rar|7z|xz|Z|z|lzo|lzma|lz4|lz|tbz2|tgz|sz|lzo|zst|bz2|gz|zip)$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: false }, tokens: Tokens([ZeroOrMore, Literal('.'), Alternates([Tokens([Literal('c'), Literal('a'), Literal('b')]), Tokens([Literal('r'), Literal('a'), Literal('r')]), Tokens([Literal('7'), Literal('z')]), Tokens([Literal('x'), Literal('z')]), Tokens([Literal('Z')]), Tokens([Literal('z')]), Tokens([Literal('l'), Literal('z'), Literal('o')]), Tokens([Literal('l'), Literal('z'), Literal('m'), Literal('a')]), Tokens([Literal('l'), Literal('z'), Literal('4')]), Tokens([Literal('l'), Literal('z')]), Tokens([Literal('t'), Literal('b'), Literal('z'), Literal('2')]), Tokens([Literal('t'), Literal('g'), Literal('z')]), Tokens([Literal('s'), Literal('z')]), Tokens([Literal('l'), Literal('z'), Literal('o')]), Tokens([Literal('z'), Literal('s'), Literal('t')]), Tokens([Literal('b'), Literal('z'), Literal('2')]), Tokens([Literal('g'), Literal('z')]), Tokens([Literal('z'), Literal('i'), Literal('p')])])]) }
2022-07-27T00:41:28.699 globset [DEBUG] built glob set; 0 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 1 regexes
2022-07-27T00:41:28.700 ignore::walk [DEBUG] ignoring .\.git: Ignore(IgnoreMatch(Hidden))
2022-07-27T00:41:28.700 helix_term::ui [DEBUG] file_picker init 2.0186ms

Platform

Windows

Terminal Emulator

Windows terminal

Helix Version

helix 22.05

@Hoidigan Hoidigan added the C-bug Category: This is a bug label Jul 27, 2022
@CptPotato
Copy link
Contributor

CptPotato commented Jul 27, 2022

This exact location came up a few times now: #2646, #2367 (comment)

Edit: Actually, I think this is the same as the above issues. The fix was merged after the last release and I can't reproduce on current master.

@Hoidigan you can try building from source or wait for the next release which should fix your issue.

@the-mikedavis
Copy link
Member

Duplicate of #2367

@the-mikedavis the-mikedavis marked this as a duplicate of #2367 Jul 27, 2022
@the-mikedavis the-mikedavis closed this as not planned Won't fix, can't repro, duplicate, stale Jul 27, 2022
@the-mikedavis the-mikedavis added the R-duplicate Duplicated issue: please refer to the linked issue label Jul 27, 2022
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 R-duplicate Duplicated issue: please refer to the linked issue
Projects
None yet
Development

No branches or pull requests

3 participants