GNOME Bugzilla – Bug 113880
QIF import should error on pre-1970 dates instead of crashing
Last modified: 2018-06-29 20:32:38 UTC
I am importing a QIF file from Quicken 2001. The process crashes while looking for duplicates. The output is shown below. I would appreciate some troubleshooting suggestions. Thanks. bash-2.05b$ gnucash & [1] 9357 bash-2.05b$ Backtrace: In unknown file: ?: 0* [gnc:group-find-duplicates # #] In /usr/share/gnucash/scm/qif-import/qif-merge-groups.scm: 38: 1* (let* (# # # # ...) (if # #) (for-each # new-xtns) ...) 55: 2* [for-each #<procedure #f (xtn)> (# # # # ...)] In unknown file: ?: 3 (if (null? rest) (letrec ((lp #)) (lp list1)) ...) ... ?: 4 (begin (f (car l)) (lp (cdr l))) ?: 5* [#<procedure #f (xtn)> #<gw:wcp <gnc:Transaction*> 0x8651878>] In /usr/share/gnucash/scm/qif-import/qif-merge-groups.scm: 57: 6 (let ((query (gnc:malloc-query))) (set! work-done (+ 1 work-done)) ...) 73: 7* (let ((date #)) (gnc:query-add-date-match-timepair query #t ...)) 74: 8 [gnc:query-add-date-match-timepair #<gw:wcp <gnc:Query*> 0x876eae0> #t ... 75: 9* [decdate (-1 . 0) #(0 0 0 7 0 0 0 0 -1 ...)] In /usr/share/gnucash/scm/date-utilities.scm: 151: 10 [moddate #<procedure #f (d1 . ds)> (-1 . 0) #(0 0 0 7 0 0 0 0 -1 ...)] ... 36: 11 [gnc:secs->timepair ... 36: 12* [car ... 36: 13* [mktime #(59 59 15 24 11 69 3 364 -1 ...)] /usr/share/gnucash/scm/date-utilities.scm:36:28: In procedure mktime in expression (mktime date): /usr/share/gnucash/scm/date-utilities.scm:36:28: Success [1]+ Exit 2 gnucash bash-2.05b$ bash-2.05b$
Remove all transactions with dates prior to 1970 and try again.
Thanks for prompt reply! Changing pre-1970 dates to 1970 allowed the import to complete. It would still help if the problem were explained in an error message, rather than the current crash. Is pre-1970 a problem in all of GnuCash or just import? Does GnuCash only support post-1970? If so, this limit will be a problem for keeping historical cost data.
Yes, GnuCash cannot store dates prior to Jan 1, 1970 in any capacity, due to the way GnuCash stores dates. So, yea, you can't store historic data that's more than 30 years old. Sorry. You're right that it should complain instead of crashing when importing data with old dates. I'll leave this open and change the topic.
Combining duplicate bug reports. *** This bug has been marked as a duplicate of 106242 ***
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=113880. Please update any external references or bookmarks.