Bug 160769 - LibreOffice 24.2 Document recovery (from timed autoSave) doesn't restore all open files after crash
Summary: LibreOffice 24.2 Document recovery (from timed autoSave) doesn't restore all ...
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
24.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-22 07:03 UTC by BikeHelmet
Modified: 2024-05-09 11:33 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description BikeHelmet 2024-04-22 07:03:15 UTC
Description:
LibreOffice 24.2.1+ only recovers a single document on my computer. Possible regression over the 7.6.x branch. I tend to have a lot of documents open - usually dozens. I have 128GB of RAM, so should not be an issue. When LibreOffice 7.6.x and earlier crash, they offer to reopen the documents at next start, and properly recover all of them. LibreOffice 24.2.1+ only offers to recover a single document, or sometimes two, with one being completely blank.


Steps to Reproduce:
1. Open a great many large documents.
2. Wait for LibreOffice 24.2.x to crash.
3. Be unable to recover said documents. (Except one.)
4. Uninstall and reinstall 7.6.x
5. Open a great many large documents.
6. Wait for LibreOffice 7.6.x to crash.
7. Recover all of the previously opened documents.

Actual Results:
7.6.x recovers all opened documents.
24.2.x recovers a single document.

Expected Results:
Both versions should recover all previously opened documents.


Reproducible: Always


User Profile Reset: No

Additional Info:
Had a working crash recovery feature.

I have rolled back to 7.6.x:

