[GNC] Exiting gnucash Lock file Vol 226, Issue 57
David Carlson
david.carlson.417 at gmail.com
Fri Jan 21 02:13:34 EST 2022
I am not sure that I am actually replying to the last email in this
thread. Gmail seems to shuffle messages and duplicate them until it is
impossible to figure out the order unless you go back and look at the
timestamps in all the headers, far too much work.
I am trying to reply to the messages about how to ascertain when GnuCash
has actually finished saving all the edits and closed completely, including
deleting the lock file.
In my experience, when I am ready to close the file after my last edit, I
first look in the OS window header to see if there is an asterisk in front
of the filename. If there is, then I need to use File > Save or use the
equivalent mouse action to get rid of the asterisk.
Then I move the highlight around the window until I see that buttons turn
bright when moused over. While GnuCash is 'thinking' or unable to respond
to user input for some reason the curser highlight does not work.
Then I use File > Quit, or Ctrl-Q or the X button in the OS header to close
GnuCash. At that stage, if there are any remaining pending edits that I
forgot to save, there is a pop-up pointing to one of those pending edits,
so I resolve them and repeat the File > Save, tho they should have been
resolved in the previous steps.
Last, I do not consider GnuCash to be closed until it has disappeared
completely from the workspace. That normally takes several seconds after
clicking File > Quit. I have a very large data file that takes gigabytes
of RAM when open, and sometimes I work on it from a remote location or have
other factors in play so it can sometimes take several minutes to complete
a successful file save, tho it usually takes just a few seconds. That is
why I wait for the mouse highlight to trigger the expected button color
changes or mouse over comments in addition to the missing asterisk. When I
follow that procedure, I only find the lock file to remain if GnuCash has
actually crashed.. I normally run GnuCash in a Linux environment, but in my
memory of when I used to run it in Windows, the behavior was similar, but
slower.
On Thu, Jan 20, 2022 at 8:39 AM Peter <pandem at iinet.net.au> wrote:
> Here is the testing methods I used to verify the issue I have noted.
>
> Selected a known small good gnucash data file.
> Storage Location: Local D: c: drive is Samsung SSD and D: is Seagate 2TB
> GNUCASH Storage type : XML and compressed
> Operating system: Windows 10
> GNUCASH version 4.9
> The opening method in ALL test was to use the GNUCASH icon on the
> TASKBAR and then select the recent (test) file
> If the LOCK file was not deleted it was removed using the windows File
> Explorer
>
>
>
> -----------------------------------------------------------------------------------------------------
>
> Test #1: - change, Save Button and then File->Quit
>
> Result: This was repeated 5 times each time the same result - Lock file
> was deleted and the change was Saved.
>
>
> -----------------------------------------------------------------------------------------------------
>
> Test #2 - change then File>Quit and save at 15 seconds on timer
>
> Result: In test 5 of 5 Lock file was NOT deleted and the change was NOT
> saved in the data file
> This test was actual performed more than 5 times but I did note 5 of 5
> in one contiguous run. There were a few test that asked to save the
> transaction prior to the question of save the file
> I was never able to get it to repeat twice in a row.
>
>
> -----------------------------------------------------------------------------------------------------
>
> Test #3 - change and exit File->Quit wait for the Save dialogue then let
> it time out
>
> Result: In test 5 of 5 Lock file was deleted and the change was saved in
> the data file
>
>
> -----------------------------------------------------------------------------------------------------
>
> Test #4 - change and wait for autosave then File->Quit
>
> Result: In test 5 of 5 Lock file was deleted and the change was saved in
> the data file
>
>
> -----------------------------------------------------------------------------------------------------
>
> Test #5 - change and wait for autosave then use X method
>
> Result: In test 5 of 5 Lock file was deleted and the change was saved in
> the data file
>
>
> -----------------------------------------------------------------------------------------------------
>
> Test #6 - change then use X method wait for the save dialogue and save
> at 15 seconds on timer
>
> Result: In test 5 of 5 Lock file was NOT deleted and the change was NOT
> saved in the data file
>
>
> -----------------------------------------------------------------------------------------------------
>
> Conclusion:
>
> There is an issue in exiting with the SAVE button enabled/Highlighted
> and complying with the dialogue to SAVE the Data file.
> Test#2 and Test#6
>
> Four methods of exiting that do delete the LOCK file and SAVE the latest
> changes
> A: Waiting to exit after an Autosave then File->Quit
> B: forcing a Save by using the SAVE button then File->Quit
> C: Waiting to exit after an Autosave then the X method
> D: forcing a Save by using the SAVE button then the X method
>
> X method works if you do a SAVE using the Save Button or wait till
> after an Autosave then exit via the X method
>
> There is an issue with exiting and relying on gnucash to save the data
> if gnucash produces the dialogue to SAVE the data then File->Quit or the
> X method
> The Save does not work and the LOCK file is not deleted.
>
> I cannot safely say I do not use the X method as I now have doubts
> about it, I may use it or I may not.
>
> Hope this helps someone as now I understand why sometimes it does work
> and does NOT work, there is a bug in it or is it a misinterpreted
> enhancement.
>
>
>
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>
--
David Carlson
More information about the gnucash-user
mailing list