GnuCash
Contact   Instructions
Bug 795272 - QIF importer causes application crash if action is invalid
Summary: QIF importer causes application crash if action is invalid
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Import - QIF (show other bugs)
Version: 3.0
Hardware: Other Windows
: Normal critical
Target Milestone: future
Assignee: import
QA Contact: import
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-14 20:05 EDT by Tim
Modified: 2018-06-15 18:01 EDT (History)
5 users (show)

See Also:


Attachments
.qif with two transactions that crashes GnuCash 3.0 (250 bytes, application/octet-stream)
2018-04-14 20:05 EDT, Tim
no flags Details

Description Tim 2018-04-14 20:05:37 EDT
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 18:01:25 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.