Version: 7.6.6.3 (X86_64) / LibreOffice Community
Build ID: d97b2716a9a4a2ce1391dee1765565ea469b0ae7
CPU threads: 16; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-CA (en_CA); UI: en-GB
Calc: CL threaded
Comment 1 Mike Kaganski 2024-04-22 07:36:56 UTC
(In reply to BikeHelmet from comment #0)
> Expected Results:
> Both versions should recover all previously opened documents.

No, they only should recover *changed* documents (which have something to recover). Previously, LibreOffice confused people by suggesting them to "recover" documents that had no changes (bug 57414). That was fixed in version 24.2 (release notes at [1]).

[1] https://wiki.documentfoundation.org/ReleaseNotes/24.2#Core_/_General
Comment 2 BikeHelmet 2024-04-22 19:19:51 UTC
(In reply to Mike Kaganski from comment #1)
> (In reply to BikeHelmet from comment #0)
> > Expected Results:
> > Both versions should recover all previously opened documents.
> 
> No, they only should recover *changed* documents (which have something to
> recover). Previously, LibreOffice confused people by suggesting them to
> "recover" documents that had no changes (bug 57414). That was fixed in
> version 24.2 (release notes at [1]).
> 
> [1] https://wiki.documentfoundation.org/ReleaseNotes/24.2#Core_/_General

This likely should be left to the user, giving them the option to recover all of them or only changed ones. It is very disruptive when LibreOffice crashes with the new behaviour.

Here is a common scenario:
-An office worker is looking at inventory / spreadsheets / reports before a Zoom meeting with higher up management. They are also referencing some new policy documents, so that they can discuss how the changes are going on-the-floor, and have other documents opened from previous discussions with employees/managers. Some resumes are also open, and they are evaluating possible new hires. (Maybe they a half dozen restaurants in a 60km area for a group of owners/shareholders?) In total there are about 30-40 documents open, enough that the recently opened list will not catch them all.

The Zoom meeting starts. Things are going well for a few minutes. Then LibreOffice crashes abruptly. Upon restoring it, it does not reload all of the relevant documents, but only the changed ones. The employee has to scramble to locate and reopen things. The meeting takes almost 30 minutes longer due to having to find everything again. Everyone is annoyed.

I cannot think of a business user that would want the new behaviour. I would make it a choice in the recovery dialog. Microsoft Office uses the old behaviour, which I think most business users and power users would consider correct. Since it was confusing enough to some users to create a bug submission and patch, I suggest expanding the recovery dialog to accommodate both use cases and expected recovery behaviours. You could even collect telemetry data on that, and discover exactly how many people expect each method. I suspect that it's more balanced than you'd assume.
Comment 3 Stéphane Guillou (stragu) 2024-05-08 15:50:29 UTC
Justin, what are your thoughts? Your bug 57414 comment 22 suggests thought has been put into having a logical behaviour depending on the type of recovery.
Comment 4 Justin L 2024-05-08 16:15:09 UTC
Quoting from bug 57414 comment 22:

There are three types of Recovery. One is emergencySave (an exception in the program triggers a save-and-restart), another is SessionSave (when the OS shuts down), and the third is a timed autoRecovery.

In the case of EmergencySave and SessionSave, the intent is to recover the working environment, so ALL documents are attempted to be recovered.

In the most general case (the timed autoRecovery) the patches only try to recover modified documents that have a recovery file.


So, I tend to agree with Mike in comment 1 and the request to specifically do it this way in bug 148438. In response to OP, I'd say that recent documents exists to find those documents easily, so I don't see how re-opening documents manually could be a problem.

In general, it is not a good idea to have lots of documents open, so having LO "recover" the entire last environment would not be smart and encourage bad behaviour. In this case LO itself has no idea why it is restarting, so it is best to just recover modified-but-not-saved files.
Comment 5 Stéphane Guillou (stragu) 2024-05-08 16:22:31 UTC
Thanks Justin.
Let's close as "Not a bug" then.
BikeHelmet, if you think a different path can be taken to avoid confusion (maybe better text in the dialog?), please feel free to open an enhancement request.
Comment 6 BikeHelmet 2024-05-08 19:27:39 UTC
(In reply to Justin L from comment #4)
> Quoting from bug 57414 comment 22:
> 
> There are three types of Recovery. One is emergencySave (an exception in the
> program triggers a save-and-restart), another is SessionSave (when the OS
> shuts down), and the third is a timed autoRecovery.
> 
> In the case of EmergencySave and SessionSave, the intent is to recover the
> working environment, so ALL documents are attempted to be recovered.
> 
> In the most general case (the timed autoRecovery) the patches only try to
> recover modified documents that have a recovery file.
> 
> 
> So, I tend to agree with Mike in comment 1 and the request to specifically
> do it this way in bug 148438. In response to OP, I'd say that recent
> documents exists to find those documents easily, so I don't see how
> re-opening documents manually could be a problem.
> 
> In general, it is not a good idea to have lots of documents open, so having
> LO "recover" the entire last environment would not be smart and encourage
> bad behaviour. In this case LO itself has no idea why it is restarting, so
> it is best to just recover modified-but-not-saved files.

That suggests that there is a bug here? If emergencySave is supposed to recover everything, and after a crash it doesn't, then clearly it crashed in such a way that it did not have a chance to do so, and is depending upon the timed autoRecovery instead? So there's a bug, just not the one from the original post. It still seems like it would be more prudent to give people the choice. An overlapping layer of reliability.

The recent documents list is often not long enough, and organizes based on time originally opened, not which documents were recently used. If your work involves opening and closing a bunch of incoming documents or supplier sheets throughout the day, but not working with them, and instead working within other documents that are left opened longer - then it will not have useful files in the list.

At the end of the day it's your choice as the developers/maintainers, but I would encourage you to think of users that are in the business world and not in the programming or home use world. It may be bad behaviour, but it's exactly how many businesses work, like restaurants.

Another option if this is very unappealing, would be to create a "recently saved" list - as this type of user has no use for recently opened documents, and only cares about the ones that they are saving. The priority is completely opposite to how Justin outlined. Work sheets and supplier pricing updates and whatnot can just be redownloaded/reopened from email, but the documents opened for a long time are actually the priority. Those ones are the ones that are sometimes ignored by auto recovery and the recents list, depending on saving behaviour and how long ago they were originally open.

Just food for thought, but I think they could be good changes to broaden the appeal to different types of users and use cases.
Comment 7 snail 2024-05-09 07:16:22 UTC
I also thought this was a kind of regression and was going to file it as a bug. 

Before updating to 24.2, I have often left several files opened which need constant attention whether they are worked on or not, and killed soffice.bin process manually in order to restore the status later in the same way as the Internet browser restores previously opened tabs. Still, when it comes to AutoRecovery on Libreoffice, I know it is not an expected behavior, so I understand that this is not a bug, rather a function which should be implemented directly or via an extension.
Comment 8 Justin L 2024-05-09 11:33:17 UTC
(In reply to snail from comment #7)
> rather a function which should be implemented directly
That is bug 146769 (Reopen documents from previous session on start).