Bug 136172

Summary: UI File recovery wizard does not discard data about files it failed to restore
Product: LibreOffice Reporter: NISZ LibreOffice Team <libreoffice>
Component: UIAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: buzea.bogdan, heiko.tietze, pf, sdc.blanco, telesto
Priority: medium    
Version: 7.1.0.0.alpha0+   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=57414
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 112970    
Attachments: Screenshot of the recovery wizard start with files already renamed
Wizard does not find the file to recover
Final step of the wizard: could not recover files, but can not remove data about them

Description NISZ LibreOffice Team 2020-08-27 09:56:05 UTC
Created attachment 164736 [details]
Screenshot of the recovery wizard start with files already renamed

Some of our users complained about the document recovery wizard “constantly popping up”.
Turns out if the recovery wizard fails to recover a document – such as there was a crash, but no backup was made yet and the original file was removed – the wizard does not discard recovery information automatically.
It is not possible to do so manually after the recovery is failed. 
So upon next LO start the failed document shows up again in the recovery wizard. 
Users could make a thoughtful decision to discard the recovery data at this point, but sometimes this does not happen: their perception is that it’s better to let the wizard always try to do the recovery.

Steps to reproduce:
    1. Make LO crash with a document. I used attachment #100424 [details] on a 32 bit build, saving this file on Windows still causes a crash (but not on 64 bits).
    2. Before next LO start rename the original file.
    3. Start LO. The recovery wizard shows up and proposes to recover attachment #100424 [details] 
    4. Choose Start, and observe that recovery fails
    5. After the failed recovery only the Finish button is available, Discard is disabled.
    6. Exit LO and reopen it.
    7. The recovery wizard shows up again, proposing to recover attachment #100424 [details] 

Actual results:
After a failed recovery the info about the file to recover is not deleted automatically.

Expected results:
If recovery fails LO should make it possible to remove recovery data about failed files, i.e. do what the Discard button does at start time. 
Maybe in an explicit question, with the answer defaulting to “Delete”.
Or even remove the recovery data automatically when the user clicks Finish. It’s unlikely next time it will be more successful - at least for local files, not sure about networked ones.

LibreOffice details:
Version: 7.1.0.0.alpha0+ (x86)
Build ID: 4f0617275f2c9669901a4b06d2133533ceb437a0
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL
Comment 1 NISZ LibreOffice Team 2020-08-27 09:56:31 UTC
Created attachment 164737 [details]
Wizard does not find the file to recover
Comment 2 NISZ LibreOffice Team 2020-08-27 09:57:30 UTC
Created attachment 164738 [details]
Final step of the wizard: could not recover files, but can not remove data about them
Comment 3 Heiko Tietze 2020-09-10 13:25:49 UTC
Could the file be on a volatile storage such as a USB stick or remote? In this case you may want to try again.
Comment 4 QA Administrators 2022-09-11 03:42:39 UTC Comment hidden (obsolete)
Comment 5 Stéphane Guillou (stragu) 2023-05-28 23:08:14 UTC
*** Bug 148431 has been marked as a duplicate of this bug. ***
Comment 6 Justin L 2023-08-10 17:27:24 UTC
I think this is fixed in 24.2, probably by implts_doRecovery's call to implts_resetHandleStates which no longer adds to the RecoveryList since https://gerrit.libreoffice.org/c/core/+/154490

tdf#57414 autorecovery: don't always add every file to RecoveryList
Comment 7 BogdanB 2023-10-21 11:06:44 UTC
Justin, based on your comment 6, can we close this bug?
NISZ Team, could you still reproduce this?