[GNC] Exiting gnucash Lock file Vol 226, Issue 57

John Layman john.layman at laymanandlayman.com
Fri Jan 21 11:09:40 EST 2022


The presence of the lock file and an unchanged XML data store would be the
expected condition if GnuCash had yet to terminate for some reason.  A
simple way in Windows to check for termination would be to run the test with
a task manager open.  GnuCash would blink out once it terminated, at which
point the presence of the lock file would conclusively indicate a failure of
some sort.  But it would also be necessary to establish that GnuCash did not
terminate abnormally for some reason.  Only then would the presence of the
lock file, etc. be a clear indication of a defect in GnuCash itself.

-----Original Message-----
From: gnucash-user <gnucash-user-bounces+john.layman=ieee.org at gnucash.org>
On Behalf Of Peter
Sent: Friday, January 21, 2022 12:22 AM
To: john.layman at laymanandlayman.com; gnucash-user at gnucash.org
Subject: Re: [GNC] Exiting gnucash Lock file Vol 226, Issue 57

   John,
   Well yes it did terminate or close.
   gnucash was closed and was then reopened without any reported issue.
   Other than it failed to save the changes and delete the lock file.
   Maybe if you could tell me how to confirm it closed or terminated
   correctly, I will go and test and see what  happens.
   This issue I noted in Test#2 was actually caused by me not following my
   own test process.

   On 21/01/2022 04:48, John Layman wrote:

The test cases that appear to have failed aren't conclusive, however,
without co nfirming that GnuCash had actually terminated, and terminated
normally.

-----Original Message-----
From: gnucash-user
[1]<gnucash-user-bounces+john.layman=ieee.org at gnucash.org> On  Behalf Of
Peter
Sent: Thursday, January 20, 2022 9:39 AM
To: [2]gnucash-user at gnucash.org
Subject: Re: [GNC] Exiting gnucash Lock file Vol 226, Issue 57

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
GNUCAS H Storage type :  XML and compressed Operating system: Windows 10
GNUCASH versio n 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 r emoved 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
dele ted 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 transa ction prior to the question of save the file I was never
able to get it to repea t 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
dat a 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
dat a 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
dat a file

----------------------------------------------------------------------------
----
---------------------

Test #6 - change then use X method wait for the save dialogue and save at 15
sec onds 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
comply ing 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 Au tosave then exit via the X method

There is an issue with exiting and relying on gnucash to save the data if
gnucas h produces the dialogue to SAVE the data then File->Quit or the X
method The Sav e 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
[3]gnucash-user at gnucash.org
To update your subscription preferences or to unsubscribe:
[4]https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see
[5]https://wiki.gnucash.org/wiki/Ma
iling_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.

References

   1. mailto:gnucash-user-bounces+john.layman=ieee.org at gnucash.org
   2. mailto:gnucash-user at gnucash.org
   3. mailto:gnucash-user at gnucash.org
   4. https://lists.gnucash.org/mailman/listinfo/gnucash-user
   5. https://wiki.gnucash.org/wiki/Mailing_Lists
_______________________________________________
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.



More information about the gnucash-user mailing list