-
-
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
24.03: byte_slice(): Byte range out of bounds #10497
Comments
I know where in the code the crash occurs but I can't find anything wrong with it so we need more Information:
|
|
Does your document contain carrige return (CR) linenedings (just I think that's the most likely explanation for this and in that case I know how to fix this. |
Hmm nevemind I guess I don't see crashes with CR in testing. I thought tree sitter counted those as newlines but we didn't. Not sure what exactly this is causing that it's pretty weird and I can't reproduce. |
I checked file and are all I have set the env Can you increase the log verbosity? Maybe to see all commands/keybinds? |
|
@krukas are you running any patches? I get this issue all the time because of some underlying bug that's exposed undo/redo and a patch I have that keeps the editor in insert mode always, but I've not bothered to rebase my fork & debug. Also note that a fix for similar issue (#6645) was merged just after the 24.3 release. Maybe try that out? |
The panic message will not tell you anyrhing. If anyrhing goes wrong in the editor it usually ends up in a panic like that. I know what code is causing it and there is very little that can go wrong there (nothing related to undo or the rendering system). Tree sitter ir producing an invalid point offset/we are reading it. I will probably just fix this by removing the use of tree sitter points entirely and just always use byte positions instead |
I'm running 24.03 from Opensuse tumbleweed repo, don't know if some patches are applied to that. |
Oops, I misread the panic message... 🤦 that other issue is not similar, never mind. |
had another crash after I selected text with mouse and used space+y, could not reproduce and this time it was a small The file in question:
|
I had the same on a larger file just now (from work, so unfortunately can't share); don't have a full backtrace at hand but will run with
It's notable to me that the file is indeed 9763 characters long at time of crash, and that the OOB index is slightly (400 chars) more than 2x that. File was TypeScript, with LSP on, and Helix is 24.03 from NixOS unstable (uses source directly from GitHub release with no patches applied). |
That is almost certainly #10689 instead |
Had the same error as @kivikakk happen just now, after switching from fullscreen view to window view (swaywm), in normal mode with a vertical split buffer of the same file:
The actual file size of the saved file is 25398 bytes (might have been 25431 when crashing due to some small unsaved changes) and contains cpp language (no lsp active) with Luckily I was only doing small edits with saving in between, so nothing was lost. I remember two other sessions where I think the same thing happened (weeks apart), but I didn't save the output so I don't know if it really was the same issue. |
I'm experiencing the same issue while editing a JS/Python repository in
I'm not 100% sure but it seems that this is happening when I switch to normal more. In my case its happening every 5-10m so if you need help reproducing/debugging it I'm available 😅 With
|
@ixxie may I as if you are able to provide the reproduction file (+ steps) or isn't it also possible to share the code? |
Unfortunately the issue has been unpredictable and I have no systematic way of reproducing it. And actually, in recent weeks I have not experienced the issue at all. |
@ixxie have you updated |
I'm on NixOS so I have a flake following nixpkgs unstable. I think I've rebuilt Helix at least a couple of times since the crashing occurred, and there is a good chance the issue was resolved to some upstream package update as well. Sorry I can't help you narrow it down! |
Summary
Just starting to use Helix and love it 👏
Today i had two crashes, hard to pinpoint what was happening or reproduce. both time did an undo and then go into insert mode.
Reproduction Steps
No response
Helix log
~/.cache/helix/helix.log
Platform
Linux
Terminal Emulator
Alacritty with zellij
Installation Method
zypper (OpenSuse tumbleweed)
Helix Version
helix 24.3 (2cadec0)
The text was updated successfully, but these errors were encountered: