Strange error while working on RPC backend

Dave Peticolas dave@krondo.com
Wed, 14 Mar 2001 17:05:42 -0800


Derek Atkins writes:
> Here is the server log to show which RPCs get called, and in what
> order.  If I try to open it a third time, I get a SEGV in malloc() in
> the server.  However, if I kill the server and restart it, then I can
> open the file again (and yes, the changes are in the file).
> 
> If you have specific questions about operations of these server-side
> functions, I can either send you the source for the server (it's
> basically one file) or I can answer specific questions.  I tried to
> make the functions names relatively indicative of the actual
> functionality.

I think what is happening is that the old book isn't being
destroyed. For flat-file backends, some of what should probably
be done in gnc_book calls is handled in src/FileDialog.c, due
to historical reasons. We plan on cleaning this up, but for
now you might try doing what gnc_book_destroy is doing during
the rpc server gnc_book_end call. I.e., make sure the book
contents (account group & pricedb) are being destroyed.

dave