GNOME Bugzilla – Bug 593906
GnuCash crashes at creating account report
Last modified: 2018-06-29 22:28:03 UTC
GnuCash 2.3.4 and 2.3.5 crashes when clicking the Account Report menu item. The same happens when clicking Account Transaction Report menu item. My OS is Linux Debian Lenny.
Can you provide a stack trace? See http://wiki.gnucash.org/wiki/Stack_Trace. Please attach as an attachment to this bug.
I'm seeing the same problem. I tracked it down to the set of changes made in r18253 to automatically load all the reports in the standard-reports directory. This changed standard-reports.scm to use resolve-module instead of use-modules to load reports. One difference between these two is that resolve-module doesn't make the interface for the loaded module available to the module containing the call to resolve-module. This causes a crash when gnc:register-report-create in standard-reports.scm tries to call gnc:register-report-create-internal which is located in register.scm (one of the modules loaded using resolve-module). I fixed it by explicitly defining that interface using the "@" guile function after the modules are loaded. You could also probably just add back a call to use-module for that module, but this seems to work and makes it explicit what interface is needed. I'll attach a patch.
Created attachment 143321 [details] [review] Patch to fix this problem.
*** Bug 595517 has been marked as a duplicate of this bug. ***
Comment on attachment 143321 [details] [review] Patch to fix this problem. r18352, thanks a lot!
I just built gnucash from svn head, rev 18359, and I now get a crash on startup with this error: In /usr/local/share/gnucash/guile-modules/gnucash/report/standard-reports.scm: 160: 27* (define gnc:register-report-create-internal #) 160: 28* (@ # gnc:register-report-create-internal) /usr/local/share/gnucash/guile-modules/gnucash/report/standard-reports.scm:160:45: In expression (@ (gnucash report standard-reports ...) gnc:register-report-create-internal): /usr/local/share/gnucash/guile-modules/gnucash/report/standard-reports.scm:160:45: Unbound variable: @ It seems related to this bug. Do I have a bad version of guile? I think I'm using guile-1.6-dev, 1.6.8-6.3ubuntu1.
Patch reverted in r18360: The bugfix was using the guile function "@" which apparently isn't available on quite a number of platforms, including the Windows guile-1.6.8 which we're shipping in our windows binary. So we need to fix the original bug in a different way without the "@" function.
Created attachment 144682 [details] [review] Patch that doesn't use the "@" function Since the "@" function doesn't exist in some versions of Guile, patch it the way I suggested in comment 2 by calling use-modules for the register report module.
r18396, thanks a lot!
please see bug 599891
*** Bug 599891 has been marked as a duplicate of this bug. ***
Unfortunately this change doesn't work on Windows and for this reason I've reverted this in r18400. On Windows with this line added, the splash screen will show the module loading until standard-reports, then every gnucash window disappears. No message in .trace and (because we've disabled console output on windows) no console output. I didn't have access to a debugger to see where a debugger would end up here. I can only guess this (use-modules ...) implies some sort of library loading order which for whatever reason doesn't work on windows but works fine on Linux...
The change in r18400 breaks the reports on Linux: [...] Unbound variable: gnc:register-report-create-internal How to fix this on all supported platforms?
Comment on attachment 144682 [details] [review] Patch that doesn't use the "@" function Patch was reverted again because this change still doesn't work on windows.
*** This bug has been marked as a duplicate of bug 598213 ***
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=593906. Please update any external references or bookmarks.