Please help crash: null byte in argument for long()

chris coleman christocoleman at yahoo.com
Thu Apr 7 19:43:16 BST 2011


Thanks Nicolas Sebastian and Grigory.  You thougths were the same as mine.  I 
replaced the corrupted line with 61414:213742 and now offlineimap runs and syncs 
that mailbox without crashing.

Sebastian: "This database also looks like a good candidate for 
sqlite'ification."

I second !  Sqlite should store the local/remote UID map table and protect the 
data in it better than a plain flat file, especially if sqlite stores error 
correction code (ECC) with each value...






________________________________
From: Sebastian Spaeth <Sebastian at SSpaeth.de>
To: chris coleman <christocoleman at yahoo.com>; offlineimap mailing list 
<offlineimap-project at lists.alioth.debian.org>
Cc: Nicolas Sebrecht <nicolas.s-dev at laposte.net>
Sent: Thu, April 7, 2011 3:26:20 AM
Subject: Re: Please help crash: null byte in argument for long()

On Wed, 6 Apr 2011 18:15:55 -0700 (PDT), chris coleman 
<christocoleman at yahoo.com> wrote:
> Sebastian, 
> 
> You are right!!
> That file ~/.offlineimap/Repository-LocalFoo/UIDMapping/INBOX contains corrupt 

> data :
> 
> 61410:213738
> 61412:213740
> 61413:213741
> 61414     P      
> 61416:213744
> 61417:213745

If I see it right, the mapping is localUID:remoteUID, so you will have
to find out the corresponding remote UID. Looking at the pattern of
UIDs, I would take a bet that your missing UID is: 213742

The only way to *really* find out is to fetch the UID from the local and
the remote imap server using raw IMAP commands.

Or to make a backup from the remote IMAP server
to a local Maildir repository and check the UID in the filenames in that
Maildir.
(and same with the local IMAP dir and search for the mail with UID=61414

But as I said, using 213742 looks like a pretty safe guess in your case.

Sebastian

This database also looks like a good candidate for sqlite'ification.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20110407/11283cfd/attachment-0001.html>


More information about the OfflineIMAP-project mailing list