Document Reverted Back to nearly a MONTH ago...

Discuss setup / installation issues - Add a spell checker, Language pack?
Post Reply
Yeslech
Posts: 2
Joined: Thu Oct 08, 2020 7:06 am

Document Reverted Back to nearly a MONTH ago...

Post by Yeslech »

I had a number of documents opened and all of a sudden they stopped working properly. I couldn't open any of them thought they were technically opened on my computer already. They would just flash on the screen, but then go away before I could click on them or type on them. I restarted my computer. Open Office asked me to put my name in for some reason?

Now when I click on my documents at least three of my documents have reverted back to nearly A MONTH ago. SO much information is missing from September 12 to today. I am in a panic.

I'm not sure what has happened. I thought that all my documents had been saved more recently than that... Is there anyway the documents I was working on TODAY can be restored with today's information????

Thanks in advance for any help you can offer....
Last edited by MrProgrammer on Sat Oct 10, 2020 10:58 pm, edited 1 time in total.
Reason: Moved from Beginners forum to Install, Setup and Troubleshooting
OpenOffice 4.1.7 on Windows 10
User avatar
Hagar Delest
Moderator
Posts: 32657
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Document Reverted Back to nearly a MONTH ago...

Post by Hagar Delest »

I experienced that very recently and once a long time ago. Do NOT overwrite the files by clicking the save button! You can save as with another name just in case, then close and open the files again.
When it occurred to me just one or two weeks ago, when I tried to open the file again, I got the good one, not the version that came from nowhere in the past.
I definitively don't know what happened...
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Yeslech
Posts: 2
Joined: Thu Oct 08, 2020 7:06 am

Re: Document Reverted Back to nearly a MONTH ago...

Post by Yeslech »

I tried that, but it hasn't worked. There's a chance I've left those documents open since September 12, continued working on them, but didn't save them.... If that's the case is it just too bad for me?

I don't know anything about this, but could I use Tools/Options/Paths/Backups somehow?

Any idea why the documents would have stopped working all of a sudden in the first place? I wouldn't have restarted my computer except that the documents weren't working at all.

There is also an issue that has started recently with "LOCK" files showing up whenever I open a document. It's never done this till a month or so ago. When I click on a document it's like it creates a totally different file. When I click on it it says "How do you want to open this file? Look for an app in the Microsoft Store ..."
example .~lock.NAME OF MY DOCUMENT.odt#
I have no clue what these files mean and if I'm allowed to delete them or not... I think that when I moved some of these "lock" files into a lock file folder I created it said "do you want to over-write them" and I said yes. I wonder if that's where all the trouble started...
OpenOffice 4.1.7 on Windows 10
User avatar
Hagar Delest
Moderator
Posts: 32657
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Document Reverted Back to nearly a MONTH ago...

Post by Hagar Delest »

Yeslech wrote:There's a chance I've left those documents open since September 12, continued working on them, but didn't save them.... If that's the case is it just too bad for me?
In that case, yes. Not even a Ctrl+S for more than a month???
Yeslech wrote:I don't know anything about this, but could I use Tools/Options/Paths/Backups somehow?
Yes, look at it, see the tutorial on the [Tutorial] The OpenOffice user profile.
Yeslech wrote:There is also an issue that has started recently with "LOCK" files showing up whenever I open a document. It's never done this till a month or so ago. When I click on a document it's like it creates a totally different file. When I click on it it says "How do you want to open this file? Look for an app in the Microsoft Store ..."
example .~lock.NAME OF MY DOCUMENT.odt#
I have no clue what these files mean and if I'm allowed to delete them or not... I think that when I moved some of these "lock" files into a lock file folder I created it said "do you want to over-write them" and I said yes. I wonder if that's where all the trouble started...
Discussed many times in the forum, that's just a file created any time you open a file with OpenOffice to prevent the modification by any other process. Leave it alone.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Document Reverted Back to nearly a MONTH ago...

Post by RoryOF »

