Re: segfault using python bindings

Subject: Re: segfault using python bindings

Date: Sun, 18 Nov 2018 19:34:22 -0400

To: Dirk Van Haerenborgh,


From: David Bremner

Dirk Van Haerenborgh <> writes:

> This is not a typo. I deliberately duplicated that bit.
> The second time it runs that loop, it will always segfault, unless you
> omit the first 'notmuch_message_destroy' call.
> Given your example, I suspect the Python3 bindings to do something very
> similar. I would think that this is the correct way to use the API?
> Kind regards,
> -Dirk

Unless I misremember / misunderstand something, calling
notmuch_message_destroy is not a good idea, unless you are going to
recreate the thread object. The thread has an internal list of messages,
which you are freeing.

Possibly the documentation could be improved on this point.

notmuch mailing list