Crash in QIF importer (1.6.4)

Steve Murphy murf@e-tools.com
04 Dec 2001 10:41:46 -0700


--=-d0pWjnZSKyaGOltpBvu5
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Looking back thru the archives, I saw a previous report of from a user
(chris@linuxforkids.com on 24 Oct) that reported an identical crash,
which occurs when you hit the "Finish" button at the end of a quicken
QIF import.

Like Chris,I had a little trouble building; but I finally got it.But I
didn't use CVS, I picked up the 1.6.4 tarball and built that.

Problems: wrong (old) version of slib.Updated to 2d2 or whatever it is.
          wrong (too new) version of g-wrap stuff. Used 1.11 instead of=20
                          3.x; didn't try 2.x, sorry!
          Uh, some things are already demanding guile 1.5, which isn't
published... you have to get 1.5.x out of cvs. Side Question: will guile
1.5 be compatible with gnucash 1.6.x?

Anyway....


I ran under the debugger, and here is what I got:

[1074]/scratch1/murf Yes, Master? gdb gnucash
GNU gdb 5.1
Copyright 2001 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 "i686-pc-linux-gnu"...
(gdb) run
Starting program: /usr/bin/gnucash=20
qif-file:read-file : unknown Security slot G .. continuing anyway.
qif-file:read-file : unknown Security slot G .. continuing anyway.
qif-file:read-file : unknown Security slot G .. continuing anyway.
qif-file:read-file : unknown Security slot G .. continuing anyway.
qif-file:read-file : unknown Security slot G .. continuing anyway.

Program received signal SIGSEGV, Segmentation fault.
strcmp (p1=3D0x81bdb48 "ISO4217", p2=3D0x20534e49 <Address 0x20534e49 out o=
f
bounds>) at ../sysdeps/generic/strcmp.c:39
39      ../sysdeps/generic/strcmp.c: No such file or directory.
        in ../sysdeps/generic/strcmp.c
