gda crash in load_owner() with PostgreSQL backend

Phil Longstaff plongstaff at rogers.com
Wed Feb 13 20:36:03 EST 2008


Graham Menhennitt wrote:
> G'day all,
>
> I've successfully built the gda branch version 16939 from SVN. I can run
> it with a normal gnucash data file as the command line parameter and
> then save to a PostgreSQL DSN using the File->Database Connection menu
> item. By looking in the DB using psql, it seems that my data has been
> saved. I then try to load from the DB using a command line parameter of
> the DSN. It runs for a few seconds and then crashes with a segmentation
> violation. Running it in gdb gives the following. Am I doing something
> wrong, or is this a bug? If so, what can I do to help diagnose it?
>
> Thanks,
>     Graham
>
> $ gdb --args gnucash-bin --debug gda://@ggg
> GNU gdb 6.6-debian
> Copyright (C) 2006 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "i486-linux-gnu"...
> Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
> (gdb) r
> Starting program: /usr/local/bin/gnucash-bin --debug gda://@ggg
> [Thread debugging using libthread_db enabled]
> [New Thread -1233987920 (LWP 4430)]
>
>
> This is a development version. It may or may not work.
> Report bugs and other problems to gnucash-devel at gnucash.org.
> You can also lookup and file bug reports at http://bugzilla.gnome.org
> The last stable version was GnuCash 2.2.2
> The next stable version will be GnuCash 2.4
>
> [New Thread -1268253808 (LWP 4439)]
> Found Finance::Quote version 1.13
> Implementation missing: database_constraints_update_list() in
> gda-dict-database.c line 1214
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
> "billterms_pkey" for table "billterms"
> Implementation missing: database_constraints_update_list() in
> gda-dict-database.c line 1214
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1233987920 (LWP 4430)]
> 0x00000000 in ?? ()
> (gdb) bt
> #0  0x00000000 in ?? ()
> #1  0xb56eee60 in load_owner (be=0x84cdd00, pModel=0x867e620, row=0,
> setter=0, pObject=0x868e808, table_row=0xb56f3180) at gnc-owner-gda.c:129
> #2  0xb58e9c14 in gnc_gda_load_object (be=0x84cdd00, pModel=0x867e620,
> row=0, obj_name=0xb56f0ace "gncInvoice", pObject=0x868e808,
> table_row=0xb56f31a0) at gnc-backend-util-gda.c:1408
> #3  0xb56ed20e in load_all_invoices (be=0x84cdd00) at gnc-invoice-gda.c:95
> #4  0xb58fc69e in initial_load_cb (type=0xb56f0ace "gncInvoice",
> data_p=0xb56f31e0, be_p=0x84cdd00) at gnc-backend-gda.c:379
> #5  0xb7484dcc in foreach_backend (key=0xb56f0ace, be_item=0x0,
> arg=0x868e808) at qofobject.c:339
> #6  0xb74b9e96 in g_hash_table_foreach () from /usr/lib/libglib-2.0.so.0
> #7  0xb7484d84 in qof_object_foreach_backend (backend_name=0xb58fcf9f
> "gnc:gda:1", cb=0xb58fc600 <initial_load_cb>, user_data=0x84cdd00) at
> qofobject.c:359
> #8  0xb58fc4de in gnc_gda_load (be_start=0x84cdd00, book=0x80efd40) at
> gnc-backend-gda.c:409
> #9  0xb748b871 in qof_session_load (session=0x84a5720,
> percentage_func=0xb732bd60 <gnc_window_show_progress>) at qofsession.c:1139
> #10 0xb72ee0f4 in gnc_post_file_open (filename=<value optimized out>) at
> gnc-file.c:786
> #11 0x0804acbe in inner_main (closure=0x0, argc=2, argv=0xbfcf0db4) at
> gnucash-bin.c:475
> #12 0xb7f317d4 in scm_boot_guile () from /usr/lib/libguile.so.12
> #13 0x0804a9b1 in main (argc=Cannot access memory at address 0x0) at
> gnucash-bin.c:624
> (gdb) fr 1
> #1  0xb56eee60 in load_owner (be=0x84cdd00, pModel=0x867e620, row=0,
> setter=0, pObject=0x868e808, table_row=0xb56f3180) at gnc-owner-gda.c:129
> 129             (*setter)( pObject, &owner );
> (gdb) p setter
> $1 = (QofSetterFunc) 0
> (gdb) p *table_row
> $2 = {col_name = 0xb56b2a45 "billto", col_type = 0xb56b2a4c "owner",
> size = 0, flags = 0, gobj_param_name = 0x0, param_name = 0xb56b2a52
> "bill-to", getter = 0, setter = 0}
> (gdb)
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>
>   

I just committed rev 16942 which should fix this.  I don't use the 
business objects, so please exercise them.  There could be a lot more of 
this kind of problem.  I'm trying to piggyback on the getters/setters 
registered with qof, but they're sometimes not all there (getter is, but 
no setter).

Phil



More information about the gnucash-devel mailing list