Hi,

I'm looking to replicate my stability problems in 1.3.99, so I'm looking
over my log files to try to come up with a duplicate account set.

I've got the following files:

MyMoney.gnucash.20000609091831.xac
MyMoney.gnucash.20000611151831.log <- Opened up for a peek - no changes
MyMoney.gnucash.20000611165154.log <- Crash occurred at the end of this file
MyMoney.gnucash.20000611220759.log <- Here I re-entered the data
MyMoney.gnucash.20000611221115.xac <- Paranoid saving from here
MyMoney.gnucash.20000611221355.xac
MyMoney.gnucash.20000611221600.xac
MyMoney.gnucash.20000611222123.xac
MyMoney.gnucash.20000611222504.xac
MyMoney.gnucash.20000611223124.xac
MyMoney.gnucash.20000611223356.xac
MyMoney.gnucash.20000611223828.xac
MyMoney.gnucash.20000611224103.xac
MyMoney.gnucash.20000611230056.xac
MyMoney.gnucash.20000611230133.log
MyMoney.gnucash.20000611230206.xac
MyMoney.gnucash.20000611230255.xac
MyMoney.gnucash.20000611231002.xac
MyMoney.gnucash.20000611231315.log
MyMoney.gnucash.20000611231932.xac
MyMoney.gnucash.20000611232314.xac
MyMoney.gnucash.20000613072433.log

I'm assuming that a log file is created every time I start GNUcash, and
that things are written to it as I use it.
Now, those .xac files - are they the previous data file, or are they
written in parallel with the main file? (Or copied after the main file
is written?)

While I think of it, I've managed to corrupt a main file once. I
recovered simply by copying over the most recent .xac backup file.
However, we should put into place a mechanism for avoiding this. The
usual practice in Mac programming is to:

  1. Create a temporary in the same directory as you wish to write to
  2. Write to this file
  3. When it completes sucessfully, swap the temporary file and the
     original file
  4. If not successful, warn user.
  5. Delete temporary file.

This is made easy on the mac with a system call for swapping over two
files - I presume that it just swaps the pointers from the directory
entries.

This would also detect running out of disk space. At least the user
would find out before losing their original file.

Ben.

--
Ben Stanley               |    barf  [ba:rf]  2.  "He suggested using
FORTRAN,
PhD Student               |       and everybody barfed." - From the
Shogakukan
SITACS                    |       DICTIONARY OF NEW ENGLISH (Second
Edition)
University of Wollongong  |
Australia                 |    http://www.uow.edu.au/~bds02




--
Gnucash Developer's List
To unsubscribe send empty email to: [EMAIL PROTECTED]


Reply via email to