Hello Tim,
I get aerc crashing when trying to pipe the whole message to nvim. This
mostly happens to emails with multiple (mostly PDF) attachments, but not
all of them.
Here's the crash report:
======================================================================
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x11b pc=0x10435ed5c]
goroutine 407 [running]:
git.sr.ht/~rockorager/vaxis.(*Vaxis).CanReportBackgroundColor(...)
git.sr.ht/~rockorager/vaxis@v0.10.3/vaxis.go:1430
git.sr.ht/~rockorager/vaxis.(*Vaxis).QueryBackground(0x0?)
git.sr.ht/~rockorager/vaxis@v0.10.3/vaxis.go:1006 +0x1c
git.sr.ht/~rockorager/vaxis/widgets/term.(*Model).osc.func1()
git.sr.ht/~rockorager/vaxis@v0.10.3/widgets/term/osc.go:29 +0x28
created by git.sr.ht/~rockorager/vaxis/widgets/term.(*Model).osc in goroutine 405
git.sr.ht/~rockorager/vaxis@v0.10.3/widgets/term/osc.go:28 +0x1bc
======================================================================
Let me know if you need a sample email as it might take some time before
I can find one that I can share.
What I do is simply: `pipe nvim --clean -` and it crashes straight away.
If I do `pipe less` it hangs.
Latest aerc from the today's master, latest nvim, alacritty, tmux, mac
if it matters.
-- Vitaly
On Sat Aug 24, 2024 at 4:06 AM CDT, Vitaly Ovchinnikov wrote:
> Hello Tim,
>
> I get aerc crashing when trying to pipe the whole message to nvim. This
> mostly happens to emails with multiple (mostly PDF) attachments, but not
> all of them.
Hey Vitaly -
I was able to the reproduce this. The issue was that we accessed the `vx` field
in the terminal widget before it was set. This was a recent regression from the
addition of OSC 11 queries - which neovim does at startup. So, when piping a
message we open nvim but _haven't drawn the widget_ so the vx field is nil.
I just pushed a fix to vaxis which prevents the nil access and prevents the
crash.
Thanks!
--
Tim