r18352 - gnucash/trunk/src/report/standard-reports - Bug #593906: Fix crash at creating account report

Christian Stimming cstim at code.gnucash.org
Mon Sep 28 13:32:04 EDT 2009


Author: cstim
Date: 2009-09-28 13:32:04 -0400 (Mon, 28 Sep 2009)
New Revision: 18352
Trac: http://svn.gnucash.org/trac/changeset/18352

Modified:
   gnucash/trunk/src/report/standard-reports/standard-reports.scm
Log:
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 at tuhh.de>

Modified: gnucash/trunk/src/report/standard-reports/standard-reports.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/standard-reports.scm	2009-09-28 17:28:27 UTC (rev 18351)
+++ gnucash/trunk/src/report/standard-reports/standard-reports.scm	2009-09-28 17:32:04 UTC (rev 18352)
@@ -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)



More information about the gnucash-changes mailing list