After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 101705 - Crash following OFX import
Crash following OFX import
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: Import - Other
unspecified
Other other
: Normal normal
: ---
Assigned To: Benoit Grégoire
Benoit Grégoire
: 102105 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-12-20 23:52 UTC by Nigel Titley
Modified: 2018-06-29 20:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for bad free() in gnc_import_set_trans_online_id (825 bytes, patch)
2003-01-14 00:52 UTC, Nigel Titley
none Details | Review

Description Nigel Titley 2002-12-20 23:50:16 UTC
Package: GnuCash
Severity: normal
Version: 1.7.5
Synopsis: Crash following OFX import
Bugzilla-Product: GnuCash
Bugzilla-Component: Import

Description:
Imported a month's worth of bank statement, worked through the import transaction matcher, clicked on OK.

Gnucash crashed.



Debugging Information:

(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...[New Thread 1024 (LWP 1982)]
0x420b48b9 in wait4 () from /lib/i686/libc.so.6
  • #0 wait4
    from /lib/i686/libc.so.6
  • #1 __DTOR_END__
    from /lib/i686/libc.so.6
  • #2 gnome_segv_handle
    from /usr/lib/libgnomeui.so.32
  • #3 pthread_sighandler
    from /lib/i686/libpthread.so.0
  • #4 <signal handler called>
  • #5 chunk_alloc
    from /lib/i686/libc.so.6
  • #6 malloc
    from /lib/i686/libc.so.6
  • #7 scm_must_malloc
    from /usr/lib/libguile.so.6
  • #8 gw_wcp_assimilate_ptr
    at g-wrap-wct.c line 214
  • #9 gw__tmp462_gnc_commodity_table_lookup_wrapper
    at gw-engine.c line 18224
  • #10 scm_deval
    from /usr/lib/libguile.so.6
  • #11 scm_dapply
    from /usr/lib/libguile.so.6
  • #12 scm_apply
    from /usr/lib/libguile.so.6
  • #13 gh_call0
    from /usr/lib/libguile.so.6
  • #14 gnc_option_db_lookup_currency_option
    at option-util.c line 2295
  • #15 gnc_lookup_currency_option
    at global-options.c line 338
  • #16 gnc_default_currency
    at global-options.c line 356
  • #17 gnc_ui_accounts_recurse
    at window-main-summarybar.c line 271
  • #18 gnc_ui_accounts_recurse
    at window-main-summarybar.c line 344
  • #19 gnc_ui_accounts_recurse
    at window-main-summarybar.c line 344
  • #20 gnc_ui_accounts_recurse
    at window-main-summarybar.c line 344
  • #21 gnc_ui_accounts_recurse
    at window-main-summarybar.c line 344
  • #22 gnc_main_window_summary_refresh
    at window-main-summarybar.c line 397
  • #23 gnc_gui_refresh_internal
    at gnc-component-manager.c line 741
  • #24 gnc_cm_event_handler
    at gnc-component-manager.c line 289
  • #25 gnc_engine_generate_event
    at gnc-event.c line 183
  • #26 xaccAccountRemoveSplit
    at Account.c line 69
  • #27 xaccTransDestroy
    at Transaction.c line 2058
  • #28 gnc_import_process_trans_clist
    at import-backend.c line 708
  • #29 on_matcher_ok_clicked
    at import-main-matcher.c line 234
  • #30 gtk_marshal_NONE__NONE
    from /usr/lib/libgtk-1.2.so.0
  • #31 gtk_handlers_run
    from /usr/lib/libgtk-1.2.so.0
  • #32 gtk_signal_real_emit
    from /usr/lib/libgtk-1.2.so.0
  • #33 gtk_signal_emit
    from /usr/lib/libgtk-1.2.so.0
  • #34 gtk_button_clicked
    from /usr/lib/libgtk-1.2.so.0
  • #35 gtk_real_button_released
    from /usr/lib/libgtk-1.2.so.0
  • #36 gtk_marshal_NONE__NONE
    from /usr/lib/libgtk-1.2.so.0
  • #37 gtk_signal_real_emit
    from /usr/lib/libgtk-1.2.so.0
  • #38 gtk_signal_emit
    from /usr/lib/libgtk-1.2.so.0
  • #39 gtk_button_released
    from /usr/lib/libgtk-1.2.so.0
  • #40 gtk_button_button_release
    from /usr/lib/libgtk-1.2.so.0
  • #41 gtk_marshal_BOOL__POINTER
    from /usr/lib/libgtk-1.2.so.0
  • #42 gtk_signal_real_emit
    from /usr/lib/libgtk-1.2.so.0
  • #43 gtk_signal_emit
    from /usr/lib/libgtk-1.2.so.0
  • #44 gtk_widget_event
    from /usr/lib/libgtk-1.2.so.0
  • #45 gtk_propagate_event
    from /usr/lib/libgtk-1.2.so.0
  • #46 gtk_main_do_event
    from /usr/lib/libgtk-1.2.so.0
  • #47 gdk_event_dispatch
    from /usr/lib/libgdk-1.2.so.0
  • #48 g_main_dispatch
    from /usr/lib/libglib-1.2.so.0
  • #49 g_main_iterate
    from /usr/lib/libglib-1.2.so.0
  • #50 g_main_run
    from /usr/lib/libglib-1.2.so.0
  • #51 gtk_main
    from /usr/lib/libgtk-1.2.so.0
  • #52 gnc_ui_start_event_loop
    at top-level.c line 529
  • #53 gw__tmp773_gnc_ui_start_event_loop_wrapper
    at gw-gnc.c line 276
  • #54 scm_ceval
    from /usr/lib/libguile.so.6
  • #55 scm_ceval
    from /usr/lib/libguile.so.6
  • #56 scm_ceval
    from /usr/lib/libguile.so.6
  • #57 scm_ceval
    from /usr/lib/libguile.so.6
  • #58 scm_eval_3
    from /usr/lib/libguile.so.6
  • #59 scm_eval_x
    from /usr/lib/libguile.so.6
  • #60 scm_shell
    from /usr/lib/libguile.so.6
  • #61 invoke_main_func
    from /usr/lib/libguile.so.6
  • #62 scm_internal_lazy_catch
    from /usr/lib/libguile.so.6
  • #63 scm_boot_guile_1
    from /usr/lib/libguile.so.6
  • #64 scm_boot_guile
    from /usr/lib/libguile.so.6
  • #65 gdb_eval
  • #66 __libc_start_main
    from /lib/i686/libc.so.6
  • #0 wait4
    from /lib/i686/libc.so.6
  • #1 __DTOR_END__
    from /lib/i686/libc.so.6
  • #2 gnome_segv_handle
    from /usr/lib/libgnomeui.so.32
  • #3 pthread_sighandler
    from /lib/i686/libpthread.so.0
  • #4 <signal handler called>
  • #5 chunk_alloc
    from /lib/i686/libc.so.6
  • #6 malloc
    from /lib/i686/libc.so.6
  • #7 scm_must_malloc
    from /usr/lib/libguile.so.6




------- Bug moved to this database by unknown@bugzilla.gnome.org 2002-12-20 18:50 -------

Reassigning to the default owner of the component, chris@wilddev.net.

Comment 1 Christian Stimming 2002-12-28 12:28:50 UTC
First: there have been major changes in the import matcher code 
between 1.7.5 and 1.7.6. Can you please try again with 1.7.6 and 
tell us whether this bug still occurs?

Also, somehow this is multi-currency related. What is your "account 
default currency" setting in the general preferences? What are the 
currencies in the imported OFX file? Did you create any new accounts 
during your import, and if so, with which currencies?
Comment 2 Nigel Titley 2002-12-28 13:59:04 UTC
I'm just downloading a new CVS, I'll see if the bug still exists in
the new one. This is of course if I can manage to do an OFX import at
all, given my problems with OFX import hangs (bug id 101738).

With regard to your other questions, my default currency is GBP, I
wasn't creating any new accounts, and the import file contained the
details from one account, in GBP.
Comment 3 Nigel Titley 2002-12-28 17:28:46 UTC
Yes, bug is still there as at 28th December.
Comment 4 Nigel Titley 2002-12-28 23:13:28 UTC
You may wish to check Josh's comments on bug 101650. It may be related
to this one. I'll try running without LANG=en_GB set and see if the
crash doesn't happen.
Comment 5 Nigel Titley 2002-12-28 23:20:34 UTC
No, wasn't that. Bother.
Comment 6 Christian Stimming 2002-12-29 12:36:06 UTC
*** Bug 102105 has been marked as a duplicate of this bug. ***
Comment 7 Nigel Titley 2002-12-30 23:31:36 UTC
Imported entire file without manual intervention, no problem.

Moved first red item (third transaction) to manual reconcile and got
crash. Debug output as follows:

Debug: clist_select_row_cb: row_number: 2, column: 5
Debug: refresh_clist_row: Begin
Debug: clist_select_row_cb: row_number: 2, column: 8
Debug: gnc_import_select_account: Default commodity received: British
Pound
Debug: gnc_import_select_account: Default account type received: 
Debug: gnc_import_select_account: Looking for account with online_id:
(null)
WRITEME: gnc_import_select_account() Here we should check if account
type is compatible, currency matches, etc.
Debug: gnc_import_select_account: Return value: 0x822ce30, account
name:Miscellaneous

Debug: refresh_clist_row: Begin
<CRASH at this point>
Comment 8 Nigel Titley 2003-01-14 00:51:00 UTC
More details. This bug occurs when two ofx imports overlap. Somehow,
this results in gnc_import_set_trans_online_id attempting to free
space that either didn't come from malloc, or has already been freed.
I have been unable to find where the mis-alloc takes place, but a
proposed patch is attached which fixes the problem. I've tested this
patch reasonably rigorously with several ofx files from my bank which
previously caused crashes. It seems solid. However, you will probably
want to re-assign this back to Christian as it is his code that I have
patched.
Comment 9 Nigel Titley 2003-01-14 00:52:35 UTC
Created attachment 13547 [details] [review]
Patch for bad free() in gnc_import_set_trans_online_id
Comment 10 Derek Atkins 2003-01-14 03:07:04 UTC
This patch certainly looks safe to me.  I'll commit it to CVS.
Comment 11 Nigel Titley 2003-01-29 10:52:23 UTC
Still no crashes, despite numerous imports, including overlaps.

I'm not sure what to do about this bug. The patch fixes the symptoms,
and is safe, and has been merged into the CVS. However, I have a
strong nagging feeling that the original malloc() - free() - use is
still there, just not causing any problems at the moment. I believe it
to be in the generic importer, but heaven knows where, and I believe
it will re-surface at some point in the future, once use of the OFX
import mechanism is more extensive.
Comment 12 Benoit Grégoire 2003-02-02 04:59:08 UTC
I've applied Nigel's solution in the other instance I found. 
Hopefully this bug is permanently closed.
Comment 13 John Ralls 2018-06-29 20:23:26 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=101705. Please update any external references or bookmarks.