Hagar Delest wrote:
Yeslech wrote: I have no clue what these files mean and if I'm allowed to delete them or not... I think that when I moved some of these "lock" files into a lock file folder I created it said "do you want to over-write them" and I said yes. I wonder if that's where all the trouble started...
Discussed many times in the forum, that's just a file created any time you open a file with OpenOffice to prevent the modification by any other process. Leave it alone.
I agree with Hagar - leave these alone:

If you do not wish to see them, uncheck "View hidden files"; you may need to Google to find out how to do this.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Document Reverted Back to nearly a MONTH ago...

Post by John_Ha »

Yeslech wrote:Now when I click on my documents at least three of my documents have reverted back to nearly A MONTH ago. SO much information is missing from September 12 to today. I am in a panic.
A document cannot revert back to a previous version because AOO/LO does not keep a previous version.
 Edit: To be pedantically precise, AOO can save previous versions of fred.odt within fred.odt if you enable File > Versions ..., but that is something quite different.] 

So, I think that you opened a file with, say, one page and you then kept typing till you had, say, three pages. The PC crashed and you lost the extra two pages because newly typed text is stored in memory. It is only saved to disk when you Save the file and you did not Save it. You didn't go back to a previous version: you went back to the last saved version of the file: the one page.

AutoRecovery is designed to protect you from losing data when AOO/LO or the computer crashes. If you had Save AutoRecovery file set to ON, then you should be able to get the AutoRecovery data - see the Tutorial below.

If you had saved the file containing the new typed information, but you cannot see it, you may be able to get something back by following the instructions in [Tutorial] How to find and un-delete AOO temporary files. It has detailed instructions on how to

a) use Previous Versions (W7 and later) to recover previous versions of the file (is there something similar on MacOS and Linux?);

b) recover your file as it was when you last opened or saved it, or as it was when it was last saved with AutoRecovery;

c) find previous versions of the file in the folder it is located in, but which have since been deleted;

d) find any temporary files AOO wrote while you were editing the file but which have not yet been deleted;

e) un-delete the temporary files AOO wrote while you were editing the file, and then deleted. d) and e) will recover your file as it was when you last opened or you last saved it.

If you cannot follow the instructions ask someone with more PC skills to help you. Act quickly - the longer you wait the more likely any temporary files are to be deleted.
Last edited by John_Ha on Sat Oct 10, 2020 11:38 am, edited 1 time in total.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
Hagar Delest
Moderator
Posts: 32657
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Document Reverted Back to nearly a MONTH ago...

Post by Hagar Delest »

John_Ha wrote:A document cannot revert back to a previous version because AOO/LO does not keep a previous version.
Actually, I've experienced that issue twice. One a long time ago on a GNU/Linux distro (was Mepis IIRC but it does not matter I think). The second time no longer than 2 weeks ago on my (brand new) Windows 10 corporate machine.
The difference is that at my greatest surprise, in the recent case, I thought that the changes had been completely lost. However, I closed my file and reopened it and then it displayed the correct last version I remember having saved. I have absolutely no idea about what happened!
In the first case, I remember checking the time stamp and it showed the last time I had saved the file. However, the content was not the latest.
So if th OP rarely saved the file (or not at all), I'm not surprised that a kind of very old file was "retrieved".
Could AOO be mixed up in the temporary files at some point and then retrieve an old version that had not been correctly wiped out after the save operation?
There are few posts with this problem in the forum (rare but they do exist). Thus, I think there is a corner case that is OS independent but that can give this result.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Document Reverted Back to nearly a MONTH ago...

Post by John_Ha »

Hagar Delest wrote:The second time no longer than 2 weeks ago on my (brand new) Windows 10 corporate machine.
The difference is that at my greatest surprise, in the recent case, I thought that the changes had been completely lost. However, I closed my file and reopened it and then it displayed the correct last version I remember having saved. I have absolutely no idea about what happened!
Hagar

Can you remember the exact sequence of steps in this case. Something like:
  1. I had a four page file saved to disk.
  2. I opened it
  3. I could only see 2 pages
  4. I closed it without saving it.
  5. I opened it again and could now see 4 pages
