~sircmpwn/aerc2#515: 
Segfault when switching tabs

Sometimes aerc will crash when switching tabs with the following error:

$ aerc
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x44e1c27]

goroutine 1 [running]:
git.sr.ht/~sircmpwn/aerc/widgets.(*MessageList).Draw(0xc000154f60, 0xc0001760c0)
	git.sr.ht/~sircmpwn/aerc/widgets/msglist.go:108 +0x747
git.sr.ht/~sircmpwn/aerc/lib/ui.(*Grid).Draw(0xc000134210, 0xc0003adf20)
	git.sr.ht/~sircmpwn/aerc/lib/ui/grid.go:144 +0x277
git.sr.ht/~sircmpwn/aerc/widgets.(*AccountView).Draw(0xc000308e00, 0xc0003adf20)
	git.sr.ht/~sircmpwn/aerc/widgets/account.go:139 +0x39
git.sr.ht/~sircmpwn/aerc/lib/ui.(*TabContent).Draw(0xc000308d90, 0xc0003adf20)
	git.sr.ht/~sircmpwn/aerc/lib/ui/tab.go:394 +0x7c
git.sr.ht/~sircmpwn/aerc/lib/ui.(*Grid).Draw(0xc0001340b0, 0xc0004821b0)
	git.sr.ht/~sircmpwn/aerc/lib/ui/grid.go:144 +0x277
git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Draw(0xc000134160, 0xc0004821b0)
	git.sr.ht/~sircmpwn/aerc/widgets/aerc.go:176 +0x3d
git.sr.ht/~sircmpwn/aerc/lib/ui.(*UI).Tick(0xc000166000, 0x464fc00)
	git.sr.ht/~sircmpwn/aerc/lib/ui/ui.go:113 +0x1d1
main.main()
	git.sr.ht/~sircmpwn/aerc/aerc.go:194 +0x6b3

I think it happens when I :next-tab on the last tab after previously closing a tab, but I cannot consistently repro this crash.

-- Jakub

Status
REPORTED
Submitter
Jakub Zalewski
Assigned to
No-one
Submitted
4 months ago
Updated
4 months ago
Labels
No labels applied.