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

James LewisMoss jimdres@mindspring.com
17 Jul 2001 14:22:28 -0400


>>>>> On Tue, 17 Jul 2001 13:09:42 -0500, linas@linas.org (Linas Vepstas) said:

 Linas> On Tue, Jul 17, 2001 at 09:59:25PM +1000, Jonathan David
 Linas> 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>

 Linas> Ah yes ... this is the support for scheduled transactions that
 Linas> 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.

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

What cruft and what features?  I've been working on this code recently
turning the file backend into a true backend and have made changes in
many places at this point.

I was planning on (well already written, but not plugged in yet)
writing an EngineError/EngineErrorQueue set of objects to hold
errors.  At the moment the queue is just a GList with some convience
functions and the Error is an int code and a char *message (should be
easy to add other things later if needed).

Jim

-- 
@James LewisMoss <dres@debian.org>      |  Blessed Be!
@    http://jimdres.home.mindspring.com |  Linux is kewl!
@"Argue for your limitations and sure enough, they're yours." Bach