-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
thread 'main' panicked at 'byte index 90 is not a char boundary; it is inside 'ó' (bytes 89..91) of `(); #6501
Comments
Can you narrow down the reproduction steps? I can't reproduce this just editing around in a file with This looks like some interaction between the tree-sitter parser for svelte and getting characters out of the rope. |
The issue seems to be that the rope doesn't hand out raw byte references but |
Seems similar to a bug I've been having a lot with rust-analyzer:
|
This bug is easily reproducible on Windows machine and present in helix 23.03 (3cf0372). |
I am pretty sure that this has been fixed on master by #6921. I am not able to reproduce the LSP crashes on the later master (while they are reproducible on 23.3). However, I am not able to reproduce an actual panic/crash (on 23.3). I think if I tried hard enough I could. I already managed to make it send an invalid autcompletion range which can lead to similar crash if using more non-utf8 chars. The issue is that usually the server crashes before I manage to make it send something to crash the editor. However I can think of many ways that this issue could cause a panic. Therefore I am pretty sure it's the same issue and I am closing this. If a similar bug reoccurs on the latest master feel free to reopen/open a new issue. |
I am on master and can confirm this is not fixed.
This is also happening for me with svelte files, and the frequency is about once every hour or so. |
@pascalkuthe would you mind if we re-opened the issue or do you want me to create a new one ? |
Seems similar to #3283 |
Ah youre right, no need to open a new issue. |
I met this and it's quite reproducable in the context, then I delete something and save and restore and repeat and I couldn't reproduce it.. |
Summary
It seems that there's an issue editing (it seems with svelte files) with special characters, the error in question is:
Reproduction Steps
I tried this:
hx
ó
.I expected this to happen:
Instead, this happened:
Helix log
~/.cache/helix/helix.log
RUST_BACKTRACE=1 hx -vv
Platform
macOs
Terminal Emulator
warp v0.2023.03.21.08.02.stable_02
Helix Version
helix 23.03 (3cf0372)
The text was updated successfully, but these errors were encountered: