Build a virtual folder based on an IMAP folder, and do get-new-mail in the IMAP folder. This ends up calling vm-build-virtual-message-list for the virtual folder, which calls vm-visit-folder on the IMAP folder. This tries to present a message, which involves vm-retrieve-real-message-body. Since the folder is still in an inconsistent state, this fails. (In particular, the uid field of the message vector is not defined yet.)
Another instance of the problem found today:
Build a virtual folder based on an IMAP folder, and do get-new-mail in the IMAP folder. This ends up calling vm-build- virtual- message- list for the virtual folder, which calls vm-visit-folder on the IMAP folder. This tries to present a message, which involves vm-retrieve- real-message- body. Since the folder is still in an inconsistent state, this fails. (In particular, the uid field of the message vector is not defined yet.)