gnclock table remains after quitting gnucash and shutdown; Only clears manually with sqlite3

Tommy Trussell tommy.trussell at gmail.com
Wed Aug 19 17:04:33 EDT 2015


On Wed, Aug 19, 2015 at 4:21 AM, John Ralls <jralls at ceridwen.us> wrote:

>
> > On Aug 19, 2015, at 5:00 AM, GWB <gwb at 2realms.com> wrote:
> >
> > I have been using the sqlite3 backend for GnuCash for well over a year
> > now and as of last week GnuCash has been reporting the "file locked"
> > error on opening.  I was able to clear the lock by using sqldiff to
> > compare a locked and unlocked file.  To unlock the file from the
> > command line:
> >
> > % sqlite3 database-name.gnucash
> > sqlite> DELETE FROM gnclock WHERE rowid=1;
> > sqlite> .exit
> >
> > Then the file opens without the lock error, but after closing GnuCash,
> > shutting down, and opening the file again, it locks and I have to
> > repeat the process.
>

...


> No need to unlock by hand. As long as you’re certain that there isn’t
> another instance of GnuCash connected to the database just select the “open
> anyway” button on the file locked dialog box.
>
> However, if GnuCash isn’t clearing the lock by itself that means that it’s
> crashing instead of shutting down. Try running it under gdb to catch the
> crash and get a stack trace. More detailed instructions at
> http://wiki.gnucash.org/wiki/Stack_Trace.
>


The repositories for Ubuntu 14.04 LTS "Trusty" (and unfortunately all
derivative distros such as Mint) contains GnuCash version 2.6.1, which has
a package error that causes it to crash on close (before cleaning up the
lock, apparently).

A workaround is to install the python-gnucash package, which will fix that
particular crash in GnuCash 2.6.1.

A better workaround is to install a more recent version of GnuCash, such as
from http://getdeb.net/



> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>


More information about the gnucash-user mailing list