~sircmpwn/aerc2#239: Crash when deleting many messages

panic: runtime error: index out of range

goroutine 39 [running]:
git.sr.ht/~sircmpwn/aerc/worker/imap.(*IMAPWorker).handleImapUpdate(0xc0001f3320, 0x9274c0, 0xc000955e98)
    /tmp/makepkg/aerc-git/src/aerc/worker/imap/worker.go:221 +0x743
git.sr.ht/~sircmpwn/aerc/worker/imap.(*IMAPWorker).Run(0xc0001f3320)
    /tmp/makepkg/aerc-git/src/aerc/worker/imap/worker.go:245 +0x10d
created by git.sr.ht/~sircmpwn/aerc/widgets.NewAccountView
    /tmp/makepkg/aerc-git/src/aerc/widgets/account.go:72 +0x483
Status
REPORTED
Submitter
~mkaito
Assigned to
No-one
Submitted
28 days ago
Updated
9 days ago
Labels
No labels applied.

~mkaito 28 days ago

panic: runtime error: index out of range

goroutine 39 [running]:
git.sr.ht/~sircmpwn/aerc/worker/imap.(*IMAPWorker).handleImapUpdate(0xc0001f3320, 0x9274c0, 0xc000955e98)
    /tmp/makepkg/aerc-git/src/aerc/worker/imap/worker.go:221 +0x743
git.sr.ht/~sircmpwn/aerc/worker/imap.(*IMAPWorker).Run(0xc0001f3320)
    /tmp/makepkg/aerc-git/src/aerc/worker/imap/worker.go:245 +0x10d
created by git.sr.ht/~sircmpwn/aerc/widgets.NewAccountView
    /tmp/makepkg/aerc-git/src/aerc/widgets/account.go:72 +0x483

~mkaito 28 days ago

Worth noting that this happens reliably on my GSuite account, but doesn't happen at all on my personal account, which is a self-hosted Dovecot on my own server.

~alexwennerberg 11 days ago

I'm encountering this issue as well, also only on Gmail/G Suite

~brettbuddin 9 days ago

I've looked into this a bit. It has to do with the IMAP client sending down EXPUNGE events with a sequence number outside the range of the recorded sequence of message UIDs in seqMap. One interesting observation is that the seqMap is full of zeros at the time this happens. It's only freshly allocated during directory listing operations.