If you accidentally deleted 2 pages at step 2 then that is my suggested scenario. It is easily done - highlight it and press any key ...
Hagar Delest wrote:Could AOO be mixed up in the temporary files at some point and then retrieve an old version that had not been correctly wiped out after the save operation?
I really doubt that AOO is finding an undeleted temporary file as that is two faults: AOO does not delete the temporary file and then AOO finds a file like C:\Users\Hagar\AppData\Local\Temp\sv2ju1mk.tmp\sv2ju21c.tmp when you try to open C:\Users\Hagar\Documents\fred.odt. I think user error is far more probable.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
Hagar Delest
Moderator
Posts: 32657
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Document Reverted Back to nearly a MONTH ago...

Post by Hagar Delest »

Well, quite easy, in both case I had saved the file with new content the day before. Thus, was quite surprised to see the file open the following day without those last changes.
For the second case, the laptop was on its base and was using a external keyboard, so no risk to involve the touchpad. I use a macro to save my documents and there is no way I could have deleted anything just before saving.
In the second case, perhaps I should have copied the file but I didn't expect the correct version to appear ever again.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Document Reverted Back to nearly a MONTH ago...

Post by John_Ha »

Hagar Delest wrote:I had saved the file with new content the day before.
Is there any way that save could have failed? If it did fail it would explain what happened.

I am assuming that you never saw any Recovery screen where AOO was attempting to recover a file.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
Hagar Delest
Moderator
Posts: 32657
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Document Reverted Back to nearly a MONTH ago...

Post by Hagar Delest »

