1 Return-Path: <Sebastian@SSpaeth.de>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id E5DC04196F2
\r
6 for <notmuch@notmuchmail.org>; Fri, 23 Apr 2010 04:22:01 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5
\r
12 tests=[BAYES_00=-1.9] autolearn=ham
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id zEFl9yC7+ZsX for <notmuch@notmuchmail.org>;
\r
16 Fri, 23 Apr 2010 04:22:01 -0700 (PDT)
\r
17 Received: from homiemail-a20.g.dreamhost.com (caiajhbdcagg.dreamhost.com
\r
19 by olra.theworths.org (Postfix) with ESMTP id 2FB4D431FC1
\r
20 for <notmuch@notmuchmail.org>; Fri, 23 Apr 2010 04:22:01 -0700 (PDT)
\r
21 Received: from sspaeth.de (mtec-hg-docking-1-dhcp-204.ethz.ch
\r
22 [129.132.133.204]) (Authenticated sender: sebastian@sspaeth.de)
\r
23 by homiemail-a20.g.dreamhost.com (Postfix) with ESMTPA id 4B9427EC060
\r
24 for <notmuch@notmuchmail.org>; Fri, 23 Apr 2010 04:21:59 -0700 (PDT)
\r
25 Received: by sspaeth.de (sSMTP sendmail emulation);
\r
26 Fri, 23 Apr 2010 13:21:56 +0200
\r
27 From: "Sebastian Spaeth" <Sebastian@SSpaeth.de>
\r
28 To: Notmuch development list <notmuch@notmuchmail.org>
\r
29 Subject: Unhandled Xapian exception
\r
30 Date: Fri, 23 Apr 2010 13:21:56 +0200
\r
31 Message-ID: <87aasul8h7.fsf@SSpaeth.de>
\r
33 Content-Type: text/plain; charset=us-ascii
\r
34 X-BeenThere: notmuch@notmuchmail.org
\r
35 X-Mailman-Version: 2.1.13
\r
37 List-Id: "Use and development of the notmuch mail system."
\r
38 <notmuch.notmuchmail.org>
\r
39 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
40 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
41 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
42 List-Post: <mailto:notmuch@notmuchmail.org>
\r
43 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
44 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
45 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
46 X-List-Received-Date: Fri, 23 Apr 2010 11:22:02 -0000
\r
50 dme complained that my python bindings abort with
\r
51 Xapian::DatabaseModifiedException when doing a
\r
52 Database.find_message('id'). But libnotmuch.so terminates before python
\r
53 has even a chance to catch an execption, and I think it boils down to this:
\r
55 http://git.notmuchmail.org/git/notmuch/blob/ec6d78acf12d5c8fe6d10d091adee6516bf48d8a:/lib/database.cc#l276
\r
57 find_message() which calls:
\r
58 find_doc_ids_for_term() in lib/database.cc which contains:
\r
60 *begin = notmuch->xapian_db->postlist_begin (term);
\r
61 *end = notmuch->xapian_db->postlist_end (term);
\r
63 without doing any catching. According to Olly Betts this can possibly
\r
64 throw such an exception when the Database has been modified.
\r
66 I propose to try..catch this code block and rather than returning VOID
\r
67 it could return NOTMUCH_STATUS_SUCCESS or NOTMUCH_XAPIAN_EXCEPTION.
\r
68 Not sure how "notmuch_database_find_message" would notify the caller of
\r
69 such an exception situation though. The only possible failure value is
\r
70 NULL (which also means did not find such a message).
\r