Bug 157458 - Unsaved changes lost in recovered document after changing settings and restarting LibreOffice as prompted
Summary: Unsaved changes lost in recovered document after changing settings and restar...
Status: NEEDINFO
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.5.6.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: AutoSave-AutoRecovery-Backup
  Show dependency treegraph
 
Reported: 2023-09-26 14:57 UTC by nador2
Modified: 2024-04-11 03:13 UTC (History)
2 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 nador2 2023-09-26 14:57:05 UTC
Description:
I use Kubuntu 23.04 64bit, HP ProBook 6560b.

I worked in Impress and Calc for about 40 minutes.
Unfortunatelly I reached RAM in my Kubuntu and it freezed.
After restart the automatical recovery gave only recoveried versions from the beginning of my work.
Calc was not important so much for me, so i closed it. The Impress I left opened.
Then I found setting Tools-Options-Loading/Saving-General: Information for automatical saving save every xy minutes. I activated and adjusted to 3.
Then program said "restart Libreoffice" - I did it and after restart I lost the rest of my work in Impress, because after it there was only blank page.

For me two bugs:
1. autosave should work out of box without settings
2. when the program want restart, it should continue with previous opened works like for example Firefox.. or at least warn that after restart will be all the work lost

Thank you for your effort with improvement.

Steps to Reproduce:
bug a)
1.work some time
2.hard restart of computer
3.try to recover your doc - you will get version from the beginning of the work

bug b)
1. change setting of automatical recover time saving
2. program will ask if you want restart, make "yes"
3. after restart you will get blank page

Actual Results:
Loss of work/document/data

Expected Results:
Recovery works well, loss of at maximum few minutes of work


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.5.6.2 (X86_64) / LibreOffice Community
Build ID: 50(Build:2)
CPU threads: 4; OS: Linux 6.2; UI render: default; VCL: kf5 (cairo+xcb)
Locale: cs-CZ (cs_CZ.UTF-8); UI: cs-CZ
Ubuntu package version: 4:7.5.6-0ubuntu0.23.04.1
Calc: threaded
Comment 1 Mike Kaganski 2023-09-26 15:33:01 UTC
(In reply to nador2 from comment #0)
> bug a)
> bug b)

Please make sure to only file one problem per bug report. Two bugs in one report is not valid. Please choose which of the two bugs this report should cover, and file another one separately.

If I understood correctly, your "bug b" is something like "have a recovered document open, but not saved; restart the program without saving; the restored data is lost". Is this correct? Didn't you receive a "file modified" warning? If the restored data isn't marked modified, I'd consider that a bug. If you saw the warning, but ignored it, that would be OK, as user explicitly discarded the changes.
Comment 2 nador2 2023-09-26 15:52:44 UTC
(In reply to Mike Kaganski from comment #1)
> (In reply to nador2 from comment #0)
> > bug a)
> > bug b)
> 
> Please make sure to only file one problem per bug report. Two bugs in one
> report is not valid. Please choose which of the two bugs this report should
> cover, and file another one separately.
> 
> If I understood correctly, your "bug b" is something like "have a recovered
> document open, but not saved; restart the program without saving; the
> restored data is lost". Is this correct? Didn't you receive a "file
> modified" warning? If the restored data isn't marked modified, I'd consider
> that a bug. If you saw the warning, but ignored it, that would be OK, as
> user explicitly discarded the changes.

