~sircmpwn/aerc2#205: 
Crash when arrow key pressed if account has invalid source

In my accounts.conf, I have:

[Account Name]
source = invalid

Then when start aerc and can see this error in the bottom bar: Account Name: Unknown backend

If I type :quit it exits nicely, but if I press up or down I get this error:

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

goroutine 1 [running]:
git.sr.ht/~sircmpwn/aerc/widgets.(*MessageList).Store(...)
        /home/lattis/aerc/widgets/msglist.go:170
git.sr.ht/~sircmpwn/aerc/widgets.(*AccountView).Store(...)
        /home/lattis/aerc/widgets/account.go:165
git.sr.ht/~sircmpwn/aerc/commands/account.NextPrevMessage(0x8d34940, 0x8c10060, 0x1, 0x1, 0x8ca26d4, 0x1)
        /home/lattis/aerc/commands/account/next.go:57 +0x17f
git.sr.ht/~sircmpwn/aerc/commands.(*Commands).ExecuteCommand(0x8c746a0, 0x8d34940, 0x8de45f0, 0x4, 0x3, 0x4)
        /home/lattis/aerc/commands/commands.go:47 +0xfc
main.main.func1(0x8de45f0, 0x4, 0x74, 0x7)
        /home/lattis/aerc/aerc.go:102 +0xa1
git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).BeginExCommand.func1(0x8de45f0, 0x4)
        /home/lattis/aerc/widgets/aerc.go:282 +0x44
git.sr.ht/~sircmpwn/aerc/widgets.(*ExLine).Event(0x8c581e0, 0x846f180, 0x8c58280, 0x8c58280)
        /home/lattis/aerc/widgets/exline.go:47 +0xf8
git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Event(0x8d34940, 0x846f180, 0x8c58280, 0x8c58280)
        /home/lattis/aerc/widgets/aerc.go:141 +0x362
git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).simulate(0x8d34940, 0x8c65840, 0x6, 0x8)
        /home/lattis/aerc/widgets/aerc.go:134 +0x97
git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Event(0x8d34940, 0x846f180, 0x8d38720, 0x8d38500)
        /home/lattis/aerc/widgets/aerc.go:156 +0x2bc
git.sr.ht/~sircmpwn/aerc/lib/ui.(*UI).Tick(0x8d92030, 0x838da00)
        /home/lattis/aerc/lib/ui/ui.go:86 +0x99
main.main()
        /home/lattis/aerc/aerc.go:131 +0x333

This is probably low-priority since its cause is a bad config file, but I thought I'd make it known.

Status
REPORTED
Submitter
~lattis
Assigned to
No-one
Submitted
1 year, 4 months ago
Updated
1 year, 4 months ago
Labels
bug