[GNC] Crash when saving mysql to xml

John Ralls jralls at ceridwen.us
Wed Aug 29 21:11:34 EDT 2018



> On Aug 28, 2018, at 3:04 PM, Uli Hansen <info at familie-hansen.name> wrote:
> 
> Hallo,
> 
> for some years I had my gnucash-data on a mysql database. Now I want to move back to xml for different reasons.
> 
> When saving to xml, gnc is crashing.
> 
> Searching the mailing list was not successful.
> 
> Unfotunately I'm not a Linux or  C expert but I tried to collect some information
> 
> 
> OS: Linux version 4.13.0-39-generic (buildd at lcy01-amd64-024) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9)) #44~16.04.1-Ubuntu SMP Thu Apr 5 16:43:10 UTC 2018
> 
> GNC: from ubuntu packages
> 
>     GnuCash 2.6.12
>     Dieses Programm wurde aus Version ed11f6d+ am 2016-04-18 erstellt
> 
> 
> gnucash.trace:
> 
> gnucash --debug --extra
> 
> When the program crashes, I ge the following messages:
> 
> * 23:57:42  INFO <gnc.io> [gnc_account_dom_tree_create] lot list=(nil)
> * 23:57:42  INFO <gnc.io> [gnc_account_dom_tree_create] lot list=(nil)
> * 23:57:42  INFO <gnc.io> [gnc_account_dom_tree_create] lot list=(nil)
> * 23:57:42  INFO <gnc.io> [gnc_account_dom_tree_create] lot list=(nil)
> * 23:57:42  INFO <gnc.io> [gnc_account_dom_tree_create] lot list=(nil)
> 
> 
> gdb gnucash:
> 
> [New Thread 0x7fffc77d6700 (LWP 7632)]
> [New Thread 0x7fffc2912700 (LWP 7633)]
> [New Thread 0x7fffc2111700 (LWP 7634)]
> [New Thread 0x7fffc1910700 (LWP 7635)]
> [Thread 0x7fffc1910700 (LWP 7635) exited]
> [Thread 0x7fffc2111700 (LWP 7634) exited]
> [Thread 0x7fffc77d6700 (LWP 7632) exited]
> [New Thread 0x7fffc77d6700 (LWP 7636)]
> [New Thread 0x7fffc2111700 (LWP 7637)]
> 
> Thread 1 "gnucash" received signal SIGSEGV, Segmentation fault.
> g_date_time_add (datetime=0x0, timespan=0) at /build/glib2.0-prJhLS/glib2.0-2.48.2/./glib/gdatetime.c:1074
> 1074    /build/glib2.0-prJhLS/glib2.0-2.48.2/./glib/gdatetime.c: No such file or directory.
> 
> 
> If more information are necessary, please let me know how to provide it.
> 
> Thanks in advance

GnuCash 2.6 is no longer maintained and the date-time code is completely different in GnuCash 3 so there won’t be any fix, but since Debian/Ubuntu doesn’t yet support GnuCash 3 your best bet is to find a workaround.

The problem is likely that you have what MySQL regards as an invalid date in some record and that that caused a failure to create a date pointer. A bit more of the backtrace from gdb showing where that call came from would help identify what the defective object’s type is and confirm the hypothesis that there’s a bad record in the database. Since you have INFO messages in your Tracefile I suppose that you already ran gnucash --debug. You can get more detail still (though unfortunately not a lot more, there aren’t a lot of DEBUG statements in the XML backend) with 
gnucash --log gnc.backend.xml=debug that might provide some specifics indicating what object caused the crash.

Regards,
John Ralls



More information about the gnucash-user mailing list