Writer edits lost; file replaced with .~lock.(file name)

Issues with installing under all versions of MS Windows
Post Reply
KSerrasera
Posts: 4
Joined: Sun May 05, 2024 3:19 pm

Writer edits lost; file replaced with .~lock.(file name)

Post by KSerrasera »

Open Office 4.1.15 on Windows 10 Pro

I have autosave set on q15". Yesterday after working on revising a text doc for a couple hours, the recover doc window popped up, indicating that the doc I'd been working on and an untitled doc with no data needed to be recovered. Went thru the process, and the doc I'd been working on reverted to the original, with none of my changes preserved. On my directory the file name appeared twice, once as it should have and the other as .~lock.(file name), with its icon a blank. After attempting to open this doc, it disappeared, leaving me with only the original doc, with all my changes gone.
At the time this happened, my Surface laptop was updating one of my Adobe Creative suite apps. Since updating Apache to 4.1.15 I have experienced more crashes than in all the years I've happily used it. So, having too late set up to auto save a back up of each doc, I don't expect I'll recover my edited doc. But what can I do to prevent this? Revert to the last version of Apache?
Open Office 4.1.15 on Windows 10 Pro
FJCC
Moderator
Posts: 9309
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Open Office doc edits lost, doc replaced with .~lock.(file name)

Post by FJCC »

The .~lock file is created whenever the document is open. It serves to lock the file from being edited by a another user. It remained after the crash because OpenOffice did not get a chance to shutdown properly.
You can try reverting to an older version of AOO but it's hard to tell what will help. A Windows update a few months ago solved a stability problem I had with OpenOffice for a long time.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
User avatar
LastUnicorn
Posts: 581
Joined: Sat Mar 29, 2008 2:41 am
Location: Scotland

Re: Open Office doc edits lost, doc replaced with .~lock.(file name)

Post by LastUnicorn »

You would be best advised to switch from OpenOffice to LibreOffice, especially so because you are on a Windows 10 system. There are several good reasons to do this, some of which are mentioned here: [Tutorial] Considering a Switch from OpenOffice to LibreOffice? Some Useful Information

As well as setting up Auto Save, for your future use you might want to give the TimeStamp Backup extension a try — it works on both OpenOffice and LibreOffice. You can get basic details here: TimeStamp Backup

However, it is best to download from here: TimeStamp Backup (latest version). The version there is the most recent one.
LibreOffice (Still) 7.6.7.2 (x64) Fully installed to system on Windows 10 and Windows 11
LibreOffice (Still) Portable 7.6.7.2 (x86) [PortableApps] on Windows 10
KSerrasera
Posts: 4
Joined: Sun May 05, 2024 3:19 pm

Re: OpenOffice doc edits lost, doc replaced with .~lock.(file name)

Post by KSerrasera »

Thank you! I will check out Libre.
Open Office 4.1.15 on Windows 10 Pro
User avatar
RoryOF
Moderator
Posts: 34648
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: OpenOffice doc edits lost, doc replaced with .~lock.(file name)

Post by RoryOF »

Such a lock file is generated automatically when an OpenOffice or LibreOffice file is opened for editing. Its purpose is to prevent multiple accesses for editing to the file, as might be by different users, or multiple editing instances from the same user. It is automatically removed when the file is correctly closed, but in the circumstances of a program or computer crash, it may be left. It contains only housekeeping information - date, time and user name; there is no point in investigating it.

It may be that the crash the OP suffered was caused by a forced Windows update - these are notorious for causing crashes to any program when the update occurs.

In any editing session, on any program, it should be instinctive to Save the file regularly; typing Ctrl S (Cmd S on a Mac) will do this. Anytime you pause for thought, or leave the computer for whatever reason, your fingers should twitch Ctrl S.

In the circumstances of a lost file, prompt searching of the computer using a recovery utility such as Recuva or PhotoRec may find and recover a deleted temporary file. The sooner such recovery process is started the better chance of success.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
KSerrasera
Posts: 4
Joined: Sun May 05, 2024 3:19 pm

Re: Writer edits lost; file replaced with .~lock.(file name)

Post by KSerrasera »

Thank you. I do the control S action obsessively, actually, and also have the auto save set for every 15 minutes. After working on the doc for hours, that's many saves. I think it must have been the Adobe Creative Suite update that caused the loss. But as mentioned, I've had many crashes since the latest Open Office update; just usually able to recover any lost data via the recover mechanism of the app.
Open Office 4.1.15 on Windows 10 Pro
User avatar
Hagar Delest
Moderator
Posts: 32705
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Writer edits lost; file replaced with .~lock.(file name)

Post by Hagar Delest »

Switch to LibreOffice, they have revamped the save operation to prevent issues of this kind.
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
KSerrasera
Posts: 4
Joined: Sun May 05, 2024 3:19 pm

Re: Writer edits lost; file replaced with .~lock.(file name)

Post by KSerrasera »

Thank you!
Open Office 4.1.15 on Windows 10 Pro
Post Reply