GNOME Bugzilla – Bug 505921
opening a 2.2.1 file with an open transaction report crashes in 2.2.2 and svn
Last modified: 2018-06-29 21:57:27 UTC
I tried to open in as well 2.2.2 as svn a file, which I saved with 2.2.1. The file contained some open reports. Gnucash crashed with the following backtrace: Backtrace: In current input: 1: 0* (let* ((options #)) (let* (#) (# option)) (let (#) (# option)) ...) 1: 1* (let* ((option #)) ((lambda # #) option)) 1: 2* [gnc:lookup-option #f "Sorting" "Primary Key"] In /home/frank/unstable/gnucash/share/gnucash/scm/options.scm: 1467: 3 ((options (quote lookup)) section name) 1467: 4* [#f lookup] /home/frank/unstable/gnucash/share/gnucash/scm/options.scm:1467:4: In expression (options (quote lookup)): /home/frank/unstable/gnucash/share/gnucash/scm/options.scm:1467:4: Wrong type to apply: #f /tmp/gnucash.trace is empty. ~/.gnucash/books/theresponsiblefile contained: [Page 2] PageType=GncPluginPageReport PageName=Buchungsbericht SchemeOptions=(let ((options (gnc:report-template-new-options/name "Buchungsbericht"))) (let ((option (gnc:lookup-option options "Sorting" "Primary Key"))) ((lambda (option) (if option ((gnc:option-setter option) 'date))) option)) (let ((option (gnc:lookup-option options "Sorting" "Secondary Subtotal for Date Key"))) ((lambda (option) (if option ((gnc:option-setter option) 'none))) option)) (let ((option (gnc:lookup-option options "General" "To"))) ((lambda (option) (if option ((gnc:option-setter option) '(relative . end-accounting-period)))) option)) (let ((option (gnc:lookup-option options "General" "From"))) ((lambda (option) (if option ((gnc:option-setter option) '(relative . start-accounting-period)))) option)) (let ((option (gnc:lookup-option options "Accounts" "Void Transactions?"))) ((lambda (option) (if option ((gnc:option-setter option) 'both))) option)) (let ((option (gnc:lookup-option options "Display" "Sign Reverses?"))) ((lambda (option) (if option ((gnc:option-setter option) 'none))) option)) (let ((option (gnc:lookup-option options "Display" "Account Name"))) ((lambda (option) (if option ((gnc:option-setter option) #t))) option)) (let ((option (gnc:lookup-option options "Display" "Running Balance"))) ((lambda (option) (if option ((gnc:option-setter option) #t))) option)) (let ((option (gnc:lookup-option options "Display" "Amount"))) ((lambda (option) (if option ((gnc:option-setter option) 'double))) option)) (let ((option (gnc:lookup-option options "Display" "Account Code"))) ((lambda (option) (if option ((gnc:option-setter option) #t))) option)) (gnc:restore-report 0 "Buchungsbericht" options)) Annotation: Buchungsbericht (de) = transaction report (en) If I remove this section, it works fine. This bug is possible a relative of Bug 345824.
We made some exploration this night. The protocol is on http://lists.gnucash.org/logs/2007/12/2007-12-27.html#T19:24:52 In the changeset of po.de I didn't see any changes in the translation, which I in my eyes would affect the txn report. So may be, it could be a problem with the currency conversions. If not crashing in 2.2.2 I get a lot of warnings in the form: ;;; WARNING (gnc:resolve-unknown-comm: Oops - exchange rate ambiguity error: USD 2.000,00 = INR 87.960,00) ;;; WARNING (gnc:get-commodity-totalavg-prices: Sorry, currency exchange not yet implemented: USD 100,00 (buying INR 4.530,00 ) =? 0,00 €) The last repeated many times. If it helps to come closer, I would apply the patch, Andrew offered.
Today we made a few further tests: http://lists.gnucash.org/logs/2007/12/2007-12-30.html#T01:42:12 I think, we can exclude Andrews changes as cause. In my eyes the next possible cause is switching between LANG=C and DE. Test will be: Start in 2.2.1 in one language, create the report, save, reopen in 2.2.2 in other language. And then try it the other way.
Created attachment 101882 [details] books_2.2.1to2_options.diff Today I tried to create the same txn report in 2.2.2. To make it better readable and comparable, I broke every (let in a new line. The difference is evident. In 2.2.1 "Transaction Report" was a translatable string, in 2.2.2 it is no more. The good news: after replacing "Buchungsbericht" with "Transaction Report", I can open the file again. The bad news: This affects not only Transaction Reports, but ALL translated report names.
This is pretty clearly a problem that results from the use of translatable strings as internal report identifiers. The 2.2.1 books file looks for the Buchun... report which no longer exists because those strings are no longer translated (apparently. when did that happen?). Additionally, if a report name were to change internally this would cause all open reports that use that report as well as saved reports that use that report's renderer to fail. We need a better method for handling this. Meanwhile the work-around is to replace the translated strings with nice new english versions. That will get the file open and usable.
Fixed in r16836. This bug is a dupe of bug #345824. *** This bug has been marked as a duplicate of 345824 ***
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=505921. Please update any external references or bookmarks.