*** Regarding Crash report: gnucash 1.2.3 on stock redhat 6.0; Patrick
    Spinler <[EMAIL PROTECTED]> adds:

Patrick> In the accounts windows with no subaccounts displayed, select
Patrick> the "Bank Accounts" line, and from the "Account" menu, select
Patrick> "Open subaccounts".

Try the enclosed patch and see if that fixes the bug.  The patch is
based on GnuCash 1.1.27 but hopefully it will be applicable to your
version.  The bug happens in cases where xaccGroupToList() needs to do
a recursive call of itself, i.e., when the account tree is at least
two levels deep below the account on which the open subaccounts
operation is performed on.  The problem is that the 0'th element of
the childlist is copied twice to the main list, which causes the main
list to be overrun at the end, which in turn causes the core dump
inside free().

I just tried the patch, and while I think the patch fixes a real bug
it doesn't fix all segmentation faults in the `Open Subaccounts'
operation, unfortunately.

diff -u -r1.1.1.1 LedgerUtils.c
--- LedgerUtils.c       1999/04/15 02:34:21     1.1.1.1
+++ LedgerUtils.c       1999/08/22 05:39:48
@@ -98,8 +98,8 @@
             while (childacc) {
               n++;
               list[n] = childacc;
-              childacc = childlist[ic];
               ic ++;
+              childacc = childlist[ic];
             }
             _free(childlist);
          }

-- 
Per Bojsen                                        <[EMAIL PROTECTED]>
6132 Lexington Ridge Drive
Lexington, MA 02421-8317
USA

Reply via email to