Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id CB30E431FBC for ; Fri, 20 Nov 2009 05:20:49 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZPXbS1YgfrpS for ; Fri, 20 Nov 2009 05:20:47 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 7BA1E431FAE for ; Fri, 20 Nov 2009 05:20:47 -0800 (PST) Received: by bwz24 with SMTP id 24so2261612bwz.30 for ; Fri, 20 Nov 2009 05:20:46 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.155.92 with SMTP id r28mr1360381bkw.121.1258723245238; Fri, 20 Nov 2009 05:20:45 -0800 (PST) In-Reply-To: <935ead450911200510ie80d28dv1d82ccbd11803128@mail.gmail.com> References: <935ead450911181000w2cddfe95qe9efd5bea9f9209d@mail.gmail.com> <20091119164543.25e7afe5@hikari> <935ead450911191823s776fda6eyb6f6949ac982bd03@mail.gmail.com> <87lji11leu.fsf@yoom.home.cworth.org> <935ead450911200510ie80d28dv1d82ccbd11803128@mail.gmail.com> Date: Fri, 20 Nov 2009 14:20:45 +0100 Message-ID: From: Jan Janak To: Jeffrey Ollie Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Not Much Mail Subject: Re: [notmuch] Segfault searching for tags X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Nov 2009 13:20:50 -0000 On Fri, Nov 20, 2009 at 2:10 PM, Jeffrey Ollie wrote: > On Fri, Nov 20, 2009 at 5:32 AM, Carl Worth wrote: >> On Thu, 19 Nov 2009 16:45:43 +0100, Adrian Perez de Castro wrote: >>> The thing is that in notmuch_message_get_in_reply_to(), line 288, a NUL= L >>> instance of Xapian::TermIterator is dereferenced. In my particular case= , >>> the culpript is a cache file of Claws-Mail, as seen in the following GD= B >>> session: >> >> Not quite NULL, (nor is it quite dereferencing---this is nasty C++ >> overloading), but yeah, the idea is the same. We need to protect all of >> our "calls" to this overloaded operator to not call it when the iterator >> is equal to the value returned by termlist_end (). >> >> On Thu, 19 Nov 2009 20:23:15 -0600, Jeffrey Ollie wrot= e: >>> I straced some of the crashes, and the last file that was read before >>> the crash was a malformed message. =C2=A0I've attached one of the messa= ges. >> >> Thanks for the file. I never like to push code that I haven't tested, so >> this was very helpful. >> >> Below is the patch that I just pushed which seems to do the trick. > > Ah, excellent! =C2=A0This does indeed seem to prevent the crash. =C2=A0No= w I > just need to figure out how to get all my mail out of GMail. I did exactly that with offlineimap. It crashes from time to time, but then you can just restart it and continue. A few days ago I sent a patch which converts mail subdirectories to tags and because Gmail IMAP server converts labels to subdirectories, you can use that to convert gmail's labels to notmuch tags automatically. -- Jan