(gdb) where
#0  strcmp (p1=3D0x81bdb48 "ISO4217", p2=3D0x20534e49 <Address 0x20534e49
out of bounds>) at ../sysdeps/generic/strcmp.c:39
#1  0x4003bb8e in safe_strcmp (da=3D0x81bdb48 "ISO4217", db=3D0x20534e49
<Address 0x20534e49 out of bounds>) at gnc-engine-util.c:192
#2  0x4003ae12 in gnc_commodity_equiv (a=3D0x81bdb10, b=3D0x864db70) at
gnc-commodity.c:300
#3  0x08076e35 in gnc_account_get_balance_in_currency
(account=3D0x87d68b8, currency=3D0x81bdb10) at gnc-ui-util.c:186
#4  0x080771c2 in gnc_ui_account_get_balance (account=3D0x87d68b8,
include_children=3D0) at gnc-ui-util.c:313
#5  0x080af9ef in gnc_ui_accounts_recurse (group=3D0x83772b0,
currency_list=3D0xbfffdf94, euro=3D0) at window-main-summarybar.c:294
#6  0x080afc35 in gnc_ui_accounts_recurse (group=3D0x81aefd0,
currency_list=3D0xbfffdf94, euro=3D0) at window-main-summarybar.c:334
#7  0x080afcb8 in gnc_main_window_summary_refresh (summary=3D0x832fae8) at
window-main-summarybar.c:387
#8  0x080affce in summarybar_refresh_handler (changes=3D0x8287a68,
user_data=3D0x832fae8) at window-main-summarybar.c:458
#9  0x08075dd9 in gnc_gui_refresh_internal (force=3D0) at
gnc-component-manager.c:655
#10 0x08075c52 in gnc_resume_gui_refresh () at
gnc-component-manager.c:554
#11 0x080cc4b7 in gnc_ui_qif_import_finish_cb (gpage=3D0x83893d0,
arg1=3D0x831df88, user_data=3D0x8353f88) at druid-qif-import.c:1811
#12 0x402ecbfa in gtk_marshal_NONE__POINTER () from
/usr/lib/libgtk-1.2.so.0
#13 0x4031e085 in gtk_handlers_run () from /usr/lib/libgtk-1.2.so.0
#14 0x4031d47d in gtk_signal_real_emit () from /usr/lib/libgtk-1.2.so.0
#15 0x4031b445 in gtk_signal_emit () from /usr/lib/libgtk-1.2.so.0
#16 0x4017db08 in gnome_druid_page_finish (druid_page=3D0x83893d0) at
gnome-druid-page.c:351
#17 0x4017c0d0 in gnome_druid_next_callback (button=3D0x831c7f8,
druid=3D0x831df88) at gnome-druid.c:580
#18 0x402ecdda in gtk_marshal_NONE__NONE () from
/usr/lib/libgtk-1.2.so.0
#19 0x4031e085 in gtk_handlers_run () from /usr/lib/libgtk-1.2.so.0
#20 0x4031d47d in gtk_signal_real_emit () from /usr/lib/libgtk-1.2.so.0
#21 0x4031b445 in gtk_signal_emit () from /usr/lib/libgtk-1.2.so.0
#22 0x40285b30 in gtk_button_clicked () from /usr/lib/libgtk-1.2.so.0
#23 0x4028713e in gtk_real_button_released () from
/usr/lib/libgtk-1.2.so.0
#24 0x402ecdda in gtk_marshal_NONE__NONE () from
/usr/lib/libgtk-1.2.so.0
#25 0x4031d30f in gtk_signal_real_emit () from /usr/lib/libgtk-1.2.so.0
#26 0x4031b445 in gtk_signal_emit () from /usr/lib/libgtk-1.2.so.0
#27 0x40285a68 in gtk_button_released () from /usr/lib/libgtk-1.2.so.0
#28 0x40286a88 in gtk_button_button_release () from
/usr/lib/libgtk-1.2.so.0
#29 0x402ec992 in gtk_marshal_BOOL__POINTER () from
/usr/lib/libgtk-1.2.so.0
#30 0x4031d4bb in gtk_signal_real_emit () from /usr/lib/libgtk-1.2.so.0
#31 0x4031b445 in gtk_signal_emit () from /usr/lib/libgtk-1.2.so.0
#32 0x40354c2c in gtk_widget_event () from /usr/lib/libgtk-1.2.so.0
#33 0x402ec8d5 in gtk_propagate_event () from /usr/lib/libgtk-1.2.so.0
#34 0x402eb96e in gtk_main_do_event () from /usr/lib/libgtk-1.2.so.0
#35 0x403aa533 in gdk_event_dispatch () from /usr/lib/libgdk-1.2.so.0
#36 0x400eb666 in g_main_dispatch (dispatch_time=3D0xbffff2b0) at
gmain.c:656
#37 0x400ebc93 in g_main_iterate (block=3D1, dispatch=3D1) at gmain.c:877
#38 0x400ebe4c in g_main_run (loop=3D0x83670f0) at gmain.c:935
#39 0x402eb22b in gtk_main () from /usr/lib/libgtk-1.2.so.0
#40 0x080ac25f in gnc_ui_start_event_loop () at top-level.c:481
#41 0x0810662a in gwrap_gnc_ui_start_event_loop () at gnc.c:8124
#42 0x405d4138 in scm_deval (x=3D1090374744, env=3D1090376824) at
eval.c:2636
#43 0x405d2236 in scm_deval (x=3D1090374840, env=3D1090376824) at
eval.c:1954
#44 0x405d2236 in scm_deval (x=3D1090375056, env=3D1090376824) at
eval.c:1954
#45 0x405d5d25 in scm_dapply (proc=3D1090375200, arg1=3D10612,
args=3D1090376624) at eval.c:3473
#46 0x405d0915 in scm_apply (proc=3D1090375224, arg1=3D10612, args=3D10612)=
 at
eval.c:3283
#47 0x405dc3de in gh_call0 (proc=3D1090375224) at gh_funcs.c:150
#48 0x080f7318 in gnucash_main_helper (argc=3D1, argv=3D0xbffff7e4) at
gnucash.c:132
#49 0x405dc4a3 in gh_launch_pad (closure=3D0x80f704c, argc=3D1,
argv=3D0xbffff7e4) at gh_init.c:60
#50 0x405df92e in invoke_main_func (body_data=3D0xbffff70c) at init.c:625
#51 0x4060262d in scm_internal_lazy_catch (tag=3D9076, body=3D0x405df908
<invoke_main_func>, body_data=3D0xbffff70c, handler=3D0x40602980
<scm_handle_by_message>, handler_data=3D0x0) at throw.c:283
#52 0x405df8e5 in scm_boot_guile_1 (base=3D0xbffff708, closure=3D0xbffff70c=
)
at init.c:600
#53 0x405df609 in scm_boot_guile (argc=3D1, argv=3D0xbffff7e4,
main_func=3D0x405dc488 <gh_launch_pad>, closure=3D0x80f704c) at init.c:443
---Type <return> to continue, or q <return> to quit---
#54 0x405dc4d1 in gh_enter (argc=3D1, argv=3D0xbffff7e4,
c_main_prog=3D0x80f704c <gnucash_main_helper>) at gh_init.c:70
#55 0x080f7436 in gnc_main (argc=3D1, argv=3D0xbffff7e4) at gnucash.c:205
#56 0x08076bba in main (argc=3D1, argv=3D0xbffff7e4) at gnc-main.c:30
#57 0x40c871eb in __libc_start_main (main=3D0x8076ba4 <main>, argc=3D1,
argv=3D0xbffff7e4, init=3D0x8067c5c <_init>, fini=3D0x811df24 <_fini>,
rtld_fini=3D0x4000a610 <_dl_fini>, stack_end=3D0xbffff7dc)
    at ../sysdeps/generic/libc-start.c:90
