Another neat bug in current-CVS (hit import, go boom! :)

Derek Atkins warlord@MIT.EDU
09 Feb 2001 14:27:13 -0500

Here is some more information.  The problem is not the argument into
the scheme function.  Walking through the C code with gdb, it looks
like the problem occurs during at gnc.c:4725:

      gw__scm_result = gnc_glist_account_ptr_to_scm_no_free(gw__c_result);

Continuing the search, the problem goes deeper:

(gdb) step
gnc_glist_account_ptr_to_scm_no_free (account_list=0x81df7b0)
    at guile-util.c:1180
1180      return gnc_glist_account_ptr_to_scm_internal (account_list, FALSE);
(gdb) step
gnc_glist_account_ptr_to_scm_internal (account_list=0x81df7b0, free_list=0)
    at guile-util.c:1140
1140      if (acct_type == SCM_UNDEFINED)
(gdb) n
1142        acct_type = gh_lookup("<gnc:Account*>");
1144        if(acct_type != SCM_UNDEFINED) scm_protect_object(acct_type);
1147      result = gnc_glist_to_scm_list(account_list, acct_type);
(gdb) step
gnc_glist_to_scm_list (glist=0x81df7b0, wct=9588) at gnc-helpers.c:53
53        SCM_ASSERT(gw_wct_p(wct), wct, SCM_ARG1, "gnc_glist_to_scm_list");
(gdb) n
/usr/gnucash/share/gnucash/scm/qif-import/qif-guess-map.scm:34:30: In procedure gnc:group-get-account-list in expression (gnc:group-get-account-list agroup):
/usr/gnucash/share/gnucash/scm/qif-import/qif-guess-map.scm:34:30: Wrong type argument in position 1: %S

So, really, the scheme assertion is failing in gnc-helpers.c:53 in
gnc_glist_to_scm_list().  Basically, at guile-util.c:1142
gnc_glish_account_ptr_to_scm_internal() is passing the results of
gh_lookup("<gnc:Account*>") into a function where it is being checked
against gw_wct_p().


       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL:    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available