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 795039 - Crash on startup using Technicolor Style sheet in report
Crash on startup using Technicolor Style sheet in report
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Reports
3.0
Other Windows
: Normal major
: future
Assigned To: gnucash-reports-maint
gnucash-reports-maint
: 794934 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2018-04-06 17:20 UTC by Pierre DUVALLET
Modified: 2018-06-30 00:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Stylesheets (1.67 KB, application/octet-stream)
2018-04-11 12:39 UTC, Pierre DUVALLET
Details
Saved-Reports (6.67 KB, text/plain)
2018-04-11 12:41 UTC, Pierre DUVALLET
Details
Saved-Reports (11.83 KB, text/plain)
2018-04-11 21:23 UTC, Pierre DUVALLET
Details
Trace file with --debug option (1.84 KB, text/plain)
2018-04-25 16:09 UTC, Pierre DUVALLET
Details
Still crashing + Error when reporting (2.26 MB, application/octet-stream)
2018-04-26 06:30 UTC, Pierre DUVALLET
Details
Special characters are the source of crash (19.48 KB, application/octet-stream)
2018-04-26 12:12 UTC, Pierre DUVALLET
Details

Description Pierre DUVALLET 2018-04-06 17:20:07 UTC
Environment :
   Windows 10
   Gnucash 3.0
   Language : French

When restarting gnucash after having configured an account report using a Technicolor StyleSheet, the program crashes trying to load stylesheet, before loading users data.
It runs correctly with the same report using standard stylesheet.
It runs also correctly after configuring the report with the technicolor stylesheet as far as we do not close and restart the program.

To restart the program it is necessary to delete the saved-reports file.

Kind regards

Pierre
Comment 1 Bob 2018-04-11 10:36:20 UTC
Could you upload the stylesheets-2.0 file, it holds all the changes made and I am assuming one of those changes is causing the problem. It is located here for me, adjust for your settup, the folder maybe hidden...

c:\Users\"USERNAME"\AppData\Roaming\GnuCash
Comment 2 Pierre DUVALLET 2018-04-11 12:39:24 UTC
Created attachment 370789 [details]
Stylesheets

Further on I noticed that, even not using Tchnicolor Stylesheet, the crash happens after having set several account reports based on a "find" request.
Comment 3 Pierre DUVALLET 2018-04-11 12:41:36 UTC
Created attachment 370790 [details]
Saved-Reports

This saved-reports file contains 2 configured Account reports that make gnucash crashing at startup.
Comment 4 Bob 2018-04-11 17:15:57 UTC
Can you try saving a report with a name that does not have any special characters like test.

There have been other reports about paths with characters like é causing trouble so might be similar. The stylesheets-2.0 file did not have any changes and appeared to be the default one.
Comment 5 Pierre DUVALLET 2018-04-11 21:23:33 UTC
Created attachment 370823 [details]
Saved-Reports

In this Saved-reports file, It was working up to the second report (Albufeira + Collioure)  but Gnucash crashes after configuring the third report "Tchequie" (same report that was in the first file but without special character : "Tchequie" instead of "Tchéquie").
Comment 6 Pierre DUVALLET 2018-04-25 16:09:27 UTC
Created attachment 371392 [details]
Trace file with --debug option
Comment 7 John Ralls 2018-04-26 00:24:50 UTC
Comment on attachment 370823 [details]
Saved-Reports

The supposed "no accents" saved-reports-2.4 in fact has several accented characters
"Rapport des résultats de la recherche" (utf-8)
"Entrée de fonds" (utf-8)
"Rapport des résultats de la recherche" (latin-1)
"Entrée de fonds" (latin-1)

We think that this problem is down to a bug in SWIG which extended using a guile-1.8 workaround (guile-1.8 didn't support unicode) to guile-2.x that does support unicode. I've overridden that bug in https://wiki.gnucash.org/builds/win32/maint/gnucash-3.0-2018-04-24-git-3.0-88-gc44316073+.setup.exe, please test it.
Comment 8 Pierre DUVALLET 2018-04-26 06:30:14 UTC
Created attachment 371414 [details]
Still crashing + Error when reporting

Hello,
Testing 3.0-88 :
- I have the same crash when starting gnucash with saved reports that where causing the crash in 3.0,
- Starting without saved reports, when trying to generate a report, it stops with an error ("input locale conversion error" in the trace),
- I can notice that 3.0-88 is 90Mb in size compared to 3.0 wich is 120Mb, anything missing ?

Thanks for your job.

Pierre
Comment 9 Pierre DUVALLET 2018-04-26 12:12:34 UTC
Created attachment 371426 [details]
Special characters are the source of crash

Version 3.0 :
Within the "saved-reports-2 - Copie (5).8 crash" file if I replace every "é" (row 135, 158)   by "e" it does not crash anymore.

kind regards

Pierre
Comment 10 John Ralls 2018-04-26 14:22:27 UTC
(In reply to Pierre DUVALLET from comment #8)
> - I can notice that 3.0-88 is 90Mb in size compared to 3.0 wich is 120Mb,
> anything missing ?

Yeah, 30MB of translations that GnuCash doesn't use because we were pulling in all of Mingw-w64's translations.
Comment 11 John Ralls 2018-04-26 20:06:27 UTC
So (obviously in retrospect) guile-1.x wrote the file in the current codepage and trying to read that back as UTF-8 raises an exception. I've added code to catch the exception and retry with whatever the locale thinks is the right encoding. If that fails too it should log a warning and carry on instead of crashing... but very few code pages should throw exceptions, they'll just interpret the string wrong. 

Try again with tomorrow's nightly, please.
Comment 12 Pierre DUVALLET 2018-04-27 11:36:30 UTC
Hello,

Build ID: git 3.0-94-g74fd6e046+ (2018-04-26)

After several tests with various reports configuration using accented characters, I did not get any crash nor any error.

Thanks for such a rapid job.

Kind regards.

Pierre
Comment 13 Geert Janssens 2018-04-27 12:58:34 UTC
Thanks for the feedback. This fix will be released in gnucash 3.1.
Comment 14 Geert Janssens 2018-04-28 14:59:53 UTC
*** Bug 794934 has been marked as a duplicate of this bug. ***
Comment 15 John Ralls 2018-06-30 00:07:29 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=795039. Please update any external references or bookmarks.