unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Crash with Python bindings
@ 2016-01-12  9:41 Konrad Hinsen
  2016-01-12 13:11 ` David Bremner
                   ` (2 more replies)
  0 siblings, 3 replies; 38+ messages in thread
From: Konrad Hinsen @ 2016-01-12  9:41 UTC (permalink / raw)
  To: notmuch

Hi everyone,

I have been writing quite a few Python scripts for notmuch before 
running into a strange bug. Here is a minimal script producing it:

--------------------------------------------------
from notmuch import Query, Database

def foo(bar):
     pass

db = Database()
q = Query(db, "*")
db.close()
--------------------------------------------------

Running this script (Python 3.5, MacOS X) yields:

[1]    22478 abort      pydev3 Temp/notmuch_test.py

The crash actually happens *after* db.close(), when the Python 
interpreter exists, and therefore I suspect that no data is lost, but I 
hesitate to use scripts with that behavior in production use.

The strange part is that what causes the crash is the presence of the 
function foo(), even though it is never called. Remove foo and the 
script runs fine. It is also necessary to create a Query object. The 
combination of a function definition (any) and the creation of a Query 
object yields the crash. This looks like a memory management issue, but 
I didn't explore it any further.

Cheers,
   Konrad.

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2018-04-05  1:09 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-12  9:41 Crash with Python bindings Konrad Hinsen
2016-01-12 13:11 ` David Bremner
2016-01-12 14:21   ` Konrad Hinsen
2016-01-12 15:26     ` David Bremner
2016-01-12 19:03       ` David Bremner
2016-01-12 19:13         ` Binding access to ~/.notmuch-config (was: Crash with Python bindings) W. Trevor King
2016-01-13 11:25           ` Binding access to ~/.notmuch-config Konrad Hinsen
2016-01-13 12:25             ` David Bremner
2016-01-13 17:23               ` W. Trevor King
     [not found] ` <20160112102329.4269.20741@thinkbox.jade-hamburg.de>
2016-01-12 14:23   ` Crash with Python bindings Konrad Hinsen
2016-01-12 18:51     ` W. Trevor King
2018-03-16 11:59       ` David Bremner
2018-03-16 12:12         ` Justus Winter
2018-03-16 18:30         ` Floris Bruynooghe
2018-03-16 22:40           ` Daniel Kahn Gillmor
2018-03-18  8:01             ` Floris Bruynooghe
2018-03-21 10:16           ` New Python bindings (was: Crash with Python bindings) Justus Winter
2018-03-25 17:40             ` pytest integration for the notmuch test suite David Bremner
2018-03-25 17:40               ` [PATCH 1/3] configure: check for pytest binary David Bremner
2018-03-26 20:55                 ` Floris Bruynooghe
2018-03-25 17:40               ` [PATCH 2/3] test: add new test_expect_pytest_success David Bremner
2018-03-25 17:40               ` [PATCH 3/3] test: add example test using pytest David Bremner
2018-03-25 19:14               ` pytest integration for the notmuch test suite Tomi Ollila
2018-03-26 11:31                 ` David Bremner
2018-03-26 21:01               ` Floris Bruynooghe
2018-03-26 21:25                 ` David Bremner
2018-03-26 20:47             ` New Python bindings (was: Crash with Python bindings) Floris Bruynooghe
2018-03-27 22:29               ` New Python bindings Justus Winter
2018-03-28 22:07                 ` Floris Bruynooghe
2018-03-28  7:20             ` New Python bindings (was: Crash with Python bindings) Brian May
2018-03-28 13:42               ` David Bremner
2018-03-28 22:15                 ` Floris Bruynooghe
2018-03-28 22:37                 ` Brian May
2018-03-28 23:13                   ` David Bremner
2018-04-04 22:37                     ` Brian May
2018-04-05  1:09                       ` Pypi David Bremner
2018-03-28 22:10               ` New Python bindings (was: Crash with Python bindings) Floris Bruynooghe
2016-01-12 18:08 ` Crash with Python bindings W. Trevor King

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).