GNOME Bugzilla – Bug 644952
GnuCash crashes when accessing tax reports on files generated on earlier versions (probably 2.2)
Last modified: 2018-06-29 22:55:06 UTC
Created attachment 183571 [details] Test case When opening files with tax report settings created in earlier versions of guncash (probably of the 2.2 series), gnucash 2.3 and 2.4 crashes. Since 2.3.13 worked for some time for me, the crash might be related to the absence of the --enable-locale-tax configure flag as discussed on IRC. The crash occurs when you either access the tax report settings or open business related accounts in the account tree on the accounts tab (unfolding the tree branch is enough to trigger it). The source of the crash is apparently the type setting "Ind" for the tax report as present in the xml file. Attached is a somewhat minimal test case. It crashes for me as soon as you unfold the "Firma" account tree (or go to the tax report settings).
/tmp/gnucash.trace: * 21:54:40 CRIT <gnc.gui> [gnc_configure_reverse_balance()] bad value '(null)' Backtrace: In unknown file: ?: 0* [gnc:txf-get-form (# # # # ...) K81 "Ind"] In /opt/gnucash-2.4.4/share/gnucash/scm/txf.scm: 47: 1* [gnc:txf-get-code-info (# # # # ...) K81 1 ...] 83: 2 (let* (# #) (and category #)) 83: 3* [cdr #f] /opt/gnucash-2.4.4/share/gnucash/scm/txf.scm:83:28: In procedure cdr in expression (cdr (assv # categories)): /opt/gnucash-2.4.4/share/gnucash/scm/txf.scm:83:28: Wrong type argument in position 1: #f
Hi Tobias, thanks for your test case. I can not reproduce the crash with a fresh built r 20426. So I would like to assume you used a build without --enable-locale-tax. If you built it self, can you check in your build dir config.log for the used options? If not, you should ask your packet maintainer to compile it with --enable-locale-tax. If that is the solution, we should think about making --enable-locale-tax the default, because it is annoying that the german business users are having crashes.
The crashing version was compiled without the flag, I can assure that (compiled it just yesterday myself). The working version (2.3.13) I used before was probably compiled with it, but I cannot say that for sure. I remember compiling it myself when I switched to Ubuntu about half a year ago, but apparently I either deleted the original source dir or dist-cleaned it up afterwards, the source dir I did have was in an un-./configure-d state when I wanted to use it to uninstall 2.3.13.
Tobias, can you run configure --enable-locale-specific-tax <your other options> make && make install gnucash and report the result?
I did, here are the results: - I first tried the test case I uploaded. I was able to unfold the "Firma" subtree, but as soon as I opened the first subtree of that, gnucash crashed. - Afterwards I tried some backups I had and gnucash pretty much immediately crashed. I suspect that somewhere in the settings the offending subtree is already open. - Fixed files do not show this behavior, so it is still tax report related With the test case I get a simple segfault with the following logged to gnucash.trace: * 12:07:36 CRIT <gnc.gui> [gnc_configure_reverse_balance()] bad value '(null)' With an old backup I get: * 12:08:23 WARN <gnc.io> [taxtable_reset_refcount()] Fixing refcount on taxtable 33a0acd29b70d04ff93ec4e5f76aec46 (4 -> 1) * 12:08:23 CRIT <gnc.gui> [gnc_configure_reverse_balance()] bad value '(null)' There is also a backtrace which I will attach.
Created attachment 183705 [details] Crash backtrace
Alex,any idea?
Tobias, can you test the instructions in https://bugzilla.gnome.org/show_bug.cgi?id=645518#c11 I believe, it is the same. If yes, mark this as duplicate.
Crash fixed in r20498, so apparently it is indeed a duplicate. *** This bug has been marked as a duplicate of bug 645518 ***
Reassign version to 2.4.x so that individual 2.4 versions can be retired.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=644952. Please update any external references or bookmarks.