GNOME Bugzilla – Bug 576163
libofx (external) crash when endtags for BANKMSGSRSV1 or OFX are omitted
Last modified: 2018-06-29 22:19:43 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 ()
+ Trace 213672
----------- .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 --------------------------------------------------
Is this reproducible? Can you attach your OFX file (you may want to edit it to obscure the details first)?
I've had similar crashes in the past with very specific files, I'll try to attach an obsured file asap.
*** Bug 582023 has been marked as a duplicate of this bug. ***
*** Bug 577317 has been marked as a duplicate of this bug. ***
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.
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.
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.
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.
The next version of GnuCash on OS X will use libofx 0.9.4. So this issue can be closed.
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.