Bug 106942 - When drive is full and open a file, wrong message for lock (no space for the lock-file)
Summary: When drive is full and open a file, wrong message for lock (no space for the ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.1.2 release
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard: target:6.0.0
Keywords:
Depends on:
Blocks: File-Lock
  Show dependency treegraph
 
Reported: 2017-04-04 11:13 UTC by Juergen Funk (CIB)
Modified: 2018-04-18 06:41 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 Juergen Funk (CIB) 2017-04-04 11:13:48 UTC
Prepare a drive (usb), copy one writer file and generate a big file, Windows Powershell command: 
[io.file]::Create("<Drive>:\bigblob.txt").SetLength((gwmi Win32_LogicalDisk -Filter "DeviceID='<Drive>:'").FreeSpace).Close 
after that free space is 0 Kb.
 
Then open the writer file, in this case you get no message, then close the file without save, and reopen you get the Message-Dialog. When you try to save the document you get the Message-dialog immediately


Message-dialog:
|--------------------------------------------------------------------|
| Document in Use                                                    |
|--------------------------------------------------------------------|
|  Document file 'test.odt' is locked for editing by yourself on a   |
|  different system since                                            |
|                                                                    |
|  Open document read-only, or ignore own file locking and open the  |
|  document for editing.                                             |
|                                                                    |
|      | Open Read-Only |   |     Open     |   |    Cancel    |      |
|--------------------------------------------------------------------|

This message is in this case wrong and confused the user.

The problem is the lock-file was create with space 0, but after closing this lock-file would not be remove.
Comment 1 Buovjaga 2017-04-26 09:35:07 UTC
Not getting the message at all. Confirmed free space == 0.

Win 7 Pro 64-bit, Version: 5.3.1.2 (x64)
Build ID: e80a0e0fd1875e1696614d24c32df0f95f03deb2
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; Layout Engine: new; 
Locale: fi-FI (fi_FI); Calc: CL

Version: 5.4.0.0.alpha0+ (x64)
Build ID: 1f73ac90da31b62ccf6f040c68e5c0150171240f
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2017-04-20_07:32:30
Locale: fi-FI (fi_FI); Calc: CL
Comment 2 Juergen Funk (CIB) 2017-05-18 10:45:37 UTC
Hi  Buovjaga 

i can reproduce the error under Linux and Windows (current master 1807db242a09).
Here a other Test scenario for Windows and Linux:
- Open an document and copy the lockfile 
- Close LO 
- Copy the lockfile to the origin lockfile name
- Remove the content of the lockfile (you get a 0 Byte lockfile)
- Start LO and open the document again.

Now you get the above message, this is the same scenario as above, but here you set the lockfile, otherwise it is the same when no space is left
Comment 3 Buovjaga 2017-05-18 11:00:19 UTC
(In reply to Juergen Funk (CIB) from comment #2)
> Hi  Buovjaga 
> 
> i can reproduce the error under Linux and Windows (current master
> 1807db242a09).
> Here a other Test scenario for Windows and Linux:
> - Open an document and copy the lockfile 
> - Close LO 
> - Copy the lockfile to the origin lockfile name
> - Remove the content of the lockfile (you get a 0 Byte lockfile)
> - Start LO and open the document again.
> 
> Now you get the above message, this is the same scenario as above, but here
> you set the lockfile, otherwise it is the same when no space is left

Repro.

Win 7 Pro 64-bit, Version: 5.3.1.2 (x64)
Build ID: e80a0e0fd1875e1696614d24c32df0f95f03deb2
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; Layout Engine: new; 
Locale: fi-FI (fi_FI); Calc: CL
Comment 4 Commit Notification 2017-06-06 13:58:39 UTC
Juergen Funk committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6ca3b3648e25ae9d4d2d29a0df83349198ec3f5e

tdf#106942 Wrong message when lock file is empty or corrupt

It will be available in 5.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2017-06-22 09:35:54 UTC
Juergen Funk committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=af9bea21390800e5bbc73e07ce9828189d8dabf3

Improve tdf#106942: always erase empty/corrupt lockfile

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Xisco Faulí 2017-07-23 11:42:03 UTC
Polite ping: is this bug fixed? if so, please close it as RESOLVED FIXED
Comment 7 Juergen Funk (CIB) 2017-07-24 06:34:58 UTC
Hi Xisco Faulí,

it is fixed, but the dialog-texts only in english, the other language should be translate, and not forget the text in "uui/source/lockfailed.src" "STR_LOCKFAILED_MSG" is improve