Created attachment 373240 [details] Trace record of the bug Transaction report is working fine EXCEPT if you choose MONTH as the sorting key. I'm using the french version of GnuCash with Windows 7. In the preferences Hour/day is YYYY-MM-DD (same as ISO) included is the trace record for the error. Denis
I suspect your bug has been fixed in current development version, for release in approx 2 months' time. Please try a recent build at https://code.gnucash.org/builds/win32/maint/ (sort by Last-Modified and grab the latest) and try again.
With the current development version I get the same results. Again, all sorting keys works fine EXCEPT the month. Denis
Created attachment 373288 [details] screenshot fr_FR I run Windows 10 in English (Australia). I have set both LANG and LANGUAGE to fr_FR. Mine does not crash however month names are not translated. See screenshot.
#vu8(102 233 118 114 105 101 114 32 50 48 49 57) corresponds to "Février 2019". As a test can you modify the file date-utilities.scm so that --->--- (define (gnc:date-get-month-string datevec) (gnc-locale-to-utf8 (strftime "%B" datevec))) (define (gnc:date-get-month-year-string datevec) (gnc-locale-to-utf8 (strftime "%B %Y" datevec))) ---<--- becomes --->--- (define (gnc:date-get-month-string datevec) (strftime "%B" datevec)) (define (gnc:date-get-month-year-string datevec) (strftime "%B %Y" datevec)) ---<--- and try again?
I made the modifications to the file date-utilities.scm I get the same results. I don't see any modification from one to the other. Denis
Just a precision: I'm using Windows 7 in french Canada. Denis
Strange. How about --->--- (define (gnc:date-get-month-string datevec) (date->string "~B" (gnc-mktime datevec))) (define (gnc:date-get-month-year-string datevec) (date->string "~B ~Y" (gnc-mktime datevec))) ---<---
Oops need to swap these parameters --->--- (define (gnc:date-get-month-string datevec) (date->string (gnc-mktime datevec) "~B" )) (define (gnc:date-get-month-year-string datevec) (date->string (gnc-mktime datevec) "~B ~Y")) ---<---
addendum the date->string requires srfi-19 so trying the above will need (use-modules (srfi srfi-19)) somewhere at the top
I made those modifications. But now Gnucash just start, shows the opening window and close at once. Denis
Bug confirmed part of guile-2.2 I think we'll need to write a gnc_strftime function as a hack until guile-2.2 is fixed. http://lists.gnu.org/archive/html/bug-guile/2019-05/msg00005.html
We already have a bunch of date and date-time formatting functions, see libgnucash/engine/gnc-date.h. We also build our own guile-2.2 for Windows so we can apply the patch ourselves.
@Denis Ok last attempt - change to the following -- also remove (use-modules (srfi srfi-19)) if you've added at the top. -->-- (define (gnc:date-get-month-string datevec) (gnc-print-time64 (gnc-mktime datevec) "%B")) (define (gnc:date-get-month-year-string datevec) (gnc-print-time64 (gnc-mktime datevec) "%B %Y")) --<--
SUCCESS!!! Everything back to normal and working fine. What more to say then congradulation for your never ending support and expertise. Problem solve. Denis
You're welcome; thanks to your report, a bug was found in guile which will be fixed and propagated. There are other uses of strftime in code -- is it worth changing all of them?
(In reply to Christopher Lam from comment #15) > There are other uses of strftime in code -- is it worth changing all of them? Yes.
*** Bug 780475 has been marked as a duplicate of this bug. ***