Indeed, no recovery screen. It would have not been surprising else.
The strange thing is that (in the first case) the timestamp was consistent with the last save (and I'm sure it was not the previous save operation that was one day before).
Hadn't checked the timestamp for the recent case.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Document Reverted Back to nearly a MONTH ago...

Post by John_Ha »

I thought of another reason it is unlikely to be AOO opening a temporary file.

If I have C:\Users\xxxxxx\AppData\Local\Temp\sv2ju1mk.tmp\sv2ju21c.tmp as a temporary file for C:\Users\xxxxxx\Documents\fred.odt then AOO opens it as sv2ju21c.tmp and I am sure you would have spotted the strange name.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Document Reverted Back to nearly a MONTH ago...

Post by RoryOF »

Hagar Delest wrote:Indeed, no recovery screen. It would have not been surprising else.
The strange thing is that (in the first case) the timestamp was consistent with the last save (and I'm sure it was not the previous save operation that was one day before).
Hadn't checked the timestamp for the recent case.
So perhaps we ought be looking for some peculiarity with the compression routine, that, in the event it is writing a more recent version of a file, gets confused (how?) and retimes the old version before it has updated the changed content.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Document Reverted Back to nearly a MONTH ago...

Post by John_Ha »

Does anyone know how recovery works, what files are created and how AOO knows to offer recovery?

Rory spotted an ask.libreoffice.org post How can I "undo" a recovery?
I opened a spreadsheet (that I use often) and received the message about "recovery". Thinking something happened at the last shutdown, I clicked "OK". After the recovery process, the spreadsheet opened and now the data is from a year ago. How can I "undo" a recovery? Thanks!
I cannot explain it as the poster describes it. Let's ignore the recovery bit for the moment (but see below)

He uses it often. A year ago he saved, say, v1. He has since edited it, say, 200 times so he is now on v201 albeit it has the same filename.

So how does LO find that old v1 file? It has been overwritten 200 times and every time it was opened, it was the current version.

Any temp file created from v1 a year ago has long since vanished, either by LO deleting it; or because the \temp folder is emptied on every reboot and the PC is bound to have been rebooted.

Could it be recovery?

I don't understand what files are created during a recovery process or how they are used so this is pure guesswork.

Say v1 failed a year ago and its recovery data is still on the PC. We have to assume the recovery was not offered every time the file was opened ...

v201 fails today and writes recovery data. There are now two sets of recovery information, v1 and v201.

That would explain why v1 was still on the PC.

If LO chooses to recover from the oldest recovery data v1 it explains how the old data is found.

If the v1 recovery is rejected by the user does LO then find the v201 recovery data? If so that explains how the v201 data is found after the v1 data is displayed.

But why wasn't v1 offered for recovery during the past year? Why wasn't it either recovered or deleted ages ago? Or has it sat there for a year and it only gets activated when v201 fails and offers recovery?

I need a detailed explanation of how recovery works and what the status of each file is during the process to see if this is feasible.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Document Reverted Back to nearly a MONTH ago...

Post by John_Ha »

I created a file ...\AOO\test 12 oct.odt and saved it.

I opened it, added some text and crashed AOO with TaskManager.

There is a file ...\AOO\.~lock.test 12 oct.odt# in the folder. I think it is the standard lock file and it contains

Code: Select all

jrh har,Lounge-PC/John,LOUNGE-PC,12.10.2020 13:32,file:///C:/Users/John/AppData/Roaming/OpenOffice/4;
C:\Users\John\AppData\Roaming\OpenOffice\4\.lock is still there. It contains

Code: Select all

[Lockdata]
User=Lounge-PC/John
Host=LOUNGE-PC
Stamp=50A72E81E621CDAD30F28CA53AD7BEA3
Time=Mon Oct 12 13:32:51 2020
IPCServer=true
I will see what happens tomorrow.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
Hagar Delest
Moderator
Posts: 32657
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Document Reverted Back to nearly a MONTH ago...

Post by Hagar Delest »

John, I fully agree with you. The trick is that I don't remember having seen the recovery screen. Meaning that AOO loaded directly the old version. Moreover, on my Windows machine, I've disabled the Save AutoRecovery information feature.
It may be linked to the sv8ah2rt.tmp-like files and folders created when a file is active in AOO (in the Temporary files folder set in the AOO Paths options).
Could we image an old one (be it one year or one month old) remaining on the HD and by any chance having AOO give the newly opened document the exact same temporary name and retrieve the old content? How exactly is build this sv8ah2rt.tmp name? Could it reappear in a matter of days/weeks/months/years? Moreover, it would have to be attributed to the exact same document.
That makes quite a lot of coincidences. But we don't have this issue very often.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Document Reverted Back to nearly a MONTH ago...

Post by RoryOF »

I'm tied up getting a local society online with Zoom, when I can find a slot that suits me and the Chairperson, so may not be able to return to this until tomorrow.

[Rant] No one should be allowed own or use a computer without holding a licence issued after a strict examination. [/Rant]

I have carried out a little investigation of the file locks. When OO is started, in the root of the User Profile is placed a lock file that seems to identify the user/session (includes a long hex identifier). In the acual file directory is placed a lock file that identifies the open file. This lock file contains the hour:minute of opening the file in question. When that file is Saved in course of editing, that lock file is rewritten to show in its operating system properties the H:M:S of the Save, but the internal time in the lock file is only updated to H:M.

I opened three files of different type simultaneously - each had its lock file; the lock file in the profile root was not altered, strengthening my opinion that it is merely a user/session identifier.

I find it strange that recovery would pick up a temporary (and deleted?) file of some time before, but I don't doubt that it happens.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Document Reverted Back to nearly a MONTH ago...

Post by John_Ha »

Hagar Delest wrote:Could we image an old one (be it one year or one month old) remaining on the HD
I think that most unlikely. If AOO fails to delete a temporary file (AOO or the PC crashes) it stays in the temp folder. As a minimum, the temp folder gets emptied when the PC boots. As the PC will have been booted during most upgrades it is very unlikely that a file would survive for a year. The oldest file in my ...\temp is 7 Oct - the day it got booted for a W10 update.
Hagar Delest wrote:Could we imagine ... AOO give[s] the newly opened document the exact same temporary name and retrieve the old content?
That's a remote possibility and again I doubt it because of the numbers. The file name is something like sv3i2d1f.tmp so even if we assume it is always formatted ccdcdcdc.tmp (character/digit) we have 26^5 x 10^3 combinations = 12 billion different combinations. If any character could be a character or digit it goes up to 36^8 = 3,000 billion.

Also, say AOO tries to write sv3i2d1f.tmp and sv3i2d1f.tmp already exists. AOO would presumably either throw an error (I didn't expect there to be a file there) or do what it does when saving a new tmp file with its original name, namely delete it and write a new one.

But without looking at the code all is guesswork.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
Post Reply