GnuCash could not obtain the lock....

Mike or Penny Novack stepbystepfarm at mtdata.com
Sat Jan 24 18:28:50 EST 2015


If that's not it either the hopefully someone else will chime in.

OK, I will describe the lock process (it is one used by MANY programs).

It is based around the concept that the security of many operating 
systems allows a program to check for the existence of a file whether or 
not it has access rights to the file (whether allowed to open it) and 
whether or not another program is using the file at the time.

So ...... when gnucash opens a file (opens a set of books) it creates a 
(temporary) file in the same directory with same name except with the 
extension .lck. When gnucash closes down that file (that set of books) 
it deletes the lock file. If you start gnucash and ask it to open a file 
it checks for the existence of the lock file (that would be created for 
that file name) and if it finds one says it can't open the file (can't 
get a lock because some other instance of the program has it -- OR of 
course, some previous run terminated improperly, never deleted the lock, 
so it has been left behind.

Go into the directory (sorry, the file folder for those who ONLY speak 
Windowese) where the file lives that is your books. Do you see a lock 
file? (same name except for the .lck or something similar). If gnucash 
isn't running, that lock file shouldn't exist. Delete it and then try 
opening your file.

Michael

PS: Some programs that use this same lock technique do not provide an 
"override" button. With them you always have to go in and delete lock 
files left behind, say following a crash.


More information about the gnucash-user mailing list