Sambigeara/fuzzynote

crash when parsing URL

taviso opened this issue · 5 comments

If you hit Ctrl-C with no URL, fzn crashes in term.(*Terminal).HandleEvent.

Reproduce:

  1. fzn --root /tmp
  2. Hit Ctrl-C
panic: runtime error: invalid memory address or nil pointer dereference

Sorry, been a bit quiet on this project the last few months, but back to it now 👍

Will address this once another pretty hefty change is merged - thanks for raising.

Hmm, I did just try and recreate and was unable to, though.

I know this was a while ago now (sorry again 🙈), but do you remember if this was consistently occurring? Fresh fzn instances or indeed my own instance aren't raising the same behaviour. Also - other potential factors, what version of fzn and what OS are/were you running on?

Yes, works every time here on Ubuntu focal.

The bug is that t.c.CurItem could be nil here:

https://github.com/Sambigeara/fuzzynote/blob/main/pkg/term/client.go#L383

Ah, gotcha - I'd been trying to reproduce on items with no URL rather than the top search line. Thanks.

Fixed in v0.24.1