python-bindings: coredump whil executing gnucash.Session

John Ralls jralls at
Mon Dec 15 14:50:47 EST 2014

> On Dec 15, 2014, at 8:09 AM, Marcus Wellnitz <marcus at> wrote:
> Hash: SHA1
> Hello John,
>>> Hello John,
>>> I've never used the git repoitory. It's all plain Ubuntu code plus
>>> micha's repository:
>>> deb trusty main
>>> I'll check if a self-build GnuCash will eleminate the error.
>> Ah, so you meant that Ubuntu upgraded something, maybe GnuCash, maybe
> not, and that's what broke your code.
> Yeah. You got the point.
>> Seems to me that there are two alternatives: You can see if GnuCash was in fact upgraded, and if it
> was roll it back and test again.
> There was no GnuCash Upgrade. Only GlibC and Python stuff.
>> Otherwise, get the debugging symbols for Python and GnuCash and run your python script under gdb
> like this:
>> $> gdb python
>> ...
>> (gdb) r path/to/your/script script args
>> When it crashes, run
>> (gdb) bt
>> Which will dump a stack trace at the time of the crash. Post that here.
>> Regards,
>> John Ralls
> The error occures insight the c-wrapper of gnucash-python and I wonder
> if it makes sense to install debugging symbols for python?

You can’t tell that until you debug with gdb. It might be returning an invalid pointer to python so that the python code is actually crashing, even though it’s GnuCash’s fault. You can roll the dice and try without the Python symbols first if you like.

But first try Geert’s patch — it’s to a python file, so you can directly patch your installed GnuCash, the file you want will be /usr/lib/pythonX.X/site-packages/gnucash/ with X.X being the python version. 

John Ralls

More information about the gnucash-devel mailing list