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 719481 - GnuCash report crashes with Guile2
GnuCash report crashes with Guile2
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Reports
git-master
Other Linux
: Normal major
: ---
Assigned To: gnucash-reports-maint
gnucash-reports-maint
Depends on:
Blocks:
 
 
Reported: 2013-11-28 10:18 UTC by Aurimas Fišeras
Modified: 2018-06-29 23:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Custom report for testing (2.55 KB, application/octet-stream)
2013-11-28 10:18 UTC, Aurimas Fišeras
Details
Backtrace (26.93 KB, text/x-log)
2013-11-28 10:28 UTC, Aurimas Fišeras
Details

Description Aurimas Fišeras 2013-11-28 10:18:28 UTC
Created attachment 263011 [details]
Custom report for testing

This [1] message encouraged me to recompile GnuCash SVN with Guile2 and test it.

What I found was that one of my custom report now crashes GnuCash, but only if I run GnuCash in Lithuanian.

How to reproduce:
1. Compile GnuCash from SVN and install it. I use:
./configure --disable-dbi --enable-debug --enable-compile-warnings --disable-error-on-warning --prefix=~/opt/gnucash-git/
2. Run it with:
LANGUAGE=lt_LT.UTF-8 ~/opt/gnucash-git/bin/gnucash
3. Open the custom report (attached).
4. GnuCash crashes (backtrace attached).

If I run GnuCash with:
LANGUAGE=en_US.UTF-8 ~/opt/gnucash-git/bin/gnucash
there is no crash.

If I compile GnuCash with Guile 1.8, there is no crash.

I'm using Ubuntu 14.04 64-bit, guile 2.0.9.

[1] http://lists.gnucash.org/pipermail/gnucash-devel/2013-November/036492.html
Comment 1 Aurimas Fišeras 2013-11-28 10:28:53 UTC
Created attachment 263012 [details]
Backtrace
Comment 2 Geert Janssens 2013-11-28 15:15:32 UTC
Thank you for your report.

I tried your custom report on Fedora 19 in Lithuanian. I don't even get as far as loading gnucash. It crashes already at startup.

My Lithuanian is rather poor... Can you translate this string for me:
Kuriama ataskaita „Operacijų ataskait",

It appears in my backtrace, followed by "<incomplete sequence \342>". Your backtrace also trips over an incomplete sequence, although at a different spot.

It sure looks like some encoding mismatches, but where to begin ?
Comment 3 Aurimas Fišeras 2013-11-28 15:29:02 UTC
(In reply to comment #2)
> Thank you for your report.
> 
> I tried your custom report on Fedora 19 in Lithuanian. I don't even get as far
> as loading gnucash. It crashes already at startup.
Then it probably means that you have an open page with some report that GnuCash tries to calculate and crashes.

For me it also crashed at startup until I isolated what [Page x] was at fault in my .gnucash/books/test.gnucash.gcm

> 
> My Lithuanian is rather poor... Can you translate this string for me:
> Kuriama ataskaita „Operacijų ataskait",
It is this string:
#. src/report/report-system/report-utilities.scm
#: ../intl-scm/guile-strings.c:2374
#, c-format
msgid "Building '%s' report ..."
msgstr "Kuriama ataskaita „%s“..."

and this:
#. src/report/standard-reports/transaction.scm
#: ../src/gnome/gnc-plugin-page-register.c:2557
#: ../src/gnome/gnc-plugin-page-register.c:2575
#: ../intl-scm/guile-strings.c:4320
msgid "Transaction Report"
msgstr "Operacijų ataskaita"
Comment 4 Aurimas Fišeras 2013-11-29 20:12:17 UTC
(In reply to comment #2)
> Thank you for your report.
> It sure looks like some encoding mismatches, but where to begin ?
Yes, it is some kind of a problem with utf-8. And it is not related to the LANGUAGE setting.

Run:
LANGUAGE=en_US.UTF-8 ~/opt/gnucash-git/bin/gnucash
Open any register, edit the description of any transaction to something like "æææææ".
Copy this transaction. The new transaction's description is shortened, garbage added at the end.
And:
cat /tmp/gnucash.trace shows:
* 22:09:47  WARN <Pango> Invalid UTF-8 string passed to pango_layout_set_text()
* 22:09:48  WARN <Pango> Invalid UTF-8 string passed to pango_layout_set_text()
Comment 5 Geert Janssens 2013-12-13 20:26:35 UTC
I found the problem, but unfortunately it's not in GnuCash code, but in code automatically generated by a tool called swig (which we are using internally).

So the proper fix would need to be sent to the swig project. I'm working on that, but it will take some time before it trickles down to the supported distributions.

So I have added a workaround in the gnucash code that we can remove again once swig is fixed. This has been committed in r23557.
Comment 6 John Ralls 2018-06-29 23:22:05 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=719481. Please update any external references or bookmarks.