Bug 137879 - LO should know not to try and recover temporary files
Summary: LO should know not to try and recover temporary files
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.0.2.2 release
Hardware: All Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Document-Recovery
  Show dependency treegraph
 
Reported: 2020-10-30 15:32 UTC by Eyal Rozenberg
Modified: 2022-12-22 01:19 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2020-10-30 15:32:13 UTC
Sometimes, LO is used to open a file from a website, or a mail message. Such a  file is saved temporarily to /tmp (or some similar location depends on your OS); and it is opened in read-only mode, or at the very least - the user hasn't altered it.

In this case, it may not make a lot of sense to try and recover this file; or at least not to present its being missing as some sort of failure.

I don't have a specific suggestion how to change behavior in this case, but I'm getting these failures almost every time there's a crash, and they're annoying.
Comment 1 pavlog 2020-11-24 20:42:21 UTC
Hello Eyal,

Thank you for reporting the bug.
Unfortunately without clear steps to reproduce it, we cannot track down the origin of the problem.
Please provide a clearer set of step-by-step instructions on how to reproduce the problem.
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the steps are provided
Comment 2 Eyal Rozenberg 2020-11-24 23:37:56 UTC
(In reply to pavlog from comment #1)
> Please provide a clearer set of step-by-step instructions on how to
> reproduce the problem.

I guess I wasn't explicit enough.


1. Ensure LibreOffice is closed
2. Open LibreOffice; ensure no recovery dialog comes up (otherwise handle recovery and return to step 1)
3. Close LibreOffice
4. Open a mail client (say, Thunderbird).
5. View a message with an attachment document you can open with LibreOffice Writer (if you don't have one - send yourself one).
6. Open the file (e.g. by double-clicking it - but this depends on your OS and desktop environment of course); this should launch LO writer with the document
7. Determine where the temporary file LO has opened is located (on Linux and with Thunderbird this might be under /tmp/mozilla_yourname0/the_file )
8. kill the LO process - aggressively (e.g. with kill -9 if you're on Linux/BSD/Mac; I'm not sure End Process on Windows is enough)
9. Remove the copy of the file from wherever it is located
10. Launch LO.

Expected results: No recovery dialog is opened, or a dialog is opened indicating already the special case of a temporary file which is no longer present.

Actual Results: A recovery dialog is opened, like for any other document; and the attempted recovery reports a failure.
Comment 3 pavlog 2020-11-27 19:44:17 UTC
(In reply to Eyal Rozenberg from comment #2)

Thanks for providing the steps. What LO version do you use?

I can't reproduce it in

Version: 7.0.3.1 (x64)
Build ID: d7547858d014d4cf69878db179d326fc3483e082
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL
Comment 4 Eyal Rozenberg 2020-11-27 22:08:08 UTC
(In reply to pavlog from comment #3)
> I can't reproduce it in  7.0.3.1 

I kind of doubt that's possible... What happens on your system after step 10?

> What LO version do you use?

About the same:

Version: 7.0.3.1
Build ID: d7547858d014d4cf69878db179d326fc3483e082
CPU threads: 4; OS: Linux 5.2; UI render: default; VCL: gtk3
Locale: he-IL (en_IL); UI: en-US
Calc: threaded
Comment 5 pavlog 2020-11-28 14:06:04 UTC
(In reply to Eyal Rozenberg from comment #4)
> 
> I kind of doubt that's possible... What happens on your system after step 10?
> 

No recovery dialog is opened, as stated in Expected results
Comment 6 Eyal Rozenberg 2020-11-28 23:11:44 UTC
(In reply to pavlog from comment #5)
> No recovery dialog is opened, as stated in Expected results

At this point I would need the expertise of someone to know the source code, to tell us whether LO actually has logic for this situation, or whether it's "reproduction trouble".

In the mean time - can you tell me how you killed LibreOffice on your system? Maybe that has something to do with it?
Comment 7 pavlog 2020-11-29 07:54:31 UTC
(In reply to Eyal Rozenberg from comment #6)
> (In reply to pavlog from comment #5)

> In the mean time - can you tell me how you killed LibreOffice on your
> system? Maybe that has something to do with it?

I did it as usual by Ctrl+Alt+Del - TaskManager - Processes - End task
Comment 8 Buovjaga 2020-11-29 14:31:29 UTC
I reproduce on Linux, so let's treat this as Linux-only so far.

Arch Linux 64-bit
Version: 7.0.3.1
Build ID: 00(Build:1)
CPU threads: 8; OS: Linux 5.9; UI render: default; VCL: kf5
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
7.0.3-2
Calc: threaded
Comment 9 QA Administrators 2022-11-30 03:47:29 UTC Comment hidden (obsolete)
Comment 10 Eyal Rozenberg 2022-11-30 22:26:36 UTC
Seeing this with :

Version: 7.4.2.3 / LibreOffice Community
Build ID: 40(Build:3)
CPU threads: 4; OS: Linux 6.0; UI render: default; VCL: gtk3
Locale: en-IL (en_IL); UI: en-US
Debian package version: 1:7.4.2-4

Note that, on Linux you can figure out which file is being used by opening a command-line and running `ps aux | grep soffice`. I found my Writer using /tmp/pid-NNNN/the_file_name  as the filename, where NNNN is some number. This may depend on your choice of distribution though or the LO version.