~sircmpwn/aerc2#501: 
panic after message delete + imap-update (index out of range)

hi,

I am using aerc at 548faca, and compiled with -race. I sometimes get:

2021/03/10 17:54:52 Found 267 UIDs
2021/03/10 17:54:52 ->(ui) *types.DirectoryContents:*types.FetchDirectoryContents
2021/03/10 17:54:52 ->(ui) *types.Done:*types.FetchDirectoryContents
2021/03/10 17:54:52 (ui)<= *types.DirectoryContents(787):*types.FetchDirectoryContents(786)
2021/03/10 17:54:52 (ui)<= *types.Done(788):*types.FetchDirectoryContents(786)
956gLw NOOP
956gLw OK NOOP completed
jUO8cg NOOP
jUO8cg OK NOOP completed
yomvaA NOOP
yomvaA OK NOOP completed
vHtGHQ NOOP
vHtGHQ OK NOOP completed
_uCTHQ NOOP
_uCTHQ OK NOOP completed
kdYcrQ NOOP
kdYcrQ OK NOOP completed
ye0vkg NOOP
ye0vkg OK NOOP completed
Nd2HXQ NOOP
Nd2HXQ OK NOOP completed
BnGgnw NOOP
BnGgnw OK NOOP completed
DONE
rz5UAw OK IDLE completed.
egmDrA IDLE
+ IDLE accepted, awaiting DONE command.
h4ysrg NOOP
h4ysrg OK NOOP completed
sDxZQg NOOP
sDxZQg OK NOOP completed
Pt3Qxg NOOP
Pt3Qxg OK NOOP completed
aJXZjQ NOOP
aJXZjQ OK NOOP completed
* 268 EXISTS
* 263 EXPUNGE
* 267 EXPUNGE
* 261 EXPUNGE
* 259 EXPUNGE
* 259 FETCH (FLAGS (\Seen x-golang))
2021/03/10 18:08:22 (= *client.MailboxUpdate
2021/03/10 18:08:22 ->(ui) *types.DirectoryInfo
* 259 EXPUNGE
* 259 EXPUNGE
2021/03/10 18:08:22 (= *client.ExpungeUpdate
2021/03/10 18:08:22 ->(ui) *types.MessagesDeleted
2021/03/10 18:08:22 (= *client.ExpungeUpdate
2021/03/10 18:08:22 (ui)<= *types.DirectoryInfo(789)
2021/03/10 18:08:22 (ui)=> *types.FetchDirectoryContents
2021/03/10 18:08:22 (ui)<= *types.MessagesDeleted(790)
panic: runtime error: index out of range [266] with length 266

goroutine 11 [running]:
git.sr.ht/~sircmpwn/aerc/worker/imap.(*IMAPWorker).handleImapUpdate(0xc0001eea00, 0xe366e0, 0xc0003805a8)
        git.sr.ht/~sircmpwn/aerc/worker/imap/worker.go:238 +0x103d
git.sr.ht/~sircmpwn/aerc/worker/imap.(*IMAPWorker).Run(0xc0001eea00)
        git.sr.ht/~sircmpwn/aerc/worker/imap/worker.go:262 +0x505
created by git.sr.ht/~sircmpwn/aerc/widgets.NewAccountView
        git.sr.ht/~sircmpwn/aerc/widgets/account.go:85 +0xd07
Status
REPORTED
Submitter
~sbinet
Assigned to
No-one
Submitted
a month ago
Updated
a month ago
Labels
No labels applied.