<div class="markdown">
<p dir="auto">On 14 Apr 2014, at 22:30, Robert McClure wrote:</p>

<p dir="auto">Sorry about the late response. I can see you could have used it earlier on. You'll get a detailed answer instead.</p>

<blockquote>
<p dir="auto">MM crashed earlier (one of a couple of crashes when adding an addressee to the to list) and is now stuck in a loop where it identifies a message it can’t find (I think initially the draft I was working on, but  now I’m not sure) and the option of “do nothing” or do a rebuild (two flavors). I first tried the “from cache” rebuild because I wanted the draft, but that has led to a “find the error” dialog along with a “rebuild” dialog that no matter what, finishes the rebuild and then finds an error.</p>
</blockquote>

<p dir="auto">I recently (last week) experienced this myself (I did not have any or did not understand reports sent to me about this). For me, the problem was that during the rebuild, rules are still active. This is of course not desirable and it was actually a good thing that the result was a broken rebuild-process. Do you have any rules configured?</p>

<p dir="auto">I fixed the bug and then noticed that rebuilding has become extremely slow (not because of the rules). I have seen reports about this, but I had assumed users were just impatient :-) I fixed a performance issue which should make it quite a bit faster (although more improvements could be done).</p>

<p dir="auto">Here is a <a href="http://updates.mailmate-app.com/archives/MailMate_r4174.tbz">direct link</a> to the most recent test version.</p>

<blockquote>
<p dir="auto">Is there a way to get out of this? I have not allowed “download all messages” because I have ~40K messages that is apparently over 3G. I have multiple accounts but this seems to be all related to that one account and draft...</p>
</blockquote>

<p dir="auto">I am of course very interested in the steps needed to reproduce a bug that leads to database corruption.</p>

<p dir="auto">For the record, known database corruption triggers are:</p>

<ul>
<li>The database files were restored from a backup which was created at the same time as MailMate was writing a set of files. There is probably no way to fix that without a complete redesign.</li>
<li>Antivirus software puts a file (email) into quarantine (removing the file just after MailMate saved it). Some comments on that <a href="http://freron.lighthouseapp.com/projects/58672/tickets/666-crash-shortly-after-startup#ticket-666-27">here</a>.</li>
<li>I've had a few reports about hard crashes (as in pulling the plug of the computer) triggering database corruption. Technically (and embarrassingly), I'm not sure exactly what happens, but I assume it is related to low level behavior of the file system.</li>
</ul>

<p dir="auto">The above might sound like MailMate is far from robust, but note that MailMate crashes including <em>force</em> quitting MailMate should, at least in theory, never result in database corruption. Also not, that it is also important that MailMate detects database corruption when it does occur and offers the user a way to fix it which does not involve running along with a database in the “corrupt” state.</p>

<p dir="auto">Please report any issues not related to the items above. Database corruption should, preferably, never happen for most users.</p>

<p dir="auto">-- <br>
Benny</p>

</div>