notmuch configuration causes unexpected panic

I've been experimenting with notmuch, and at some point, I started getting this panic:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x58 pc=0x8c1b0c]

goroutine 1 [running]:
git.sr.ht/~sircmpwn/aerc/widgets.(*AccountView).UiConfig(0xc0001a7650, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /home/alex/dev/aerc/widgets/account.go:37 +0x12c
        /home/alex/dev/aerc/widgets/account.go:60 +0x3b
git.sr.ht/~sircmpwn/aerc/lib/ui.(*Grid).reflow.func1(0xc0000d65c0, 0xc0000d65d8, 0x92)
        /home/alex/dev/aerc/lib/ui/grid.go:196 +0x469
git.sr.ht/~sircmpwn/aerc/lib/ui.(*Grid).reflow(0xc0000d6580, 0xc00007c210)
        /home/alex/dev/aerc/lib/ui/grid.go:228 +0xd0
git.sr.ht/~sircmpwn/aerc/lib/ui.(*Grid).Draw(0xc0000d6580, 0xc00007c210)
        /home/alex/dev/aerc/lib/ui/grid.go:111 +0x319
git.sr.ht/~sircmpwn/aerc/widgets.(*AccountView).Draw(0xc0001a7650, 0xc00007c210)
        /home/alex/dev/aerc/widgets/account.go:135 +0x39
git.sr.ht/~sircmpwn/aerc/lib/ui.(*TabContent).Draw(0xc0001a75e0, 0xc00007c210)
        /home/alex/dev/aerc/lib/ui/tab.go:393 +0x5f
git.sr.ht/~sircmpwn/aerc/lib/ui.(*Grid).Draw(0xc0000d6420, 0xc00007c1b0)
        /home/alex/dev/aerc/lib/ui/grid.go:144 +0x255
git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Draw(0xc0000d64d0, 0xc00007c1b0)
        /home/alex/dev/aerc/widgets/aerc.go:172 +0x3d
git.sr.ht/~sircmpwn/aerc/lib/ui.(*UI).Tick(0xc0000720a0, 0xa4c000)
        /home/alex/dev/aerc/lib/ui/ui.go:113 +0xf6
        /home/alex/dev/aerc/aerc.go:194 +0x672

My querymap file is:

inbox=tag:inbox and not tag:archived

And my relevant configuration for the notmuch source is:

source   = notmuch://~/mail
query-map = /home/alex/.config/aerc/querymap
outgoing = smtps+plain:<redacted>
default  = INBOX
from     = alex wennerberg <alex@alexwennerberg.com>
copy-to  = Sent

Tried some dumb solutions: restart my machine, reinstall aerc. Unsure what led to this state -- it was working fine before and the only thing I changed that I'm aware of was modifying the querymap file, but I've restored the config to the state it was before and I'm still getting this panic. The error only occurs when the notmuch section is configured -- if I comment it out and leave the IMAP configuration for the same email address, there is no issue.

Assigned to
3 years ago
3 years ago

~labrat 3 years ago

you forgot to compile with notmuch support I think... it does not exactly fail gracefully at the moment

~alexwennerberg 3 years ago

~labrat Ah, thanks! I was playing around with the code and forgot to recompile with the flag on

~labrat REPORTED NOT_OUR_BUG 3 years ago

Register here or Log in to comment, or comment via email.