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 360058 - GnuCash crashes on QIF-import after changing account's separator to * (asterisk)
GnuCash crashes on QIF-import after changing account's separator to * (a...
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: Import - QIF
2.0.x
Other All
: Normal critical
: ---
Assigned To: Derek Atkins
Derek Atkins
: 504248 (view as bug list)
Depends on:
Blocks: backport
 
 
Reported: 2006-10-06 02:34 UTC by Arkadi
Modified: 2018-06-29 21:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (1.59 KB, patch)
2008-01-23 02:29 UTC, Charles Day
none Details | Review
Proposed patch (revised) (1.88 KB, patch)
2008-01-24 00:26 UTC, Charles Day
committed Details | Review

Description Arkadi 2006-10-06 02:34:01 UTC
Steps to reproduce:
1.Edit->Preferences->Accounts->Separator Character 
change the existing character to  *     (asterisk)

try to import any QIF -file into any account - the GnuCash window disappear


2. 
3. 


Stack trace:
arkadi@Gel-desktop:~/docs$ /usr/bin/gnucash&
[1] 7806
arkadi@Gel-desktop:~/docs$ gnucash: [M] "Found Finance::Quote version ""1.11"
Backtrace:
In unknown file:
  ?: 0* [qif-import:update-stock-hash # # #]
In /usr/share/gnucash/scm/qif-import/qif-dialog-utils.scm:
 593: 1* (let ((names #)) (hash-fold (lambda # #) #f ...) ...)
 594: 2* [hash-fold #<procedure #f (qif-name map-entry p)> #f ...]
In unknown file:
  ?: 3* [#<procedure #f #> "in" # #f]
In /usr/share/gnucash/scm/qif-import/qif-dialog-utils.scm:
 596: 4* (let ((stock-name #)) (if (and stock-name # # ...) (let* # #)) #f)
 596: 5* [qif-import:get-account-name "in"]
 567: 6* (if (not qif-import:account-name-regexp) (let* # #))
 568: 7  (let* (# #) (set! qif-import:account-name-regexp #))
 572: 8  (set! qif-import:account-name-regexp (make-regexp newstr))
 572: 9* [gsubr-apply #<primitive-procedure make-regexp> "*([^*]+)$|^([^*]+)$"]

/usr/share/gnucash/scm/qif-import/qif-dialog-utils.scm:572:46: In
procedure make-regexp in expression (make-regexp newstr):
/usr/share/gnucash/scm/qif-import/qif-dialog-utils.scm:572:46: Invalid
preceding regular expression

[1]+  Exit 2                  /usr/bin/gnucash
arkadi@Gel-desktop:~/docs$

Other information:
Comment 1 Christian Stimming 2006-11-23 10:55:23 UTC
(Almost) Same issue as in bug#341414 although only in the '*' case it also will cause a crash.
Comment 2 Charles Day 2008-01-23 02:29:20 UTC
Created attachment 103510 [details] [review]
Proposed patch

This patch fixes the bug by rewriting qif-import:get-account-name to avoid use of regular expressions. The new algorithm is simpler and faster anyway.
Comment 3 Charles Day 2008-01-24 00:26:54 UTC
Created attachment 103586 [details] [review]
Proposed patch (revised)

A slight addition to the previous patch: I've removed the "use-modules (ice-9 regex)" call since it is no longer necessary.
Comment 4 Charles Day 2008-02-21 21:10:59 UTC
Patch committed as r16949. Requesting backport for 2.2.4.
Comment 5 Andreas Köhler 2008-02-28 22:25:42 UTC
Applied to branches/2.2 as r16968 for GnuCash 2.2.4.
Thanks a lot!
Comment 6 Charles Day 2008-03-27 23:52:40 UTC
*** Bug 504248 has been marked as a duplicate of this bug. ***
Comment 7 John Ralls 2018-06-29 21:13:24 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=360058. Please update any external references or bookmarks.