From 3a01c280434a0e1608f916e163717e06b3689fbd Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Mon, 28 Sep 2009 17:32:04 +0000 Subject: [PATCH] Bug #593906: Fix crash at creating account report Patch by Mike Alexander: 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. Signed-off-by: Christian Stimming git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18352 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/report/standard-reports/standard-reports.scm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/report/standard-reports/standard-reports.scm b/src/report/standard-reports/standard-reports.scm index 591b62590d..781a884a6d 100644 --- a/src/report/standard-reports/standard-reports.scm +++ b/src/report/standard-reports/standard-reports.scm @@ -156,6 +156,9 @@ (for-each (lambda (x) (resolve-module (append '(gnucash report standard-reports) (list x)))) (get-report-list)) + +(define gnc:register-report-create-internal (@ (gnucash report standard-reports register) + gnc:register-report-create-internal)) (use-modules (gnucash gnc-module)) (gnc:module-load "gnucash/engine" 0)