Re: [feature request] emacs: use `notmuch insert` for FCC
[notmuch-archives.git] / 2d / 54c94cdb74a996d820dda23c97fcb0422f1e89
1 Return-Path: <konrad.hinsen@fastmail.net>\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 arlo.cworth.org (Postfix) with ESMTP id 0BED16DE176B\r
6  for <notmuch@notmuchmail.org>; Tue, 12 Jan 2016 01:49:21 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.719\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.719 tagged_above=-999 required=5 tests=[AWL=0.101,\r
12   DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001,\r
13  RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01,\r
14  SPF_PASS=-0.001] autolearn=disabled\r
15 Received: from arlo.cworth.org ([127.0.0.1])\r
16  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
17  with ESMTP id 0EaMhNYaMws5 for <notmuch@notmuchmail.org>;\r
18  Tue, 12 Jan 2016 01:49:19 -0800 (PST)\r
19 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com\r
20  [66.111.4.28])\r
21  by arlo.cworth.org (Postfix) with ESMTPS id 28ABD6DE176A\r
22  for <notmuch@notmuchmail.org>; Tue, 12 Jan 2016 01:49:19 -0800 (PST)\r
23 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45])\r
24  by mailout.nyi.internal (Postfix) with ESMTP id 5F6AD210CA\r
25  for <notmuch@notmuchmail.org>; Tue, 12 Jan 2016 04:41:59 -0500 (EST)\r
26 Received: from frontend1 ([10.202.2.160])\r
27  by compute5.internal (MEProxy); Tue, 12 Jan 2016 04:41:59 -0500\r
28 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.net; h=\r
29  content-transfer-encoding:content-type:date:from:message-id\r
30  :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=V3h\r
31  f7Y+u8G5oRresdGvKzsjfQ58=; b=nJlGlJt7dAEiqxh4EZsOPG5emn2BIuDNV8j\r
32  tF6k4YlBmVM1hVbbcx4YD1ASPzUbwZMrc7MSTzYdhSkxMJDyPkzZnAX32/QZ/gwL\r
33  4cGsx8zJYahEWA5M5mdZoUDjjaGPELsFozWXPDqsTGJtf9pYiqlkGxmp3GJ0xVJw\r
34  e334Ctus=\r
35 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=\r
36  messagingengine.com; h=content-transfer-encoding:content-type\r
37  :date:from:message-id:mime-version:subject:to:x-sasl-enc\r
38  :x-sasl-enc; s=smtpout; bh=V3hf7Y+u8G5oRresdGvKzsjfQ58=; b=c2xnM\r
39  4IdrMQdUHWRgR5Ed5nL2BN15q9eZU689OHR0ExDAdGg5oHbFxSF8TmNAHgCr2Iyr\r
40  R/ou1KXVkc/bjBCic4vlMQDaKwZjiFdP/gx6bu3x6zuRedpOipnsBtS4KpKjmssz\r
41  B4pjnSRIUbh+YsZgHtY196k9vThJqwxo3rkXTA=\r
42 X-Sasl-enc: EOS2e5eDzVUSrl0VMs0Q2VOn0n0oAwHI/QBfu8fg5psJ 1452591719\r
43 Received: from Ordinateur-de-Catherine--Konrad.local\r
44  (mic92-2-82-67-216-6.fbx.proxad.net [82.67.216.6])\r
45  by mail.messagingengine.com (Postfix) with ESMTPA id C6F2BC013FE;\r
46  Tue, 12 Jan 2016 04:41:58 -0500 (EST)\r
47 To: notmuch@notmuchmail.org\r
48 From: Konrad Hinsen <konrad.hinsen@fastmail.net>\r
49 Subject: Crash with Python bindings\r
50 Message-ID: <5694CA65.8010400@fastmail.net>\r
51 Date: Tue, 12 Jan 2016 10:41:57 +0100\r
52 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0)\r
53  Gecko/20100101 Thunderbird/38.5.1\r
54 MIME-Version: 1.0\r
55 Content-Type: text/plain; charset=utf-8; format=flowed\r
56 Content-Transfer-Encoding: 7bit\r
57 X-BeenThere: notmuch@notmuchmail.org\r
58 X-Mailman-Version: 2.1.20\r
59 Precedence: list\r
60 List-Id: "Use and development of the notmuch mail system."\r
61  <notmuch.notmuchmail.org>\r
62 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
63  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
65 List-Post: <mailto:notmuch@notmuchmail.org>\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
67 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
68  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
69 X-List-Received-Date: Tue, 12 Jan 2016 09:49:21 -0000\r
70 \r
71 Hi everyone,\r
72 \r
73 I have been writing quite a few Python scripts for notmuch before \r
74 running into a strange bug. Here is a minimal script producing it:\r
75 \r
76 --------------------------------------------------\r
77 from notmuch import Query, Database\r
78 \r
79 def foo(bar):\r
80      pass\r
81 \r
82 db = Database()\r
83 q = Query(db, "*")\r
84 db.close()\r
85 --------------------------------------------------\r
86 \r
87 Running this script (Python 3.5, MacOS X) yields:\r
88 \r
89 [1]    22478 abort      pydev3 Temp/notmuch_test.py\r
90 \r
91 The crash actually happens *after* db.close(), when the Python \r
92 interpreter exists, and therefore I suspect that no data is lost, but I \r
93 hesitate to use scripts with that behavior in production use.\r
94 \r
95 The strange part is that what causes the crash is the presence of the \r
96 function foo(), even though it is never called. Remove foo and the \r
97 script runs fine. It is also necessary to create a Query object. The \r
98 combination of a function definition (any) and the creation of a Query \r
99 object yields the crash. This looks like a memory management issue, but \r
100 I didn't explore it any further.\r
101 \r
102 Cheers,\r
103    Konrad.\r