[GNC] Help required for debugging gnucash to find Segmentation fault error when saving from mysql to xml

Jeff Abrahamson jeff at p27.eu
Thu Sep 20 04:46:17 EDT 2018


The first thing to try is surely just to run the program under gdb and
to let it crash.  When it crashes, ask for a backtrace (bt) to see where
you are.  You can move from stack frame to stack frame (f -- for
example, "f 3" to view frame 3).  You can request to see the values of
variables with the print command (p).  For example "p the_date" will
show you the value of variable "the_date".

I find it helpful to run gdb in emacs (M-x gdb).  The reason is that it
allows me to see source code automatically rather than having to request
gdb to list bits of source code at the commandline.

Note that I don't have experience debugging gnucash but I have plenty
with gdb.

Jeff Abrahamson
+33 6 24 40 01 57
+44 7920 594 255

http://p27.eu/jeff/
http://transport-nantes.com/


On 19/09/18 23:19, Uli Hansen wrote:
> Dear All,
>
> please be aware that I run gdb the first time in my life to find this
> problem.
>
> When saving from mysql to xml I get a segmentation fault error:
>
> Thread 1 "gnucash" received signal SIGSEGV, Segmentation fault.
> g_date_time_add (datetime=0x0, timespan=0) at
> /build/glib2.0-7ZsPUq/glib2.0-2.48.2/./glib/gdatetime.c:1074
> 1074    /build/glib2.0-7ZsPUq/glib2.0-2.48.2/./glib/gdatetime.c: No
> such file or directory
>
> I already comiled the sources from 2.6.12 to dive into this problem.
>
>
> I assume that the cause of my error is an empty date field somewhere
> in my database.
>
> In order to find the proper table and the id, I want to debug with gdb.
>
> But honestly it's quiet complicated and I'm not familiar with gdb.
>
> Can somebody give me a hint where to set a breakpoint. Which function
> is called to convert from mysql to xml?
>
> Which file/function could be a good startpoint for me?
>
> Many thanks in advance.
>
> Uli
>
>
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

-- 

Jeff Abrahamson
+33 6 24 40 01 57
+44 7920 594 255

http://p27.eu/jeff/
http://transport-nantes.com/



More information about the gnucash-user mailing list