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

Jumping backward: 'called Option::unwrap() on a None value' #2107

Closed
CBenoit opened this issue Apr 14, 2022 · 4 comments · Fixed by #1397
Closed

Jumping backward: 'called Option::unwrap() on a None value' #2107

CBenoit opened this issue Apr 14, 2022 · 4 comments · Fixed by #1397
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug

Comments

@CBenoit
Copy link
Member

CBenoit commented Apr 14, 2022

Summary

I got a panic due to an Option which was None when it was expected to be Some while jumping backward.

Reproduction Steps

I'm not sure. I was navigating helix codebase and got this panic when I jumped backward a few times.

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', helix-term/src/commands.rs:3756:27
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Helix log

No response

Platform

Linux

Terminal Emulator

alacritty 0.11.0-dev

Helix Version

helix-term 22.05-dev (0eb8799)

@CBenoit CBenoit added C-bug Category: This is a bug A-helix-term Area: Helix term improvements labels Apr 14, 2022
@CptPotato
Copy link
Contributor

I think I got a similar crash when using the jumplist after closing a split/buffer. Was this the case for you as well, or did you just jump back?

@CBenoit
Copy link
Member Author

CBenoit commented Apr 15, 2022

I might have closed a buffer, but I don't remember exactly. Following the crash, I tried to reproduce by closing a buffer, but the jump list appeared to be invalidated and I couldn't jump anymore.

@EpocSquadron
Copy link
Contributor

I can also confirm I am encountering this from time to time, with some combination of opening and closing splits and buffers and using the jumplist. I've tried reproducing as well but haven't been able to nail it down either.

@archseer
Copy link
Member

This indicates to me that the jumplist might point to a document that doesn't exist anymore: https://github.com/helix-editor/helix/blob/0eb87996a8e8245d7aa2688fc7397ed5a174e311/helix-term/src/commands.rs#L3756=

There was a fix being worked on in #1397 (comment) but the PR is unfinished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants