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 <stimming@tuhh.de>

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18352 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2009-09-28 17:32:04 +00:00
parent b2ee808ba6
commit 3a01c28043

View File

@ -157,6 +157,9 @@
(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)