show zero accounts option patch

Derek Atkins warlord at MIT.EDU
Tue Apr 20 10:09:50 EDT 2004

Fabien COELHO <fabien at> writes:

>> ok, this is in CVS now.
> Thanks.
> I had a "segmentation fault" yesterday night that may have been triggered
> by this patch on gnucash 1.8.8. It may be so that it explores "untested"
> code areas. If I can reproduce it, I'll send a test case.

Hmm, I don't see a SegV, but I do see a Stack Overflow due to the
recursive (but not tail-recursive) calls between use-acct?,
show-acct?, my-get-balance, and my-get-balance-nosub in
html-utilities.scm.  It seems poorly designed in the face of
show-zero-entries? being false.

I'm not exactly sure what the right approach is to fix it.  Somehow
these four functions need to be disentangled, or you need to
precompute all your values and use a lookup table rather than the
silly algorithm currently in place to compute balances on the fly for
every account over and over and over again.

I'll try to think of a way to fix it, but feel free to continue
working on it yourself.


       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL:    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available

More information about the gnucash-devel mailing list