Bug B:
Yes, the warning table didnt appear.
Comment 3 Stéphane Guillou (stragu) 2023-10-11 13:17:28 UTC
(In reply to nador2 from comment #0)
> For me two bugs:
> 1. autosave should work out of box without settings

This should be resolved in the upcoming 24.2 release. Please see the various autoSave/autoRecovery changes here: https://wiki.documentfoundation.org/ReleaseNotes/24.2#Core_/_General

> 2. when the program want restart, it should continue with previous opened
> works like for example Firefox.. or at least warn that after restart will be
> all the work lost

"Save AutoRecovery information every X minutes" does ask to restart when changed in the Options dialog, but if the open document needs saving, I am getting a prompt to do so.
Once saved, it is true that the document is not reopened automatically (which is already tracked in bug 146769), and it opens a new document, but I didn't lose any data here: my file was saved and I could reopen it.

I also tried the following:

0. Make sure the "Save AutoRecovery information" setting is set to something small, like 1 minute
1. Create a new document, save it, modify it without saving it
2. Wait for AutoRecovery to kick in
3. Kill the LO process
4. Reopen LO, recover the document: unsaved changes are there
5. Change AutoRecovery setting again so LO asks to restart

Result: I was prompted to save the changes. So can't confirm that issue.
Are you sure the file doesn't include the changes?
And were you working on files that had been saved previously, or brand new files that had never been saved?
Comment 4 nador2 2023-10-13 11:59:54 UTC
If there was a document saved somewhere, I have no idea - but when the restore dialog was not opened, so I didn't even look for some saved documents because I didn't know that it could somewhere be..

So I can confirm - after opening LibreOffice after restart of computer I didnt get restore dialog so I didnt get also any content. My file was new, till the restart of computer without any saving from my side. I use LibreOffice very often for just temporary works where the saving is useless.
Comment 5 Stéphane Guillou (stragu) 2023-10-13 12:46:44 UTC
Thanks nador2. I think this is the key:

(In reply to nador2 from comment #4)
> My file was new,
> till the restart of computer without any saving from my side.

See point (2) in bug 65509 comment 33.

See also bug 149920 comment 4.

I'd suggest to re-focus this report on: "AutoRecovery should also work on unsaved files".

Justin, what do you think, following your autosave/autorecovery adventures? I couldn't find an existing report.
Comment 6 Justin L 2023-10-13 13:27:53 UTC
(In reply to Stéphane Guillou (stragu) from comment #5)
> I'd suggest to re-focus this report on: "AutoRecovery should also work on
> unsaved files".
> 
> Justin, what do you think, following your autosave/autorecovery adventures?
I would fully expect AutoRecovery to work on unsaved files. But there are way too many variables at play in this bug report to be able to do anything about finding out whether there is a real bug somewhere. In short, we need reliable steps to consistently reproduce. (And testing must be done using 24.2, not previous versions.)

Issues are:
* what restart are we referring to? The restart after modifying the "save every x minutes" isn't valid because autosave hasn't been running yet. So the steps to reproduce in comment 0 are not valid. (P.S. restart not requested/required to activate autoRecovery in 24.2)

* after 24.2, a blank document should not be recovered (unless it remained blank for over 10 minutes). The one case I could imagine is if the user worked for 40 minutes without a 15 second pause. Without a user idle period, the save never actually has a chance to get started, so in this case there wouldn't be ANYTHING to recover. (bug 48416). So the steps to reproduce need to indicate length of time spent before the restart, and how active the user was prior to the restart.

Comment 3's steps are good, but they show that things are working as expected...
Comment 7 Mike Kaganski 2023-10-13 13:36:00 UTC
(In reply to Stéphane Guillou (stragu) from comment #5)
> I'd suggest to re-focus this report on: "AutoRecovery should also work on
> unsaved files".

I, too, expect autorecovery to work on unsaved files. And it does - I tested with 7.6, but I'm sure it worked in earlier versions as well. A lorem ipsum text, in an "Untitled 1" document, after the process had been killed (after the autorecovery timeout elapsed) - the next program start brings it in the Document Recovery window.
Comment 8 Stéphane Guillou (stragu) 2023-10-13 14:27:27 UTC
Thank you both.

I also tried:

0. Make sure the "Save AutoRecovery information" setting is set to something small, like 1 minute
1. Create a new document, _don't save it_, add text
2. Wait for AutoRecovery to kick in by waiting more than one minute without touching LO
3. Kill the LO process
4. Reopen LO, recovery dialog shows, recover the document: unsaved changes are there
5. Change AutoRecovery setting again so LO asks to restart: I am prompted to save the file, which works as expected, then it restarts, and I can reopen the saved file, no data loss.
(step 5 does not apply to 24.2, which does not need a restart when changing AutoRecovery settings)

So it's actually all working as expected for me too, in all active branches:

Version: 7.5.7.1 (X86_64) / LibreOffice Community
Build ID: 47eb0cf7efbacdee9b19ae25d6752381ede23126
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ff9c8b62c1015972e9e89799832fa3690dcd46b4
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

nador2, please see if you can provide precise steps that reproduce an issue consistently, testing with a recent daily build: https://dev-builds.libreoffice.org/daily/master/current.html
But with 24.2 not needing a restart anymore, I'd say we can probably close this report as "works for me"?
Comment 9 Mike Kaganski 2023-10-13 14:36:02 UTC
(In reply to nador2 from comment #4)
> So I can confirm - after opening LibreOffice after restart of computer

This "restart of computer" is what made me link to bug 109085. There is some problematic processing on Windows, which might interfere with our autosave machinery; we have some emergency-like save mechanism created specifically to handle shutdown scenario...

I didn't test myself this scenario now.
Comment 10 QA Administrators 2024-04-11 03:13:31 UTC
Dear nador2,

This bug has been in NEEDINFO status with no change for at least
6 months. Please provide the requested information as soon as
possible and mark the bug as UNCONFIRMED. Due to regular bug
tracker maintenance, if the bug is still in NEEDINFO status with
no change in 30 days the QA team will close the bug as INSUFFICIENTDATA
due to lack of needed information.

For more information about our NEEDINFO policy please read the
wiki located here:
https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Status/NEEDINFO

If you have already provided the requested information, please
mark the bug as UNCONFIRMED so that the QA team knows that the
bug is ready to be confirmed.
 
Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-NeedInfo-Ping