January 19th, 2006 • 2:34 pm
This is very bad.
Over the past few months, I have lost a few vital messages, which somehow have disappeared completely from my system.
Today, it happened again, right in front of my eyes. I had selected a message in my Inbox and dragged it to a mailbox to archive it, and dropped it on the wrong mailbox, and clicked on things in a certain way and undone the move at the same time, and boom—the message was gone. It was no longer in my Inbox. It was not in the wrong mailbox where I had dropped it. And it was not in the right destination either.
I tried to do a search in all mailboxes for the message. It was nowhere to be found. I tried with the system-wide Spotlight search. No results. The message should have been easy to find, because it was the first one I had received from a store where I had never bought anything before. So it was the first one with that store’s e-mail address for order confirmations.
But the message had disappeared from my system altogether. It was not in the Trash. It was not in the Junk mailbox. I tried rebuilding the mailboxes involved, in case the message was somehow still there but not shown in the message list. But nothing was able to bring it back. It was gone.
Since it had just happened and I more or less remember the exact steps I had followed, I tried to reproduce it. It took me a little while, but I finally found it. Here’s the 100%-reproducible sequence that can cause your message to compeletely disappear from Mail, with no chance of recovery.
In order to reproduce this, you need to have at least two mailbox folders in your mailbox drawer (not smart mailboxes, real static mailboxes where you can drag and drop messages to archive them). Then all you need to do is the following. (Don’t try this with an important message. It will be gone!) Say the two mailboxes in your mailbox drawer are Mailbox A and Mailbox B.
- Select your Inbox in the mailbox drawer.
- Select a message in the message list.
- Take the message and drag it to Mailbox A. Do not release the mouse button yet. Just hold your mouse button down with the message ready to be dropped onto the Mailbox A icon in the mailbox drawer.
- Now comes the tricky part: As soon as you release your mouse button, you will need to click once on Mailbox B in the mailbox drawer. It is absolutely crucial that do these two things in very rapid succession. If you drop the message on Mailbox A and wait before your click on Mailbox B, nothing bad will happen. You absolutely need to click on Mailbox B while Mail is still in the process of moving the message to Mailbox A, which takes only a fraction of a second. So you need to be fast.
- Once you’ve clicked on Mailbox B, press command-Z or select the “ ” command in the “ ” menu. If you didn’t do step 4 quickly enough, this won’t work. The “ ” command will be greyed out and unavailable, because Mail forgets the last move command you effected as soon as you click on another mailbox in the mailbox drawer. But if you clicked on Mailbox B fast enough in step 4, while Mail was still in the process of moving the message to Mailbox A, then the “ ” command will be available, and Mail will let you undo the last action, i.e. the action that moved your message from the Inbox to Mailbox A.
- Now, click on your Inbox, and look for your message in the list. It should be back there, shouldn’t it? You’ve just undone the move. But the message is not there. Click on Mailbox A. It’s not there either. It’s gone! It has disappeared altogether! (It’s not in Mailbox B either, of course.)
After this happened to me again earlier today, I sent myself a bunch of test messages, and I tried to reproduce the problem. With the steps above, as long as step 4 is done fast enough, with no delay between the time you release the mouse button to drop the message on Mailbox A and the time you click on Mailbox B, you should be able to reproduce this on your machine too. This is happening to me with Mail 2.0.5 on a Power Mac G5 Quad, which is pretty much the fastest Mac you can get right now. So if it can happen on my machine, it can happen on yours!
And it happens to me not just when I try to reproduce the problem deliberately. It happens to me when I drop and click accidentally on the wrong mailbox, and then press command-Z! Because of this bug, I have lost several important messages, that have completely disappeared!
I should note, however, that I am only able to reproduce the problem with some of my accounts. Depending on which of my accounts the message in question was sent to, undoing the move does sometimes put the message back in the Inbox. It works as expected with some accounts, but not other accounts. I can reliably reproduce the problem with my .Mac account used as a POP account, for example.
It is really quite unacceptable. There is no excuse for it. It’s quite obvious that it’s a problem related to Mail’s multithreading capabilities. Mail can move a message in one thread and let you select another mailbox in another thread at the same time. But this screws up its “” sequence completely, and Mail clearly forgets where to put the message back when you undo the action! So it just lets the message vanish altogether!
Data integrity is always paramount. We can live with bugs that make simple actions more complex than they should be, or force us to go through workarounds to achieve what we want to achieve. But bugs that destroy our data with no chance of recovery are simply bad. They are the worst kind.
If you are a Mail user, consider yourself warned!