GNOME Bugzilla – Bug 719481
GnuCash report crashes with Guile2
Last modified: 2018-06-29 23:22:05 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
Created attachment 263012 [details] Backtrace
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 ?
(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"
(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()
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.
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.