David Bremner writes on mars 7, 2016 13:01: > Gaute Hope writes: > >> as far as I can see, there is _no_ way to catch this error without >> completely crashing the application. I would have to isolate this code >> in a separate process or trap SIGABRT (which is certainly messy). > > I'm not sure what you expect libnotmuch to do here. There's a fatal > "should not happen" error in the memory allocator; it isn't really the > sort of thing one can recover from. It's also not in code we control. > > Of course _why_ this error is happening could still be notmuch's > fault. Can you reproduce the problem under valgrind? Hi again, For future reference: Attached is C++ test code that demonstrates the problem (at least on my setup). It is part of the astroid test suite. The test-code must be adapted to your _test_ notmuch db. To pick up on this again, this issue started cropping up more frequently again, and I can't see a way currently to anticipate or recover from this from a user application of the notmuch library. There seems to be an XapianError, which may or may not be handled by notmuch. Regards, Gaute