Bug: File version number [was Re: SOLVED: 1.7 & 1.6.1-2 cannot co-exist?]

Linas Vepstas linas@linas.org
Tue, 17 Jul 2001 13:09:42 -0500


On Tue, Jul 17, 2001 at 09:59:25PM +1000, Jonathan David Wheelhouse was heard to remark:
> Problem solved (thanks in part to Linas).
> 
> Linas suggested but I had discounted the idea of 1.7 modifying the
> file because I had done a diff between the current data file and an
> earlier one, one that should have been untouched by 1.7.  The diff
> only showed some transaction I had added.  However, there was the
> following difference with files that the stable version of gnucash
> could use and ones that it couldn't use (much earlier ones).
> 
> The files that stable gnucash died on all had the following element:
> 
> <gnc:template-transactions>
> </gnc:template-transactions>

Ah yes ... this is the support for scheduled transactions that is being 
added to gnucash-1.7.

> When I removed that element gnucash worked.
> 
> And, in hindsight, the strace and debug options were telling me that
> there was a problem with that snippet of XML:
> 
> write(2, "Error: sixtp_sax_start_handler: ", 32) = 32
> write(2, "Tag <gnc:template-transactions> "..., 64) = 64
> 
> #<procedure gnc:reldError: sixtp_sax_start_handler: Tag <gnc:template-transactions> not allowed in current context.

Well, this still illustrates a bug in gnucash 1.6 and also possibly in 1.7:
The version gnucash-1.6 xml code is failing to check for the file version 
number correctly, (and rejecting the newer versions with a 
a ERR_FILEIO_FILE_TOO_NEW error).  (The XML code seems not to use any of 
the ERR_FILEIO error returns, as a quick grep will demonstrate.  Again,
grep FileDialog.c for ERR_FILEIO for sample usage and sample output.)
(It seems that the XML code is using its own error subsystem that is
independent of the backend error subsystem, and its not hooked into the 
GUI.)  (I've been planning on making a few enhancements to the backend
error reporting subsystem, to remove some crud and add some features,
so if anyone has requests, now is a good time to bring them up ...)

Separately, its possible that gnucash-1.7 failed to bump the version
number when it added scheduled transaction support.

> And thanks also to Bill for his suggestion on how to keep versions of
> gnucash separate.  Obviously, I will also keep the data files separate
> too :)

NB, there is also the potential for version number conflicts in the
preferences/default settings stored in ~/.gnucash  I don't know what the
philosophy for dealing with that is ....

--linas


-- 
Linas Vepstas -- linas@gnumatic.com -- http://www.gnumatic.com/