(gdb) up
#1  0x4003bb8e in safe_strcmp (da=3D0x81bdb48 "ISO4217", db=3D0x20534e49
<Address 0x20534e49 out of bounds>) at gnc-engine-util.c:192
192        SAFE_STRCMP (da, db);
(gdb) p da
$1 =3D 0x20534e49 <Address 0x20534e49 out of bounds>
(gdb) p *da
Cannot access memory at address 0x20534e49
(gdb) l =20
187   =20
\********************************************************************/
188    =20
189     int=20
190     safe_strcmp (const char * da, const char * db)
191     {
192        SAFE_STRCMP (da, db);
193        return 0;
194     }
195    =20
196     int=20
(gdb) up
#2  0x4003ae12 in gnc_commodity_equiv (a=3D0x81bdb10, b=3D0x864db70) at
gnc-commodity.c:300
300       if(safe_strcmp(a->namespace, b->namespace) !=3D 0) return FALSE;
(gdb) p *a
$2 =3D {fullname =3D 0x81bdb38 "US Dollar", namespace =3D 0x81bdb48 "ISO421=
7",
mnemonic =3D 0x81bdb58 "USD", printname =3D 0x81bdb78 "USD (US Dollar)",
exchange_code =3D 0x81bdb68 "840", fraction =3D 100,=20
  unique_name =3D 0x81bdb90 "ISO4217::USD", mark =3D 0}
