-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 on write, open buffers corrupted, files overridden, #4422
Comments
Can you build from source? There have been some major fixes to file writing recently. Otherwise there will (hopefully) be a new release next month. |
I will do that. Thanks for the tip. |
Can you reproduce this easily? If so, can you run helix with At first glance, this looks like maybe the LS and helix are getting out of sync with respect to the document state. |
Was not able to reproduce again. I'd been saving a lot previously under the same circumstances with no issues. |
I am closing this issue as stale as it was not possible to reproduce and occurred with an old version. Since then there have been improvements to the saving code which likely resolved this issue or changed the way it manifests. If you are still having problems feel free to open a new issue |
Reasonable. I updated and turned off auto-format, and the issue hasn't come up again, despite heavy use. Either it's linked to the auto-formatter, it's been fixed, or it was Cosmic rays. Hopefully it's gone forever. |
Ah if it's autoformat related then #5711 might fix it if there are non-ascii chars in the document. In anycase a fresh issue would be better if you ever find a reproducible case. |
Summary
Playing around with a personal project. Editor crashed on write.
All buffers that were open were corrupted, text from some buffers crossed into others. text placed randomly across
I suspect cargo fmt on save had some part to play in this.
Quite lucky this project was not too far along.
As an example one file now looks like this:
Found the test module in another file.
Reproduction Steps
:w
using[C-s]
defined as a shortcut in configHelix log
2022-10-22T00:01:15.308 helix_lsp::transport [ERROR] err: <- StreamClosed
2022-10-22T12:52:27.899 helix_term::application [WARN] lsp position out of bounds - Diagnostic { range: Range { start: Position { line: 31, character: 25 }, end: Position { line: 31, character: 28 } }, severity: Some(Error), code: Some(String("E0412")), code_description: Some(CodeDescription { href: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("doc.rust-lang.org")), port: None, path: "/error-index.html", query: None, fragment: Some("E0412") } }), source: Some("rustc"), message: "cannot find type
App
in this scope\nnot found in this scope", related_information: Some([DiagnosticRelatedInformation { location: Location { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/c:/Users/Gibus/dev/sati/src/commands.rs", query: None, fragment: None }, range: Range { start: Position { line: 8, character: 0 }, end: Position { line: 8, character: 0 } } }, message: "consider importing this struct:use crate::App;\n\n
" }]), tags: None, data: None }2022-10-22T12:52:27.913 helix_term::application [WARN] lsp position out of bounds - Diagnostic { range: Range { start: Position { line: 31, character: 25 }, end: Position { line: 31, character: 28 } }, severity: Some(Error), code: Some(String("E0412")), code_description: Some(CodeDescription { href: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("doc.rust-lang.org")), port: None, path: "/error-index.html", query: None, fragment: Some("E0412") } }), source: Some("rustc"), message: "cannot find type
App
in this scope\nnot found in this scope", related_information: Some([DiagnosticRelatedInformation { location: Location { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/c:/Users/Gibus/dev/sati/src/commands.rs", query: None, fragment: None }, range: Range { start: Position { line: 8, character: 0 }, end: Position { line: 8, character: 0 } } }, message: "consider importing this struct:use crate::App;\n\n
" }]), tags: None, data: None }2022-10-22T12:52:27.913 helix_term::application [WARN] lsp position out of bounds - Diagnostic { range: Range { start: Position { line: 31, character: 4 }, end: Position { line: 31, character: 41 } }, severity: Some(Error), code: Some(String("E0592")), code_description: Some(CodeDescription { href: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("doc.rust-lang.org")), port: None, path: "/error-index.html", query: None, fragment: Some("E0592") } }), source: Some("rustc"), message: "duplicate definitions with name
as_fn
\nduplicate definitions foras_fn
", related_information: Some([DiagnosticRelatedInformation { location: Location { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/c:/Users/Gibus/dev/sati/src/config.rs", query: None, fragment: None }, range: Range { start: Position { line: 48, character: 4 }, end: Position { line: 48, character: 31 } } }, message: "other definition foras_fn
" }]), tags: None, data: None }2022-10-22T12:52:40.307 helix_term::application [WARN] lsp position out of bounds - Diagnostic { range: Range { start: Position { line: 31, character: 25 }, end: Position { line: 31, character: 28 } }, severity: Some(Error), code: Some(String("E0412")), code_description: Some(CodeDescription { href: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("doc.rust-lang.org")), port: None, path: "/error-index.html", query: None, fragment: Some("E0412") } }), source: Some("rustc"), message: "cannot find type
App
in this scope\nnot found in this scope", related_information: Some([DiagnosticRelatedInformation { location: Location { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/c:/Users/Gibus/dev/sati/src/commands.rs", query: None, fragment: None }, range: Range { start: Position { line: 8, character: 0 }, end: Position { line: 8, character: 0 } } }, message: "consider importing this struct:use crate::App;\n\n
" }]), tags: None, data: None }2022-10-22T12:52:40.319 helix_term::application [WARN] lsp position out of bounds - Diagnostic { range: Range { start: Position { line: 31, character: 25 }, end: Position { line: 31, character: 28 } }, severity: Some(Error), code: Some(String("E0412")), code_description: Some(CodeDescription { href: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("doc.rust-lang.org")), port: None, path: "/error-index.html", query: None, fragment: Some("E0412") } }), source: Some("rustc"), message: "cannot find type
App
in this scope\nnot found in this scope", related_information: Some([DiagnosticRelatedInformation { location: Location { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/c:/Users/Gibus/dev/sati/src/commands.rs", query: None, fragment: None }, range: Range { start: Position { line: 8, character: 0 }, end: Position { line: 8, character: 0 } } }, message: "consider importing this struct:use crate::App;\n\n
" }]), tags: None, data: None }2022-10-22T12:52:40.319 helix_term::application [WARN] lsp position out of bounds - Diagnostic { range: Range { start: Position { line: 31, character: 4 }, end: Position { line: 31, character: 41 } }, severity: Some(Error), code: Some(String("E0592")), code_description: Some(CodeDescription { href: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("doc.rust-lang.org")), port: None, path: "/error-index.html", query: None, fragment: Some("E0592") } }), source: Some("rustc"), message: "duplicate definitions with name
as_fn
\nduplicate definitions foras_fn
", related_information: Some([DiagnosticRelatedInformation { location: Location { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/c:/Users/Gibus/dev/sati/src/config.rs", query: None, fragment: None }, range: Range { start: Position { line: 48, character: 4 }, end: Position { line: 48, character: 31 } } }, message: "other definition foras_fn
" }]), tags: None, data: None }2022-10-22T12:52:43.060 helix_term::application [WARN] lsp position out of bounds - Diagnostic { range: Range { start: Position { line: 31, character: 25 }, end: Position { line: 31, character: 28 } }, severity: Some(Error), code: Some(String("E0412")), code_description: Some(CodeDescription { href: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("doc.rust-lang.org")), port: None, path: "/error-index.html", query: None, fragment: Some("E0412") } }), source: Some("rustc"), message: "cannot find type
App
in this scope\nnot found in this scope", related_information: Some([DiagnosticRelatedInformation { location: Location { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/c:/Users/Gibus/dev/sati/src/commands.rs", query: None, fragment: None }, range: Range { start: Position { line: 8, character: 0 }, end: Position { line: 8, character: 0 } } }, message: "consider importing this struct:use crate::App;\n\n
" }]), tags: None, data: None }2022-10-22T12:52:43.074 helix_term::application [WARN] lsp position out of bounds - Diagnostic { range: Range { start: Position { line: 31, character: 25 }, end: Position { line: 31, character: 28 } }, severity: Some(Error), code: Some(String("E0412")), code_description: Some(CodeDescription { href: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("doc.rust-lang.org")), port: None, path: "/error-index.html", query: None, fragment: Some("E0412") } }), source: Some("rustc"), message: "cannot find type
App
in this scope\nnot found in this scope", related_information: Some([DiagnosticRelatedInformation { location: Location { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/c:/Users/Gibus/dev/sati/src/commands.rs", query: None, fragment: None }, range: Range { start: Position { line: 8, character: 0 }, end: Position { line: 8, character: 0 } } }, message: "consider importing this struct:use crate::App;\n\n
" }]), tags: None, data: None }2022-10-22T12:52:43.074 helix_term::application [WARN] lsp position out of bounds - Diagnostic { range: Range { start: Position { line: 31, character: 4 }, end: Position { line: 31, character: 41 } }, severity: Some(Error), code: Some(String("E0592")), code_description: Some(CodeDescription { href: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("doc.rust-lang.org")), port: None, path: "/error-index.html", query: None, fragment: Some("E0592") } }), source: Some("rustc"), message: "duplicate definitions with name
as_fn
\nduplicate definitions foras_fn
", related_information: Some([DiagnosticRelatedInformation { location: Location { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/c:/Users/Gibus/dev/sati/src/config.rs", query: None, fragment: None }, range: Range { start: Position { line: 48, character: 4 }, end: Position { line: 48, character: 31 } } }, message: "other definition foras_fn
" }]), tags: None, data: None }2022-10-22T12:52:44.642 helix_term::application [WARN] lsp position out of bounds - Diagnostic { range: Range { start: Position { line: 31, character: 25 }, end: Position { line: 31, character: 28 } }, severity: Some(Error), code: Some(String("E0412")), code_description: Some(CodeDescription { href: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("doc.rust-lang.org")), port: None, path: "/error-index.html", query: None, fragment: Some("E0412") } }), source: Some("rustc"), message: "cannot find type
App
in this scope\nnot found in this scope", related_information: Some([DiagnosticRelatedInformation { location: Location { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/c:/Users/Gibus/dev/sati/src/commands.rs", query: None, fragment: None }, range: Range { start: Position { line: 8, character: 0 }, end: Position { line: 8, character: 0 } } }, message: "consider importing this struct:use crate::App;\n\n
" }]), tags: None, data: None }2022-10-22T12:52:44.658 helix_term::application [WARN] lsp position out of bounds - Diagnostic { range: Range { start: Position { line: 31, character: 25 }, end: Position { line: 31, character: 28 } }, severity: Some(Error), code: Some(String("E0412")), code_description: Some(CodeDescription { href: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("doc.rust-lang.org")), port: None, path: "/error-index.html", query: None, fragment: Some("E0412") } }), source: Some("rustc"), message: "cannot find type
App
in this scope\nnot found in this scope", related_information: Some([DiagnosticRelatedInformation { location: Location { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/c:/Users/Gibus/dev/sati/src/commands.rs", query: None, fragment: None }, range: Range { start: Position { line: 8, character: 0 }, end: Position { line: 8, character: 0 } } }, message: "consider importing this struct:use crate::App;\n\n
" }]), tags: None, data: None }2022-10-22T12:52:44.658 helix_term::application [WARN] lsp position out of bounds - Diagnostic { range: Range { start: Position { line: 31, character: 4 }, end: Position { line: 31, character: 41 } }, severity: Some(Error), code: Some(String("E0592")), code_description: Some(CodeDescription { href: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("doc.rust-lang.org")), port: None, path: "/error-index.html", query: None, fragment: Some("E0592") } }), source: Some("rustc"), message: "duplicate definitions with name
as_fn
\nduplicate definitions foras_fn
", related_information: Some([DiagnosticRelatedInformation { location: Location { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/c:/Users/Gibus/dev/sati/src/config.rs", query: None, fragment: None }, range: Range { start: Position { line: 48, character: 4 }, end: Position { line: 48, character: 31 } } }, message: "other definition foras_fn
" }]), tags: None, data: None }2022-10-22T12:53:03.437 helix_term::application [WARN] lsp position out of bounds - Diagnostic { range: Range { start: Position { line: 31, character: 25 }, end: Position { line: 31, character: 28 } }, severity: Some(Error), code: Some(String("E0412")), code_description: Some(CodeDescription { href: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("doc.rust-lang.org")), port: None, path: "/error-index.html", query: None, fragment: Some("E0412") } }), source: Some("rustc"), message: "cannot find type
App
in this scope\nnot found in this scope", related_information: Some([DiagnosticRelatedInformation { location: Location { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/c:/Users/Gibus/dev/sati/src/commands.rs", query: None, fragment: None }, range: Range { start: Position { line: 8, character: 0 }, end: Position { line: 8, character: 0 } } }, message: "consider importing this struct:use crate::App;\n\n
" }]), tags: None, data: None }2022-10-22T12:53:03.451 helix_term::application [WARN] lsp position out of bounds - Diagnostic { range: Range { start: Position { line: 31, character: 25 }, end: Position { line: 31, character: 28 } }, severity: Some(Error), code: Some(String("E0412")), code_description: Some(CodeDescription { href: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("doc.rust-lang.org")), port: None, path: "/error-index.html", query: None, fragment: Some("E0412") } }), source: Some("rustc"), message: "cannot find type
App
in this scope\nnot found in this scope", related_information: Some([DiagnosticRelatedInformation { location: Location { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/c:/Users/Gibus/dev/sati/src/commands.rs", query: None, fragment: None }, range: Range { start: Position { line: 8, character: 0 }, end: Position { line: 8, character: 0 } } }, message: "consider importing this struct:use crate::App;\n\n
" }]), tags: None, data: None }2022-10-22T12:53:03.451 helix_term::application [WARN] lsp position out of bounds - Diagnostic { range: Range { start: Position { line: 31, character: 4 }, end: Position { line: 31, character: 41 } }, severity: Some(Error), code: Some(String("E0592")), code_description: Some(CodeDescription { href: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("doc.rust-lang.org")), port: None, path: "/error-index.html", query: None, fragment: Some("E0592") } }), source: Some("rustc"), message: "duplicate definitions with name
as_fn
\nduplicate definitions foras_fn
", related_information: Some([DiagnosticRelatedInformation { location: Location { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/c:/Users/Gibus/dev/sati/src/config.rs", query: None, fragment: None }, range: Range { start: Position { line: 48, character: 4 }, end: Position { line: 48, character: 31 } } }, message: "other definition foras_fn
" }]), tags: None, data: None }2022-10-22T12:53:06.983 helix_term::application [WARN] lsp position out of bounds - Diagnostic { range: Range { start: Position { line: 31, character: 25 }, end: Position { line: 31, character: 28 } }, severity: Some(Error), code: Some(String("E0412")), code_description: Some(CodeDescription { href: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("doc.rust-lang.org")), port: None, path: "/error-index.html", query: None, fragment: Some("E0412") } }), source: Some("rustc"), message: "cannot find type
App
in this scope\nnot found in this scope", related_information: Some([DiagnosticRelatedInformation { location: Location { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/c:/Users/Gibus/dev/sati/src/commands.rs", query: None, fragment: None }, range: Range { start: Position { line: 8, character: 0 }, end: Position { line: 8, character: 0 } } }, message: "consider importing this struct:use crate::App;\n\n
" }]), tags: None, data: None }...
2022-10-22T21:28:50.312 helix_term::application [WARN] lsp position out of bounds - Diagnostic { range: Range { start: Position { line: 168, character: 8 }, end: Position { line: 168, character: 22 } }, severity: Some(Hint), code: Some(String("E0308")), code_description: Some(CodeDescription { href: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("doc.rust-lang.org")), port: None, path: "/error-index.html", query: None, fragment: Some("E0308") } }), source: Some("rustc"), message: "expected due to the type of this binding", related_information: Some([DiagnosticRelatedInformation { location: Location { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/c:/Users/Gibus/dev/sati/src/app.rs", query: None, fragment: None }, range: Range { start: Position { line: 168, character: 25 }, end: Position { line: 168, character: 40 } } }, message: "original diagnostic" }]), tags: None, data: None }
2022-10-22T21:28:50.312 helix_term::application [WARN] lsp position out of bounds - Diagnostic { range: Range { start: Position { line: 168, character: 25 }, end: Position { line: 168, character: 25 } }, severity: Some(Hint), code: Some(String("E0308")), code_description: Some(CodeDescription { href: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("doc.rust-lang.org")), port: None, path: "/error-index.html", query: None, fragment: Some("E0308") } }), source: Some("rustc"), message: "try wrapping the expression in
commands::_::_serde::__private::Some
:commands::_::_serde::__private::Some(
,)
", related_information: Some([DiagnosticRelatedInformation { location: Location { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/c:/Users/Gibus/dev/sati/src/app.rs", query: None, fragment: None }, range: Range { start: Position { line: 168, character: 25 }, end: Position { line: 168, character: 40 } } }, message: "original diagnostic" }]), tags: None, data: None }2022-10-22T21:28:50.312 helix_term::application [WARN] lsp position out of bounds - Diagnostic { range: Range { start: Position { line: 172, character: 25 }, end: Position { line: 172, character: 40 } }, severity: Some(Error), code: Some(String("E0308")), code_description: Some(CodeDescription { href: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("doc.rust-lang.org")), port: None, path: "/error-index.html", query: None, fragment: Some("E0308") } }), source: Some("rustc"), message: "mismatched types\nexpected enum
std::option::Option<std::string::String>
\n found structstd::string::String
", related_information: Some([DiagnosticRelatedInformation { location: Location { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/c:/Users/Gibus/dev/sati/src/app.rs", query: None, fragment: None }, range: Range { start: Position { line: 172, character: 8 }, end: Position { line: 172, character: 22 } } }, message: "expected due to the type of this binding" }, DiagnosticRelatedInformation { location: Location { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/c:/Users/Gibus/dev/sati/src/app.rs", query: None, fragment: None }, range: Range { start: Position { line: 172, character: 25 }, end: Position { line: 172, character: 25 } } }, message: "try wrapping the expression incommands::_::_serde::__private::Some
:commands::_::_serde::__private::Some(
,)
" }]), tags: None, data: None }2022-10-22T21:28:50.312 helix_term::application [WARN] lsp position out of bounds - Diagnostic { range: Range { start: Position { line: 172, character: 8 }, end: Position { line: 172, character: 22 } }, severity: Some(Hint), code: Some(String("E0308")), code_description: Some(CodeDescription { href: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("doc.rust-lang.org")), port: None, path: "/error-index.html", query: None, fragment: Some("E0308") } }), source: Some("rustc"), message: "expected due to the type of this binding", related_information: Some([DiagnosticRelatedInformation { location: Location { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/c:/Users/Gibus/dev/sati/src/app.rs", query: None, fragment: None }, range: Range { start: Position { line: 172, character: 25 }, end: Position { line: 172, character: 40 } } }, message: "original diagnostic" }]), tags: None, data: None }
2022-10-22T21:28:50.312 helix_term::application [WARN] lsp position out of bounds - Diagnostic { range: Range { start: Position { line: 172, character: 25 }, end: Position { line: 172, character: 25 } }, severity: Some(Hint), code: Some(String("E0308")), code_description: Some(CodeDescription { href: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("doc.rust-lang.org")), port: None, path: "/error-index.html", query: None, fragment: Some("E0308") } }), source: Some("rustc"), message: "try wrapping the expression in
commands::_::_serde::__private::Some
:commands::_::_serde::__private::Some(
,)
", related_information: Some([DiagnosticRelatedInformation { location: Location { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/c:/Users/Gibus/dev/sati/src/app.rs", query: None, fragment: None }, range: Range { start: Position { line: 172, character: 25 }, end: Position { line: 172, character: 40 } } }, message: "original diagnostic" }]), tags: None, data: None }2022-10-22T21:53:06.254 helix_view::document [WARN] LSP formatting failed: protocol error: ServerError(-32900): rustfmt exited with:
Status: exit code: 101
stdout:
stderr: error[E0748]: unterminated raw string
--> :39:13
|
39 | r#"
| ^ unterminated raw string
|
= note: this raw string should be terminated with
"#
Platform
Windows
Terminal Emulator
Windows Terminal
Helix Version
22.08.1 (66276ce)
Possibly related
#3967
The text was updated successfully, but these errors were encountered: