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 576163 - libofx (external) crash when endtags for BANKMSGSRSV1 or OFX are omitted
libofx (external) crash when endtags for BANKMSGSRSV1 or OFX are omitted
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Import - OFX
2.2.9
Other All
: Normal critical
: ---
Assigned To: Benoit Grégoire
Benoit Grégoire
: 577317 582023 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-03-21 10:52 UTC by Gilles Dartiguelongue
Modified: 2018-06-29 22:19 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24



Description Gilles Dartiguelongue 2009-03-21 10:52:57 UTC
What were you doing when the application crashed?
Tried to import one month worth of transactions. It looks like my bank is generating invalid files from time to time but I don't expect gnucash to crash for this.

With libofx-0.9.0, gnucash-2.2.9.


Distribution: Gentoo Base System release 2.0.0
Gnome Release: 2.24.3 2009-01-15 (Gentoo)
BugBuddy Version: 2.24.2

System: Linux 2.6.28-gentoo-r1 #1 SMP Wed Feb 4 23:22:10 CET 2009 i686
X Vendor: The X.Org Foundation
X Vendor Release: 10503000
Selinux: No
Accessibility: Disabled
GTK+ Theme: Clearlooks
Icon Theme: gnome

Memory status: size: 126857216 vsize: 126857216 resident: 60043264 share: 14872576 rss: 60043264 rss_rlim: 18446744073709551615
CPU usage: start_time: 1237632014 rtime: 5556 utime: 5339 stime: 217 cutime:49 cstime: 12 timeout: 0 it_real_value: 0 frequency: 100

Backtrace was generated from '/usr/bin/gnucash'

Really redefine built-in command "frame"? (y or n) [answered Y; input not from terminal]
Really redefine built-in command "thread"? (y or n) [answered Y; input not from terminal]
Really redefine built-in command "start"? (y or n) [answered Y; input not from terminal]
[Thread debugging using libthread_db enabled]
[New Thread 0xb65cb710 (LWP 8175)]
[New Thread 0xb350bb90 (LWP 8188)]
0xb7fb3424 in __kernel_vsyscall ()
  • #0 __kernel_vsyscall
  • #1 waitpid
    from /lib/libpthread.so.0
  • #2 IA__g_spawn_sync
    at gspawn.c line 382
  • #3 IA__g_spawn_command_line_sync
    at gspawn.c line 694
  • #4 run_bug_buddy
    at gnome-breakpad.cc line 223
  • #5 check_if_gdb
    at gnome-breakpad.cc line 292
  • #6 bugbuddy_segv_handle
    at gnome-breakpad.cc line 84
  • #7 <signal handler called>
  • #8 OFXApplication::endElement
    at ofx_sgml.cpp line 251
  • #9 OpenSP::GenericEventHandler::endElement
    at GenericEventHandler.cxx line 155
  • #10 OpenSP::Parser::implyCurrentElementEnd
    at parseInstance.cxx line 1177
  • #11 OpenSP::Parser::endAllElements
    at parseInstance.cxx line 1124
  • #12 OpenSP::Parser::endInstance
    at parseInstance.cxx line 59
  • #13 OpenSP::Parser::doContent
    at parseInstance.cxx line 93
  • #14 OpenSP::Parser::parseAll
    at Parser.cxx line 254
  • #15 OpenSP::SgmlParser::parseAll
    at SgmlParser.cxx line 46
  • #16 OpenSP::ParserApp::parseAll
    at ParserApp.cxx line 97
  • #17 OpenSP::ParserEventGenerator::run
    at ParserEventGeneratorKit.cxx line 197
  • #18 ofx_proc_sgml
    at ofx_sgml.cpp line 364
  • #19 ofx_proc_file
    at ofx_preproc.cpp line 252
  • #20 libofx_proc_file
    at file_preproc.cpp line 92
  • #21 gnc_file_ofx_import
    at gnc-ofx-import.c line 693
  • #22 gnc_plugin_ofx_cmd_import
    at gnc-plugin-ofx.c line 145
  • #23 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #24 IA__g_closure_invoke
    at gclosure.c line 767
  • #25 signal_emit_unlocked_R
    at gsignal.c line 3244
  • #26 IA__g_signal_emit_valist
    at gsignal.c line 2977
  • #27 IA__g_signal_emit
    at gsignal.c line 3034
  • #28 _gtk_action_emit_activate
    at gtkaction.c line 885
  • #29 IA__gtk_action_activate
    at gtkaction.c line 912
  • #30 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #31 IA__g_closure_invoke
    at gclosure.c line 767
  • #32 signal_emit_unlocked_R
    at gsignal.c line 3244
  • #33 IA__g_signal_emit_valist
    at gsignal.c line 2977
  • #34 IA__g_signal_emit
    at gsignal.c line 3034
  • #35 IA__gtk_widget_activate
    at gtkwidget.c line 4776
  • #36 IA__gtk_menu_shell_activate_item
    at gtkmenushell.c line 1139
  • #37 gtk_menu_shell_button_release
    at gtkmenushell.c line 678
  • #38 gtk_menu_button_release
    at gtkmenu.c line 2850
  • #39 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 84
  • #40 g_type_class_meta_marshal
    at gclosure.c line 878
  • #41 IA__g_closure_invoke
    at gclosure.c line 767
  • #42 signal_emit_unlocked_R
    at gsignal.c line 3282
  • #43 IA__g_signal_emit_valist
    at gsignal.c line 2987
  • #44 IA__g_signal_emit
    at gsignal.c line 3034
  • #45 gtk_widget_event_internal
    at gtkwidget.c line 4745
  • #46 IA__gtk_propagate_event
    at gtkmain.c line 2391
  • #47 IA__gtk_main_do_event
    at gtkmain.c line 1596
  • #48 gdk_event_dispatch
    at gdkevents-x11.c line 2365
  • #49 IA__g_main_context_dispatch
    at gmain.c line 2144
  • #50 g_main_context_iterate
    at gmain.c line 2778
  • #51 IA__g_main_loop_run
    at gmain.c line 2986
  • #52 IA__gtk_main
    at gtkmain.c line 1200
  • #53 gnc_ui_start_event_loop
    at gnc-gnome-utils.c line 450
  • #54 inner_main
    at gnucash-bin.c line 490
  • #55 invoke_main_func
    at init.c line 367
  • #56 c_body
    at continuations.c line 349
  • #57 scm_c_catch
    at throw.c line 203
  • #58 scm_i_with_continuation_barrier
    at continuations.c line 325
  • #59 scm_c_with_continuation_barrier
    at continuations.c line 367
  • #60 scm_i_with_guile_and_parent
    at threads.c line 726
  • #61 scm_with_guile
    at threads.c line 714
  • #62 scm_boot_guile
    at init.c line 350
  • #63 main
    at gnucash-bin.c line 624


