GNOME Bugzilla – Bug 759907
Import of QIF file crashes GnuCash
Last modified: 2018-06-29 23:45:21 UTC
A newly installed copy of GnuCash on Windows silently crashes when trying to import a QIF file. I did a bit of digging, and it turns out the trace file containts the following: "WARN <gnc.app-utils> Could not spawn perl: Failed to execute child process (No such file or directory)." Importing is one of the first things one will do with GnuCash, so silent failure with no indication of the problem was rather off-putting. Having just spent ages exporting from MS Money I dug a little deeper. Currently installing Strawberry Perl which I hope will fix it. 1. GnuCash ought to report such an error to the user rather than silently quitting. 2. The GnuCash installer ought to indicate / offer to install prerequisites like Perl. 3. Prerequisites should be mentioned somewhere on/near the download page.
Perl is required only for Finance::Quote. That's not what crashed GnuCash. What was at the other end of the trace file? Better yet, please attach it to the bug.
Created attachment 317936 [details] Trace file Indeed John, so it seems Perl didn't crash GnuCash. Having just downloaded and installed Strawberry Perl it still does crashes. Looking again at the attached trace it seem its something to do with lack of gtk-file. Surprised this is causing the crash and not so sure how to fix it.
Created attachment 317939 [details] Trace file showing only the problem with gtk-file (after installing Perl)
That's interesting, but I doubt it has anything to do with the crash. It's just complaining about a missing icon. Please attach the *whole* trace file.
For fun I tried dropping http://sourceforge.net/projects/gtk-mingw/files/hicolor-icon-theme/hicolor-icon-theme-0.12-binwin32.7z/download in C:\Program Files (x86)\gnucash\share\icons. That produced a completely blank trace file. So I guess it's not the GTK warning either...
Created attachment 317940 [details] --debug --extra trace file That *WAS* the whole trace file! Attached is one from gnucash.exe --debug --extra. Doesn't seem to offer a whole lot more (to my eyes).
I should probably also say I'm running this one a relatively clean (new) Windows 10 Home version 1511 build 10586.36 system.
Hmm. Seems to be crashing in gnc_ui_qif_import_account_match_prepare(). There are a couple of possibilities, but they should put up the "Gnucash terminated unexpectedly" dialog box. Do they not?
Nope, it just conks out. There one minute. Gone the next. No crash dialog. Not even a Windows one. I guess the other important thing is the QIF file I'm trying to import is coming from an old cop of Microsoft Money. Is there a known good QIF file knocking around somewhere that I can try to see if it's the file or my set-up that's causing the problem?
I found this pretty quickly: https://gist.github.com/robertbasic/2633519 There are others if you google "gnucash sample qif". How far are you actually getting? It looks from the trace file that you're crashing before you designate a file.
Ah, the magic 'GnuCash' prefix. I'd tried "sample QIF" to no avail (although I now see that Gist was the bottom item). That sample has the same behaviour. I wondered if it was a path issue, but C:\Users\Mat\Documents\import.qif fails the same way. I get a good way through the import assistant: 1. Import QIF Files 2. Select a QIF file to load 3. Load QIF files 4. Set a date format for this QIF file 5. Set the default QIF account name 6. QIF files you have loaded (I can load another file here, but the behaviouor is the same regardless) 7. Accounts and stock holdings (this is the note about matching to existing accounts) 8. *POOF* it vanished
With those instructions I can reproduce the crash.
And do so in OS X, where I get a backtrace from Scheme: In ice-9/boot-9.scm: 157: 8 [catch #t #<catch-closure 8987670> ...] In unknown file: ?: 7 [apply-smob/1 #<catch-closure 8987670>] In qif-dialog-utils.scm: 457: 6 [qif-dialog:make-category-display (#) #<hash-table 9b05250 0/31> ...] In srfi/srfi-1.scm: 619: 5 [for-each #<procedure 92be300 at qif-dialog-utils.scm:458:5 (qif-file)> (#)] 619: 4 [for-each #<procedure 92be180 at qif-dialog-utils.scm:460:8 (xtn)> (#)] 619: 3 [for-each #<procedure 92be000 at qif-dialog-utils.scm:469:17 (split)> (#)] In qif-dialog-utils.scm: 505: 2 [#<procedure 92be000 at qif-dialog-utils.scm:469:17 (split)> #] In unknown file: ?: 1 [gnc-numeric-positive-p "123.45"] In ice-9/boot-9.scm: 1381: 0 [#<procedure 8f76888 at ice-9/boot-9.scm:1380:4 (obj)> "123.45"] ice-9/boot-9.scm:1381:15: In procedure #<procedure 8f76888 at ice-9/boot-9.scm:1380:4 (obj)>: ice-9/boot-9.scm:1381:15: In procedure struct_vtable: Wrong type argument in position 1 (expecting struct): "123.45" So it's the same as bug 756335 and bug 759889. *** This bug has been marked as a duplicate of bug 756335 ***
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=759907. Please update any external references or bookmarks.