(In reply to Ben Campbell from comment #46)
(In reply to ISHIKAWA, Chiaki from comment #43)
... omission ...
There are a few listeners involved in message copying, but they seem to be used rather inconsistently. Some paths don't seem to invoke all the callbacks you'd expect, and there are lots of corner cases where stuff gets initialised in multiple different places, depending on the exact details of the messages being copied...
Message copying has just evolved over time into a brittle lump of concerns, made worse by the way message streaming, mbox handling and nsIMsDBHdr population is all tangled up together (not to mention move/copy/move-to-trash complications and undo support).
It needs some real effort to refactor and simplify all these moving parts, and that's more or less what my focus is at the moment, starting with mbox (with the side effect outcome of getting maildir support solid!).
But it's really hard not to break stuff along the way - in fact this whole bug was a result of a relatively modest refactoring attempt by me! So it's obvious I need to be waaay more careful as I continue.
All of which is to say: yes, I totally agree with you that the error reporting needs to be much more robust! It will be, but for this fix, I'm content if it fixes the problem and doesn't break anything else :-)
I will keep my fingers crossed. :-)
BTW, I am trying to update my local patch set to enable buffered-write in TB (bug Bug 1242030)
Copying many messages from a folder to the other takes too long IMHO.
Also, along the way, I noticed so many ignored cases of error values from low-level I/O routines, which I needed to fix. pop3 error handling scheme may not work due to the programming errors I noticed there.
Right now, basically, I am trying to accommodate the download to temporary file patch and others which I could not accommodate due to other patches until several weeks ago.
I have put in many sanity checks in my local patch. So if I notice anything strange from my local log, I will report it to bugzilla. But I am afraid it would take me a few more weeks to that stage. I am trying classify bugs in to serious and not-so-serious categories right now and comparing other people's jobs on try-comm-central to figure out which ones are caused by my local patches for now.
Logs from mochitest and xpcshell test of DEBUG version of TB contain so many noises, I am trying to cut down the noise, too.