----------- .xsession-errors (83 sec old) ---------------------
LibOFX ERROR: MainContainer is NULL trying to add element STMTTRNRS
(Above message occured on Line 1, Column 3252)
LibOFX ERROR: OpenSP parser: otherError (misc parse error):
/tmp/.private/eva/libofxtmp3rA4Sa:1:3251:E: end tag for "BANKMSGSRSV1" omitted, but its declaration does not permit this
/tmp/.private/eva/libofxtmp3rA4Sa:1:128: start tag was here
(Above message occured on Line 1, Column 3252)
LibOFX ERROR: MainContainer is NULL trying to add element BANKMSGSRSV1
(Above message occured on Line 1, Column 3252)
LibOFX ERROR: OpenSP parser: otherError (misc parse error):
/tmp/.private/eva/libofxtmp3rA4Sa:1:3251:E: end tag for "OFX" omitted, but its declaration does not permit this
/tmp/.private/eva/libofxtmp3rA4Sa:1:0: start tag was here
(Above message occured on Line 1, Column 3252)
"/usr/bin/gnucash": not in executable format: File format not recognized
--------------------------------------------------
Comment 1 Phil Longstaff 2009-04-23 23:44:14 UTC
Is this reproducible?  Can you attach your OFX file (you may want to edit it to obscure the details first)?
Comment 2 Gilles Dartiguelongue 2009-04-24 09:48:46 UTC
I've had similar crashes in the past with very specific files, I'll try to attach an obsured file asap.
Comment 3 palfrey 2009-05-11 11:38:34 UTC
*** Bug 582023 has been marked as a duplicate of this bug. ***
Comment 4 Christian Stimming 2010-01-05 16:40:55 UTC
*** Bug 577317 has been marked as a duplicate of this bug. ***
Comment 5 Geert Janssens 2010-02-05 15:30:09 UTC
For information, duplicate bug #582023 has got a stacktrace that the op claims can reproduce the error (I have not tried it though).

Also changing title to be more meaningful.
Comment 6 Geert Janssens 2010-03-13 10:09:11 UTC
I can reproduce this bug with the ofx file attached to bug #582023.

However, a backtrace shows the crash happens inside libofx, which is not maintained by GnuCash. There is not much GnuCash can do to prevent this crash.

The bank that creates these ofx files if violating the OFX DTD by omitting some closing tags. I'm not sure how libofx should respond to such a situation, but I agree with the OP that it shouldn't crash.

I have reported this bug on the libofx bugtracker:
http://sourceforge.net/tracker/?func=detail&aid=2969817&group_id=61170&atid=496353

Hopefully it will get fixed there.
Comment 7 Geert Janssens 2011-04-03 17:01:19 UTC
Good news: Benoit committed a patch to libofx that should fix this crash. See http://libofx.git.sourceforge.net/git/gitweb.cgi?p=libofx/libofx;a=commit;h=536000686cc335c56761a4a437651284098d9290

This will of course only be visible in GnuCash when a new libofx version has been released and GnuCash will be using that new release.
Comment 8 Geert Janssens 2011-06-11 10:18:33 UTC
This is fixed as of libofx 0.9.3 which has been released on 2011-04-13. The Windows build of GnuCash has been configured to use a more recent version of libofx. The linux builds depend on the libofx that is provided by their respective distributions. The GnuCash on OS X build currently still uses 0.9.1, but I'll contact John to fix this.
Comment 9 Geert Janssens 2011-06-12 09:36:20 UTC
The next version of GnuCash on OS X will use libofx 0.9.4. So this issue can be closed.
Comment 10 John Ralls 2018-06-29 22:19:43 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=576163. Please update any external references or bookmarks.