Bug 148438

Summary: Get rid of unnecessary document recovery
Product: LibreOffice Reporter: michael
Component: LibreOfficeAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: 79045_79045
Priority: medium    
Version: 7.0.5.2 release   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=160769
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 112970    

Description michael 2022-04-07 09:37:03 UTC
Steps to reproduce:

1. Open a LibreOffice application of your choice.
2. Open a document (creating a new one may also work, didn’t try specifically).
3. Make some changes to the document.
4. Let things sit long enough for autosave to kick in.
5. Save the document but keep it open.
6. Let things sit for some longer.
7. Kill LibreOffice.
8. Open LibreOffice again.

Expected behavior:

One of the following two:
1. The document is not recovered as it has no unsaved changes (to pick up where you left off, just reopen the document), OR
2. No recovery is performed, the recovery dialog just opens the last saved document.

Actual behavior:

LibreOffice performs a lengthy recovery, even for documents that had no unsaved changes. This takes much longer than opening the document the regular way, and generates the same result.

Environment:

LibreOffice 7.0.5.2 (x64) on Windows 10. This behavior has likely been around all along.

Additional information:

As I understand it, LibreOffice already keeps track of two things:

* list of open documents, persistent across crashes
* for each open document, a “dirty” flag (indicating unsaved changes); nonpersistent and lost after a crash

So the approach would be:

* Store the “dirty” flag with the list of documents to recover (i.e. persistent across crashes)
* When restarting after a crash, either limit the list of documents to recover to those with the “dirty” flag set, or choose the recovery strategy based on the “dirty” flag: if set, do the full recovery; if not set, just open the last saved state
Comment 1 Roman Kuznetsov 2022-04-07 19:11:19 UTC
Michael, could you try the same in newer LibreOffice version like 7.2.6 or 7.3.2?
Comment 2 QA Administrators 2022-10-06 04:12:07 UTC Comment hidden (obsolete)
Comment 3 Rajasekaran Karunanithi 2022-10-19 22:56:47 UTC
I opened a  document in LO 7.4.1.2(x64)  and did some changes kept it open. Later on killed the LO process and opened again LO, the auto recovery works on.

Can't reproduce in LO 7.4.1.2 (x64) Windows 10 build:3c58a8f3a960df8bc8fd77b461821e42c061c5f0
Comment 4 Stéphane Guillou (stragu) 2022-12-22 01:20:43 UTC

*** This bug has been marked as a duplicate of bug 76992 ***
Comment 5 Justin L 2023-08-09 14:05:38 UTC

*** This bug has been marked as a duplicate of bug 57414 ***