Bug 1117300 - [DATA LOSS] Saving a new document can silently overwrite an existing document
Summary: [DATA LOSS] Saving a new document can silently overwrite an existing document
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: LibreOffice (show other bugs)
Version: Leap 42.3
Hardware: x86-64 openSUSE 42.3
: P5 - None : Critical (vote)
Target Milestone: ---
Assignee: Tomáš Chvátal
QA Contact: E-mail List
URL: https://bugs.documentfoundation.org/s...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-26 11:19 UTC by Jean Delvare
Modified: 2019-07-29 16:20 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jean Delvare 2018-11-26 11:19:16 UTC
$ rpm -q libreoffice-calc
libreoffice-calc-6.0.5.2-24.2.x86_64

I have just lost 2 documents because of this bug. First time I had a doubt that maybe I made a mistake. Now I am sure this is a bug and not a user mistake.

How to reproduce:

$ mkdir ~/Documents/bug
$ cd ~/Documents/bug
$ touch data.ods
$ echo foo > crap.csv

Now start Libreoffice Calc, type "bar" in the cell A1 and save the new spreadsheet. Navigate to ~/Documents/bug and select "data.ods" in the list. Then edit the input field at the top to replace ".ods" with ".csv". The input field now reads "data.csv". Press Enter. You are prompted for formatting details of the CSV file, click OK.

Now look at the name of your document in the top bar. It is NOT "data.csv" as you asked. It is "crap.csv". You can check that file "crap.csv" now contains "bar":

$ cat crap.csv
bar

The original contents of the document is forever lost. Libreoffice did not even ask for confirmation before overwriting the existing document.
Comment 1 Jean Delvare 2018-11-26 11:52:29 UTC
The bug does not happen on SLED 12 SP3 with:

