jmacdonald / amp

A complete text editor for your terminal.
https://amp.rs
Other
3.68k stars 105 forks source link

Address boundary error while editing a file #138

Open micouy opened 5 years ago

micouy commented 5 years ago

I don't really know whether that's a bug in Amp but I think it's better if I report it anyways. I was casually editing a file (it was an already existing file if that's important) and then I got this message:

fish: 'amp filename.rs' terminated by signal SIGSEGV (Address boundary error)

The error occured right after I woke my laptop from sleep and pressed a few keys in Amp.

Info:

jmacdonald commented 5 years ago

Hi @micouy! Nice find. The only place we do anything unsafe in Amp that would trigger a segfault like that is in the gap buffer implementation, in the scribe crate.

It shouldn't matter if the file exists or not, but I wish I knew which keys you'd pressed. Was the file empty? Also, was it a UTF-8 file, or another encoding?