gnucash crashes on open due to missing custom report

Jeff Hinrichs - DM&T jeffh at dundeemt.com
Sun Jan 6 17:49:53 EST 2008


On Jan 6, 2008 4:20 PM, Andrew Sackville-West <ajswest at mindspring.com> wrote:
> /me tries to veer this collision  into useful discussion...
>
> On Sun, Jan 06, 2008 at 10:50:43AM -0500, Derek Atkins wrote:
> > Hi,
> >
> > Quoting Jeff Hinrichs - DM&T <jeffh at dundeemt.com>:
> >
> > > I just encountered the following situation and want to know if I
> > > should file a bug?
> >
> > no...
>
> this bug already exists in bugzilla.
>
> >
> > > 1) create a custom report, save it, close gnucash **with the report open**
> > > 2) edit saved-reports-2.0 and remove the custom report definition
> > > 3) start gnucash and watch it die
>
> the report restoration code grabs the s-expressions from
> ~/.gnucash/books/your-file-here and executes them. The first function
> executed generates the options for the report using the report's
> option-generator functions. When the report is removed from
> saved-reports (or any where else in the report system) that code
> returns a #f. Those options are passed right into the
> gnc:restore-report* functions which aren't smart enough to handle a #f
> and the whole thing coems crashing down.
>
> The report-guid handles part of this problem by eliminating the use of
> the name as a way to connect the rpoerts together since names tend to
> be mutable over time. (ref: profit & loss vs income-statement). That
> keeps open reports from crashing when a base report changes names. But
> it doesn't help when the report is just *gone*.
>
> So, the solution is to get the gnc:restore-report* functions to be
> smart enough to handle #f options.
>
> I'll fix this up and commit shortly.
>
> A

cool.  Thanks!

-j


More information about the gnucash-user mailing list