~sircmpwn/aerc2#519: 
Nil Pointer dereference when archiving mail

When running archive month on multiple thousand mail entries (using VG to jump straight to the end of the list) I get:

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

goroutine 1 [running]:
git.sr.ht/~sircmpwn/aerc/commands/msg.Archive.Execute.func1(0x0, 0xc0007d57f0, 0x563d082a74c9)
	git.sr.ht/~sircmpwn/aerc/commands/msg/archive.go:63 +0x39
git.sr.ht/~sircmpwn/aerc/commands/msg.groupBy(0xc00013a000, 0xbdc, 0xbdc, 0xc0007d5918, 0x0)
	git.sr.ht/~sircmpwn/aerc/commands/msg/archive.go:109 +0x8d
git.sr.ht/~sircmpwn/aerc/commands/msg.Archive.Execute(0xc0000c6580, 0xc00050ca60, 0x2, 0x2, 0x1, 0xc0001aee90)
	git.sr.ht/~sircmpwn/aerc/commands/msg/archive.go:61 +0x69b
git.sr.ht/~sircmpwn/aerc/commands.(*Commands).ExecuteCommand(0xc0000101e8, 0xc0000c6580, 0xc00050ca60, 0x2, 0x2, 0x563d086d8348, 0xc0002667e0)
	git.sr.ht/~sircmpwn/aerc/commands/commands.go:66 +0xaa
main.execCommand(0xc0000c6580, 0xc000252870, 0xc00050ca60, 0x2, 0x2, 0x563d086d6988, 0xc000815a40)
	git.sr.ht/~sircmpwn/aerc/aerc.go:60 +0x150
main.main.func2(0xc00050ca60, 0x2, 0x2, 0x2, 0x2)
	git.sr.ht/~sircmpwn/aerc/aerc.go:157 +0x59
git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).BeginExCommand.func1(0xc00046c720, 0xd)
	git.sr.ht/~sircmpwn/aerc/widgets/aerc.go:433 +0x88
git.sr.ht/~sircmpwn/aerc/widgets.(*ExLine).Event(0xc000252500, 0x563d086d7248, 0xc000392000, 0xc0002649c0)
	git.sr.ht/~sircmpwn/aerc/widgets/exline.go:81 +0x138
git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Event(0xc0000c6580, 0x563d086d7248, 0xc000392000, 0x7f7ecc37ff00)
	git.sr.ht/~sircmpwn/aerc/widgets/aerc.go:224 +0x4c3
git.sr.ht/~sircmpwn/aerc/lib/ui.(*UI).Tick(0xc000252870, 0xc00011a200)
	git.sr.ht/~sircmpwn/aerc/lib/ui/ui.go:98 +0x182
main.main()
	git.sr.ht/~sircmpwn/aerc/aerc.go:194 +0x6b3

My guess would be that this is caused by intermediary emails not being fetched ahead of time.

Status
REPORTED
Submitter
~poldi1405
Assigned to
No-one
Submitted
3 months ago
Updated
3 months ago
Labels
No labels applied.