(gdb) set pri pret
(gdb) p *a
$3 =3D {
  fullname =3D 0x81bdb38 "US Dollar",=20
  namespace =3D 0x81bdb48 "ISO4217",=20
  mnemonic =3D 0x81bdb58 "USD",=20
  printname =3D 0x81bdb78 "USD (US Dollar)",=20
  exchange_code =3D 0x81bdb68 "840",=20
  fraction =3D 100,=20
  unique_name =3D 0x81bdb90 "ISO4217::USD",=20
  mark =3D 0
}
(gdb) p *b
$4 =3D {
  fullname =3D 0x20413254 <Address 0x20413254 out of bounds>,=20
  namespace =3D 0x20534e49 <Address 0x20534e49 out of bounds>,=20
  mnemonic =3D 0x54204b43 <Address 0x54204b43 out of bounds>,=20
  printname =3D 0x5243204f <Address 0x5243204f out of bounds>,=20
  exchange_code =3D 0x54494445 <Address 0x54494445 out of bounds>,=20
  fraction =3D 1414733862,=20
  unique_name =3D 0x53504d41 <Address 0x53504d41 out of bounds>,=20
  mark =3D 0
}
(gdb) l=20
295    =20
296     gboolean
297     gnc_commodity_equiv(const gnc_commodity * a, const gnc_commodity
* b) {
298       if(a =3D=3D b) return TRUE;
299       if(!a || !b) return FALSE;
300       if(safe_strcmp(a->namespace, b->namespace) !=3D 0) return FALSE;
301       if(safe_strcmp(a->mnemonic, b->mnemonic) !=3D 0) return FALSE;
302       return TRUE;
303     }
304    =20
(gdb) up
#3  0x08076e35 in gnc_account_get_balance_in_currency
(account=3D0x87d68b8, currency=3D0x81bdb10) at gnc-ui-util.c:186
186       if (gnc_numeric_zero_p (balance) ||
(gdb) l
181       {
182         balance =3D xaccAccountGetBalance (account);
183         balance_currency =3D xaccAccountGetCurrency (account);
184       }
185    =20
186       if (gnc_numeric_zero_p (balance) ||
187           gnc_commodity_equiv (currency, balance_currency))
188         return balance;
189    =20
190       book =3D gncGetCurrentBook ();
(gdb) p *account
$5 =3D {
  guid =3D {
    data =3D "T2A INS CK TO CR",=20
    __align_me =3D 541143636
  },=20
  accountName =3D 0x54494445 <Address 0x54494445 out of bounds>,=20
  accountCode =3D 0x54532026 <Address 0x54532026 out of bounds>,=20
  description =3D 0x53504d41 <Address 0x53504d41 out of bounds>,=20
  kvp_data =3D 0x0,=20
  type =3D 40,=20
  currency =3D 0x51,=20
  security =3D 0x405ff448,=20
  currency_scu =3D 140827544,=20
  security_scu =3D 13,=20
  parent =3D 0x0,=20
  children =3D 0x410cde90,=20
  starting_balance =3D {
    num =3D 36783195290168,=20
    denom =3D 36783195292248
  },=20
  starting_cleared_balance =3D {
    num =3D 4712028309663071144,=20
    denom =3D 36782099931508
  },=20
  starting_reconciled_balance =3D {
    num =3D 36782099931508,=20
    denom =3D 36783195312352
  },=20
  starting_share_balance =3D {
    num =3D 1087750592,=20
    denom =3D 4294967313
  },=20
  starting_share_cleared_balance =3D {
    num =3D 68859151864,=20
    denom =3D 5494769021477715985
  },=20
  starting_share_reconciled_balance =3D {
    num =3D 362157264173,=20
    denom =3D 4202493158308708377
  },=20
  balance =3D {
    num =3D 7020660419860193613,=20
    denom =3D 6644590
  },=20
  cleared_balance =3D {
    num =3D 603862506212950033,=20
    denom =3D 68867914680
  },=20
  reconciled_balance =3D {
    num =3D 17179869200,=20
    denom =3D 68873721032
  },=20
  share_balance =3D {
    num =3D 4638694731289722961,=20
---Type <return> to continue, or q <return> to quit---
    denom =3D 55975402560
  },=20
  share_cleared_balance =3D {
    num =3D 4711312045465665536,=20
    denom =3D 36783194531224
  },=20
  share_reconciled_balance =3D {
    num =3D 36782099931508,=20
    denom =3D 4712028309663071144
  },=20
  version =3D 8564,=20
  version_check =3D 8564,=20
  splits =3D 0x2174,=20
  editlevel =3D 8564,=20
  balance_dirty =3D 1094622936,=20
  sort_dirty =3D 8564,=20
  core_dirty =3D -1,=20
  do_free =3D -1,=20
  mark =3D 89,=20
  idata =3D 1080030280
}
(gdb) p balance
$6 =3D {
  num =3D 73600,=20
  denom =3D 100000
}
(gdb) down
#2  0x4003ae12 in gnc_commodity_equiv (a=3D0x81bdb10, b=3D0x864db70) at
gnc-commodity.c:300
300       if(safe_strcmp(a->namespace, b->namespace) !=3D 0) return FALSE;
(gdb) p *a
$7 =3D {
  fullname =3D 0x81bdb38 "US Dollar",=20
  namespace =3D 0x81bdb48 "ISO4217",=20
  mnemonic =3D 0x81bdb58 "USD",=20
  printname =3D 0x81bdb78 "USD (US Dollar)",=20
  exchange_code =3D 0x81bdb68 "840",=20
  fraction =3D 100,=20
  unique_name =3D 0x81bdb90 "ISO4217::USD",=20
  mark =3D 0
}
(gdb) p *b
$8 =3D {
  fullname =3D 0x20413254 <Address 0x20413254 out of bounds>,=20
  namespace =3D 0x20534e49 <Address 0x20534e49 out of bounds>,=20
  mnemonic =3D 0x54204b43 <Address 0x54204b43 out of bounds>,=20
  printname =3D 0x5243204f <Address 0x5243204f out of bounds>,=20
  exchange_code =3D 0x54494445 <Address 0x54494445 out of bounds>,=20
  fraction =3D 1414733862,=20
  unique_name =3D 0x53504d41 <Address 0x53504d41 out of bounds>,=20
  mark =3D 0
}
(gdb) quit
The program is running.  Exit anyway? (y or n) y

Hope this helps. Can't send the data (sorry), but can answer any
question you desire from debug session...

murf


--=20
murf:   Steve Murphy, 	       CTO & VP Technology
        57 Lane 17        Electronic Tools Company
        Cody, Wyoming          work: (307)754-8154
        82414-9688             home: (307)754-5675
        email:                    murf@e-tools.com

--=-d0pWjnZSKyaGOltpBvu5
Content-Type: application/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQA8DQra6/5EwE4UaOQRAvQ8AKDRbzjOOZZluMmwdMm7HTmqRP4WRgCg0Gc+
lGvseFH1yblMDvWVJJ4Zpx4=
=L7W6
-----END PGP SIGNATURE-----

--=-d0pWjnZSKyaGOltpBvu5--