$ rpm -q libreoffice-calc
libreoffice-calc-6.0.5.2-43.38.5.x86_64
Comment 2 Jean Delvare 2018-11-26 12:01:00 UTC
I tried other GTK applications too (gedit, leafpad, gimp) in case the problem is with the GTK file chooser, but could not reproduce the bug with these other applications.
Comment 3 Jean Delvare 2018-11-26 13:57:48 UTC
For completeness, the same bug can be reproduced with Writer, just use .odt and .txt as file extensions instead of .ods and .csv.
Comment 4 Tomáš Chvátal 2018-11-26 14:02:13 UTC
(In reply to Jean Delvare from comment #3)
> For completeness, the same bug can be reproduced with Writer, just use .odt
> and .txt as file extensions instead of .ods and .csv.

It looks like VCL->gtk3 bug.

Try to reproduce it with SAL_USE_VCLPLUGIN=gen lowriter too then we would know what to blame.
Comment 5 Tomáš Chvátal 2018-11-26 14:03:05 UTC
Also there should be no difference between sle LO and Leap lo except bundling of gpgme stuff...

Could you try it with the 6.1.3.2 that was released as an update (or is scheduled to be released? There is LibreOffice:6.0 repository too).
Comment 6 Jean Delvare 2018-11-26 16:04:13 UTC
(In reply to Tomáš Chvátal from comment #4)
> Try to reproduce it with SAL_USE_VCLPLUGIN=gen lowriter too then we would
> know what to blame.

With SAL_USE_VCLPLUGIN=gen, the file chooser is completely different. It does not allow listing all supported files, so I can't even select data.ods if I'm going to write as a CSV file. I can't reproduce the bug with that file chooser.
Comment 7 Jean Delvare 2018-11-26 16:23:32 UTC
Bug is still present in libreoffice 6.0.7.3-1.7 from repository LibreOffice:6.0.
Comment 8 Jean Delvare 2018-11-26 16:34:10 UTC
Bug is still present in libreoffice 6.1.3.2-755.3 from repository LibreOffice:6.1.
Comment 9 Tomáš Chvátal 2018-11-27 09:16:23 UTC
Adding gnome team to CC, I have no idea really why it happens on the gtk selector on Leap, yet does not on SLE.


Oh one more thing might be that on SLE12 you have gtk2 selector and on Leap you have gtk3 one (agan the SAL_USE_VCLPLUGIN can be used to switch between them to test it). (also the gtk2 selector should be in package breoffice-gtk2 on leap)
Comment 10 Jean Delvare 2018-11-27 10:50:41 UTC
I installed libreoffice-gtk2 on the Leap 42.3 system, started localc with SAL_USE_VCLPLUGIN=gtk, and the bug no longer happens.

So the bug is in libreoffice-gtk3, and this is why it does not happen on SLED 12 SP3 which does not have this package.
Comment 11 Jean Delvare 2018-11-27 13:36:13 UTC
I can reproduce the bug on an out-of-date Tumbleweed too. I'm updating it now to check if the bug is still present.

I have created an upstream bug report, so that Libreoffice people can take a look and comment.
Comment 12 Jean Delvare 2018-11-27 15:15:35 UTC
Turns out to be an already known bug:

https://bugs.documentfoundation.org/show_bug.cgi?id=119790

Fix for Libreoffice 6.2:

https://gerrit.libreoffice.org/plugins/gitiles/core/+/35b6f75bc14fe65c4700e199d82c958f715420ac%5E%21

Fix for Libreoffice 6.1 (and hopefully 6.0 as well):

https://gerrit.libreoffice.org/plugins/gitiles/core/+/4846848941241f92b32bcffef3489736d1baffec%5E%21

Any chance that this fix will find a way to Leap 42.3 and other affected SUSE products?
Comment 13 Tomáš Chvátal 2018-11-27 15:20:59 UTC
(In reply to Jean Delvare from comment #12)
> Turns out to be an already known bug:
> 
> https://bugs.documentfoundation.org/show_bug.cgi?id=119790
> 
> Fix for Libreoffice 6.2:
> 
> https://gerrit.libreoffice.org/plugins/gitiles/core/+/
> 35b6f75bc14fe65c4700e199d82c958f715420ac%5E%21
> 
> Fix for Libreoffice 6.1 (and hopefully 6.0 as well):
> 
> https://gerrit.libreoffice.org/plugins/gitiles/core/+/
> 4846848941241f92b32bcffef3489736d1baffec%5E%21
> 
> Any chance that this fix will find a way to Leap 42.3 and other affected
> SUSE products?

You can submit the patch to LibreOffice:Factory repo right away to use it yourself if you want.

And it will be part of the next round of updates (6.1.4 for the Leaps [6.1.3 is now in QA]).
Comment 14 Jean Delvare 2018-11-30 08:47:46 UTC
(In reply to Tomáš Chvátal from comment #13)
> You can submit the patch to LibreOffice:Factory repo right away to use it
> yourself if you want.

OK, I have just done that (after confirming that the upstream patch indeed fixes the issue).
Comment 15 Tomáš Chvátal 2019-01-30 09:32:06 UTC
I tried to reproduce the issue myself and can't do so with the current releases.

Please feel free to reopen it if you can still trigger it.
Comment 17 Swamp Workflow Management 2019-02-28 20:16:17 UTC
SUSE-RU-2019:0520-1: An update that has 13 recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1079744,1088266,1095755,1107012,1110345,1110348,1112112,1112113,1112114,1117195,1117300,1124658,882383
CVE References: 
Sources used:
SUSE Linux Enterprise Workstation Extension 12-SP4 (src):    libreoffice-6.1.5.2-43.44.3
SUSE Linux Enterprise Workstation Extension 12-SP3 (src):    libreoffice-6.1.5.2-43.44.3
SUSE Linux Enterprise Software Development Kit 12-SP4 (src):    libreoffice-6.1.5.2-43.44.3
SUSE Linux Enterprise Software Development Kit 12-SP3 (src):    libreoffice-6.1.5.2-43.44.3
SUSE Linux Enterprise Desktop 12-SP4 (src):    libreoffice-6.1.5.2-43.44.3
SUSE Linux Enterprise Desktop 12-SP3 (src):    libreoffice-6.1.5.2-43.44.3
Comment 18 Swamp Workflow Management 2019-03-01 11:14:31 UTC
SUSE-RU-2019:0522-1: An update that has 13 recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1079744,1088266,1095755,1107012,1110345,1110348,1112112,1112113,1112114,1117195,1117300,1124658,882383
CVE References: 
Sources used:
SUSE Linux Enterprise Workstation Extension 15 (src):    libreoffice-6.1.5.2-3.10.3
Comment 19 Swamp Workflow Management 2019-03-13 17:10:40 UTC
openSUSE-RU-2019:0324-1: An update that has 13 recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1079744,1088266,1095755,1107012,1110345,1110348,1112112,1112113,1112114,1117195,1117300,1124658,882383
CVE References: 
Sources used:
openSUSE Leap 42.3 (src):    libreoffice-6.1.5.2-30.3
Comment 21 Swamp Workflow Management 2019-06-07 10:13:23 UTC
openSUSE-RU-2019:1525-1: An update that has 13 recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1079744,1088266,1095755,1107012,1110345,1110348,1112112,1112113,1112114,1117195,1117300,1124658,882383
CVE References: 
Sources used:
openSUSE Leap 15.0 (src):    libreoffice-6.1.5.2-lp150.2.10.1
Comment 23 Swamp Workflow Management 2019-07-29 16:20:10 UTC
SUSE-SU-2019:2003-1: An update that solves one vulnerability and has 18 fixes is now available.

Category: security (important)
Bug References: 1110348,1112112,1112113,1112114,1116451,1117195,1117300,1121874,1123131,1123455,1124062,1124658,1124869,1127760,1127857,1128845,1135189,1135228,882383
CVE References: CVE-2018-16858
Sources used:
SUSE Linux Enterprise Workstation Extension 15-SP1 (src):    libreoffice-6.2.5.2-8.5.1, libwps-0.4.10-7.3.3
SUSE Linux Enterprise Module for Open Buildservice Development Tools 15-SP1 (src):    libreoffice-6.2.5.2-8.5.1, libwps-0.4.10-7.3.3

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.