edit icon indicating copy to clipboard operation
edit copied to clipboard

Error processing file

Open justpav05 opened this issue 6 months ago • 5 comments

I encountered an error while working with a file: during editing, the program crashed while attempting to unwrap a value that was None

Image

When navigating focus elements, the editor panics with:

thread 'main' panicked at crates/edit/src/tui.rs:1537:59: called Option::unwrap() on a None value

The issue is in the focus traversal loop:

focused_start = focused_start.borrow().parent.unwrap();

If a node has no parent and ptr::eq(focused_start, focus_well) doesn't catch it first, unwrap() panics.

Suggested fix:

focused_start = match focused_start.borrow().parent.clone() {
    Some(p) => p,
    None => break,
};

justpav05 avatar May 15 '26 10:05 justpav05

Can you please provide more details on how to reproduce this.

nos1dot618 avatar Aug 26 '26 20:08 nos1dot618

Seriously? I keep running into this problem over and over again.

justpav05 avatar Aug 26 '26 21:08 justpav05

@JustPav05 friend, nobody on the team is running into this. We use edit every day. Some help understanding how to hit this issue would make it possible for us to fix it.

DHowett avatar Aug 26 '26 22:08 DHowett

Okay, I'll send you the information about when it occurs a bit later.

justpav05 avatar Aug 26 '26 22:08 justpav05

Thank you for fixing the error!

justpav05 avatar Sep 20 '26 02:09 justpav05