Re: make check fails in test-load-xml2

2006-02-16 Thread Derek Atkins
Josh Sled [EMAIL PROTECTED] writes:

 On Wed, 2006-02-15 at 11:24 -0500, Derek Atkins wrote:
 I was trying to test a buildsystem change and noticed that make check
 is failing now.  I suspect this is due to adding gconf into the
 xml backend.   Here's the backtrace from test-load-xml2.

 It was due to the g-types system not being initialized before calling
 gconf code, as is documented in the gconf API.  :/  I fixed this
 instance by calling g_type_init() at the top of the test's main.

I moved the init into the module but the test doesn't actually
LOAD the module -- it just links against it.  *sigh*  So the
module init code was never called.  Bad Test!  No Biscuit!

I left the init in the module, but I also re-added the init to the
test, rather that loading the module.  *sigh*

-derek
-- 
   Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
   Member, MIT Student Information Processing Board  (SIPB)
   URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
   [EMAIL PROTECTED]PGP key available
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


make check fails in test-load-xml2

2006-02-15 Thread Derek Atkins
Hi,

I was trying to test a buildsystem change and noticed that make check
is failing now.  I suspect this is due to adding gconf into the
xml backend.   Here's the backtrace from test-load-xml2.

-derek

(gdb) run
Starting program: 
/home/warlord/src/gnucash/gnucash-svn/build/src/backend/file/test/.libs/lt-test-load-xml2
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xb7f2
[Thread debugging using libthread_db enabled]
[New Thread -1210086848 (LWP 9129)]

(process:9129): GLib-GObject-CRITICAL **: gtype.c:2253: initialization 
assertion failed, use g_type_init() prior to this function

(process:9129): GLib-GObject-CRITICAL **: file gobject.c: line 819 
(g_object_new): assertion `G_TYPE_IS_OBJECT (object_type)' failed

(process:9129): GLib-GObject-CRITICAL **: file gobject.c: line 1561 
(g_object_ref): assertion `G_IS_OBJECT (object)' failed

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1210086848 (LWP 9129)]
0x0399a06c in gconf_client_get_type () from /usr/lib/libgconf-2.so.4
(gdb) where
#0  0x0399a06c in gconf_client_get_type () from /usr/lib/libgconf-2.so.4
#1  0x0399a5cb in gconf_client_get_default () from /usr/lib/libgconf-2.so.4
#2  0xb7e7732f in gnc_gconf_get_float (section=0xb7dbc145 general,
name=0xb7dbc139 retain_days, caller_error=0x0) at gnc-gconf-utils.c:500
#3  0xb7da43fc in gnc_backend_new () at gnc-backend-file.c:972
#4  0xb7e4d243 in qof_session_load_backend (session=0x87f4188,
access_method=0xb7e55366 file) at qofsession.c:937
#5  0xb7e4d610 in qof_session_begin (session=0x87f4188,
book_id=0x87f4160 ./test-files/xml2/every.gml2, ignore_lock=0,
create_if_nonexistent=0) at qofsession.c:1036
#6  0x0804906b in test_load_file (
filename=0x87f4160 ./test-files/xml2/every.gml2) at test-load-xml2.c:87
#7  0x0804926a in main (argc=1, argv=0xbf81e1b4) at test-load-xml2.c:147

-- 
   Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
   Member, MIT Student Information Processing Board  (SIPB)
   URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
   [EMAIL PROTECTED]PGP key available
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: make check fails in test-load-xml2

2006-02-15 Thread Josh Sled
On Wed, 2006-02-15 at 11:24 -0500, Derek Atkins wrote:
 I was trying to test a buildsystem change and noticed that make check
 is failing now.  I suspect this is due to adding gconf into the
 xml backend.   Here's the backtrace from test-load-xml2.

It was due to the g-types system not being initialized before calling
gconf code, as is documented in the gconf API.  :/  I fixed this
instance by calling g_type_init() at the top of the test's main.

-- 
...jsled
http://asynchronous.org/ - `a=jsled; b=asynchronous.org; echo [EMAIL PROTECTED]
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: make check fails in test-load-xml2

2006-02-15 Thread Derek Atkins

Quoting Josh Sled [EMAIL PROTECTED]:


On Wed, 2006-02-15 at 11:24 -0500, Derek Atkins wrote:

I was trying to test a buildsystem change and noticed that make check
is failing now.  I suspect this is due to adding gconf into the
xml backend.   Here's the backtrace from test-load-xml2.


It was due to the g-types system not being initialized before calling
gconf code, as is documented in the gconf API.  :/  I fixed this
instance by calling g_type_init() at the top of the test's main.


Is it legal to call g_type_init() multiple times?  If so, then perhaps
we should add it to the gncmod initialization routine?  I'm not sure that
every test should need to remember to initialize this.

-derek
--
  Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
  Member, MIT Student Information Processing Board  (SIPB)
  URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
  [EMAIL PROTECTED]PGP key available

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel