GNUcash crashes on save - losing all changes

Vincent V vincentv at dsl.pipex.com
Thu Jul 17 11:34:21 CDT 2003


Guys

My understanding of the 'Open Anyway' option on the file lock warning is 
that the programmer was actually trying to be thoughtful, I don't think 
this option used to exist.

When GNUcash opens an accounts it writes a couple of temporary files to 
indicate that the file is in use, when it closes the accounts file it 
deletes them. If it fails to write them it assumes that they already 
exist and puts up the 'file lock' message, their existence could mean 
that someone else is using the accounts file or might be because GNUcash 
did not exit cleanly for some reason and so failed to delete them in a 
previous session. Without the 'Open Anyway' option the poor user would 
have wade through the FAQs and other documentation to find the brief 
passage that tells you that, should you receive this message, you must 
navigate to the account files' directory and delete these files by hand. 
Having to go through all this palaver is a pain for anyone and beyond 
many desktop users. So the 'Open Anyway' saves them the trouble.

Derek is right here, the 'file lock' message is a 'bug' in the sense 
that it makes some assumptions that are not always true and so doesn't 
work as the programmer probably intended or the average user might 
expect. It should distinguish between inablility to write becasue the 
file exists or for some other reason (easy to do).

If the files exist then the user should be warned that 'The accounts 
file seems to be in use' (rather than the cryptic 'GNUcash could not 
obtain the lock' - which is only meaningful to the developers) and given 
the choice to 'Open as read-only' or 'If you are sure that no one else 
is using it then Open Normally' or 'Close'

If the files do not exist then the user should be warned that "It 
appears that the directory is read - only" and given the choice to 'Open 
as read-only' or 'Close'. After all, you might want to grant someone 
read-only access to a set of accounts files (your accountant, visiting 
tax inspector for instance) so that they cannot inadvertently mess them 
up, and the simplest way is to make the directory read-only to them 
(rather than all the individual files which will be continually changing 
as the backups are written and deleted).

By the way Derek, I did as you suggested and filed the crash bug in 
bugzilla.

Vince




More information about the gnucash-user mailing list