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 795272 - QIF importer causes application crash if action is invalid
QIF importer causes application crash if action is invalid
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Import - QIF
3.0
Other Windows
: Normal critical
: future
Assigned To: gnucash-import-maint
gnucash-import-maint
Depends on:
Blocks:
 
 
Reported: 2018-04-15 00:05 UTC by Tim
Modified: 2018-06-30 00:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
.qif with two transactions that crashes GnuCash 3.0 (250 bytes, application/octet-stream)
2018-04-15 00:05 UTC, Tim
Details

Description Tim 2018-04-15 00:05:33 UTC
Created attachment 370945 [details]
.qif with two transactions that crashes GnuCash 3.0

A .qif file exported from (an old version) of iBank uses XFR instead of Xin or Xout as the action for an investment account transactions.  So the file is formatted incorrectly (not really a GnuCash problem).  But when importing, the error is not caught, and the application crashes.

This manifests in a few different ways on different versions:
3.0: Either makes it to the Apply screen, then crashes on Apply or Cancel,
     or opens an empty "check for duplicates" screen (with disabled Next button), then crashes on Cancel
2.6.21: If there is only one transaction in the .qif file, successfully imports, without creating the transaction (but creates accounts).  If there are multiple transactions in the .qif file, reports an error when attempting to apply (reported as two errors: Error while importing QIF, Error while searching for duplicates).
2.6.9 (and earlier): As in 2.6.21, but with only the first error reported.
Comment 1 John Ralls 2018-06-15 22:01:21 UTC
Thanks for reporting this, it's fixed in git. In addition to no longer crashing GnuCash if there's an unhandled Guile exception in the import, it will also wait after loading the file to show you the errors about the unhandled XFR tag, and report when there's a transaction without two accounts as is the case in your sample.

Fix will be in tomorrow's nightly and 3.2.
Comment 2 John Ralls 2018-06-30 00:08:25 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=795272. Please update any external references or bookmarks.