Bug 153087 - When opening files, the message "Write error. Unable to write file." (Quickstarter related?)
Summary: When opening files, the message "Write error. Unable to write file." (Quickst...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.4.0.3 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: possibleRegression
: 153471 (view as bug list)
Depends on:
Blocks: Quickstarter
  Show dependency treegraph
 
Reported: 2023-01-18 10:52 UTC by Vladislav
Modified: 2023-04-06 10:57 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the error (13.87 KB, image/png)
2023-01-27 18:43 UTC, Vladislav
Details
Error after running CCleaner. (2.27 MB, video/mp4)
2023-04-04 06:32 UTC, Mariusz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladislav 2023-01-18 10:52:07 UTC
Description:
Starting with version 7.4.2 on many different computers with Windows 10 and LO fast startup enabled, when trying to open an ODT or ODS LO document at a random time, it gives the error "Write error. Unable to write file.". The occurrence does not depend on whether the user has administrator rights.

Steps to Reproduce:
1. Activate fast loading LO, make sure that the corresponding icon appears in the tray.
2. Open *.odt files (possibly also *.ods) in everyday mode or try to create a new ODT document from a tray component or from a running Writer or Calc.

Actual Results:
At a random moment in time, files stop opening or being created, instead a window is displayed with the error message "Write error. Unable to write file.".

Expected Results:
Documents should be created and opened without this error.


Reproducible: Sometimes


User Profile Reset: No

Additional Info:
Temporarily this is cured by unloading the "LO Quick Launch" component from the memory by right-clicking on the icon in the tray, or by ending the OS user session and re-entering it (re-authorization in the OS).

Version: 7.4.3.2 (x64) / LibreOffice Community
Build ID: 1048a8393ae2eeec98dff31b5c133c5f1d08b890
CPU threads: 6; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: CL
Comment 1 Roman Kuznetsov 2023-01-27 17:00:33 UTC
This happens with different files? May be people uses some the same template?
Could you try just disable "LO Quick Launch" for all people and then look if the problem will be still there?
Comment 2 Vladislav 2023-01-27 18:41:00 UTC
(In reply to Roman Kuznetsov from comment #1)
> This happens with different files? May be people uses some the same template?
> Could you try just disable "LO Quick Launch" for all people and then look if
> the problem will be still there?

1. Templates users do not use at all.
2. Disabling Quick Launch solves the problem, but is not an acceptable solution because it causes each document to take a long time to open.
3. This problem remains in version 7.4.4.
Comment 3 Vladislav 2023-01-27 18:43:28 UTC
Created attachment 184965 [details]
Screenshot of the error
Comment 4 Roman Kuznetsov 2023-01-27 19:21:10 UTC
So, you didn't see the problem in 7.3 version?
Comment 5 Vladislav 2023-01-29 16:16:48 UTC
(In reply to Roman Kuznetsov from comment #4)
> So, you didn't see the problem in 7.3 version?
Yes.
Comment 6 Roman Kuznetsov 2023-01-29 20:10:53 UTC
I can't repro it in current dev version

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 0bb90afaeb193181d7b98b79e962549d8a1dd85a
CPU threads: 16; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL threaded
Comment 7 Buovjaga 2023-03-28 11:29:56 UTC
*** Bug 153471 has been marked as a duplicate of this bug. ***
Comment 8 Buovjaga 2023-03-28 11:30:39 UTC
NEW per dupe
Comment 9 Mariusz 2023-03-28 11:50:15 UTC
On my Windows 7 x64 is 100% reproducible.
Maybe it also depends on the version of windows or installed add-ons or updates in the system.
Comment 10 Mariusz 2023-03-28 12:01:59 UTC
I can send a video shot of how this error appears.
Comment 11 Mariusz 2023-04-04 06:31:15 UTC
This error occurs after running CCleaner. Before version 7.4.0, this error did not occur after running CCleaner. I attach a video of the error occurring.
Comment 12 Mariusz 2023-04-04 06:32:52 UTC
Created attachment 186462 [details]
Error after running CCleaner.
Comment 13 Buovjaga 2023-04-04 07:25:18 UTC
(In reply to Mariusz from comment #11)
> This error occurs after running CCleaner. Before version 7.4.0, this error
> did not occur after running CCleaner. I attach a video of the error
> occurring.

But isn't that intentional sabotage, then?
Comment 14 Mariusz 2023-04-04 07:33:13 UTC
(In reply to Buovjaga from comment #13)
> (In reply to Mariusz from comment #11)
> > This error occurs after running CCleaner. Before version 7.4.0, this error
> > did not occur after running CCleaner. I attach a video of the error
> > occurring.
> 
> But isn't that intentional sabotage, then?

CCleaner starts in autostart. It cleans the system of junk, removes history, compacts browser databases. For me, it is indispensable.
Comment 15 Buovjaga 2023-04-04 08:30:10 UTC
(In reply to Mariusz from comment #14)
> (In reply to Buovjaga from comment #13)
> > (In reply to Mariusz from comment #11)
> > > This error occurs after running CCleaner. Before version 7.4.0, this error
> > > did not occur after running CCleaner. I attach a video of the error
> > > occurring.
> > 
> > But isn't that intentional sabotage, then?
> 
> CCleaner starts in autostart. It cleans the system of junk, removes history,
> compacts browser databases. For me, it is indispensable.

Can you check what CCleaner removes that causes this?
Comment 16 Mariusz 2023-04-04 08:50:11 UTC
(In reply to Buovjaga from comment #15)
> (In reply to Mariusz from comment #14)
> > (In reply to Buovjaga from comment #13)
> > > (In reply to Mariusz from comment #11)
> > > > This error occurs after running CCleaner. Before version 7.4.0, this error
> > > > did not occur after running CCleaner. I attach a video of the error
> > > > occurring.
> > > 
> > > But isn't that intentional sabotage, then?
> > 
> > CCleaner starts in autostart. It cleans the system of junk, removes history,
> > compacts browser databases. For me, it is indispensable.
> 
> Can you check what CCleaner removes that causes this?

It's cleaning up temporary files.
Comment 17 Buovjaga 2023-04-04 09:01:17 UTC
(In reply to Mariusz from comment #16)
> (In reply to Buovjaga from comment #15)
> > (In reply to Mariusz from comment #14)
> > > (In reply to Buovjaga from comment #13)
> > > > (In reply to Mariusz from comment #11)
> > > > > This error occurs after running CCleaner. Before version 7.4.0, this error
> > > > > did not occur after running CCleaner. I attach a video of the error
> > > > > occurring.
> > > > 
> > > > But isn't that intentional sabotage, then?
> > > 
> > > CCleaner starts in autostart. It cleans the system of junk, removes history,
> > > compacts browser databases. For me, it is indispensable.
> > 
> > Can you check what CCleaner removes that causes this?
> 
> It's cleaning up temporary files.

Please give the exact LibreOffice files that it cleans.
Comment 18 Mariusz 2023-04-04 09:08:49 UTC
(In reply to Buovjaga from comment #17)
> (In reply to Mariusz from comment #16)
> > (In reply to Buovjaga from comment #15)
> > > (In reply to Mariusz from comment #14)
> > > > (In reply to Buovjaga from comment #13)
> > > > > (In reply to Mariusz from comment #11)
> > > > > > This error occurs after running CCleaner. Before version 7.4.0, this error
> > > > > > did not occur after running CCleaner. I attach a video of the error
> > > > > > occurring.
> > > > > 
> > > > > But isn't that intentional sabotage, then?
> > > > 
> > > > CCleaner starts in autostart. It cleans the system of junk, removes history,
> > > > compacts browser databases. For me, it is indispensable.
> > > 
> > > Can you check what CCleaner removes that causes this?
> > 
> > It's cleaning up temporary files.
> 
> Please give the exact LibreOffice files that it cleans.

It is an empty folder lu12010126gv21.tmp. But each time it has a different name (lu..........tmp).
Comment 19 Stephan Bergmann 2023-04-04 09:17:17 UTC
(In reply to Mariusz from comment #18)
> It is an empty folder lu12010126gv21.tmp. But each time it has a different
> name (lu..........tmp).

Please state the full path of that empty folder.
Comment 20 Mariusz 2023-04-04 09:42:05 UTC
(In reply to Stephan Bergmann from comment #19)
> (In reply to Mariusz from comment #18)
> > It is an empty folder lu12010126gv21.tmp. But each time it has a different
> > name (lu..........tmp).
> 
> Please state the full path of that empty folder.

C:\Users\%USERPROFILE%\AppData\Local\Temp\lu..........tmp
Comment 21 Mike Kaganski 2023-04-06 10:40:41 UTC
(In reply to Mariusz from comment #11)
> This error occurs after running CCleaner. Before version 7.4.0, this error
> did not occur after running CCleaner. I attach a video of the error
> occurring.

I watched the video, and see that the problem is the removal of the temporary files *while the program that uses them is open* (the quicklauncher). And that is plain wrong - to remove the temporary files of *running* applications. Sorry, I didn't realize this bit of the problem before.

No matter if that happened to work, if it did then it only happened by chance. And any application is free to decide to use different tempfile strategy. If a user believes that tempfiles are created for a joke, they are mistaken.

Removal of all temporary files is a destructive process. It may only occur when the user knows what they do. If done incorrectly, the refusal to open files would be the least dangerous problem. Programs may crash, or save garbage to files, or fail in any other thinkable way.

(In reply to Mariusz from comment #14)
> CCleaner starts in autostart. It cleans the system of junk, removes history,
> compacts browser databases.

And this is exactly the wrong way to clean temporary files. Because it competes to do it before the programs start; and Windows will decide itself which of the autostarted applications would start in which order. If quicklauncher happened to already start, it already uses the files. Removing them is wrong.

Having said that, I can speculate that the program originated from some recent work of Armin in bug 126742, specifically in commit 4a75df6d31ac6362957104f976c05e7c425cdc50. I suspect that now it's possible to modify and remove files that are opened by LibreOffice on Windows, and that allows CCleaner to destroy stuff.
Comment 22 Mariusz 2023-04-06 10:56:49 UTC
Indeed, CCleaner should start first in the autostart but this is probably impossible to set. I have currently disabled cleaning of the TEMP directory. Until I discovered that it was the directory deletion that was causing the problem, I thought it was a bug. Versions of LibreOffice before 7.4.0 did not create this directory so I had no idea what was causing this error. By trial and error, I managed to find the cause.
Comment 23 Mike Kaganski 2023-04-06 10:57:09 UTC
STR:

0. Configure LibreOffice to "Load during system start-up".
1. Make sure LibreOffice process (including quicklauncher) is not running.
2. Open system TEMP directory in file manager, to watch its content.
3. Open LibreOffice. See that quicklauncher is started.
4. Close LibreOffice. See that quicklauncher keeps running.
5. Try opening files in LibreOffice, see that succeeding.
6. In the system TEMP directory, see that there is an empty directory now, named like lu11144d8wy4y.tmp, created when LibreOffice started at step #3. Delete the directory.
7. Now try opening LibreOffice documents. See the problem.

Indeed, restarting LibreOffice process would resolve the problem.