Bug 40012 - Incorrectly opened very simple rtf file in 3.4.2, regression compared to 3.3
Summary: Incorrectly opened very simple rtf file in 3.4.2, regression compared to 3.3
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.4.2 release
Hardware: x86 (IA32) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-11 06:46 UTC by Volker Blum
Modified: 2012-03-19 13:12 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
offending rtf file (31.33 KB, text/rtf)
2011-08-11 06:46 UTC, Volker Blum
Details
Screenshot in LO 3.3.x (19.51 KB, image/png)
2011-08-11 06:47 UTC, Volker Blum
Details
Screenshot in LO 3.4.2 on MacOSX (incorrect import!) (18.63 KB, image/png)
2011-08-11 06:48 UTC, Volker Blum
Details
minimal testcase (same as "offending rtf file", but all formatting removed) (397 bytes, text/rtf)
2011-09-13 18:05 UTC, Mike Kaganski
Details
The same data after resave in MS WordPad and cleanup (343 bytes, text/rtf)
2011-09-13 18:20 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Blum 2011-08-11 06:46:21 UTC
Created attachment 50127 [details]
offending rtf file

This is an offshoot of Bug 39862, attempting to build a minimal test case that reproduces the crash reported there.

The attached rtf file (yet to come) was created freshly by MS Word, untitled. It contains

- text
- a table
- text

The screenshots (yet to come) show that it opens correctly on LO 3.3 as everywhere else, but not on 3.4.2.
Comment 1 Volker Blum 2011-08-11 06:47:51 UTC
Created attachment 50128 [details]
Screenshot in LO 3.3.x
Comment 2 Volker Blum 2011-08-11 06:48:39 UTC
Created attachment 50129 [details]
Screenshot in LO 3.4.2 on MacOSX (incorrect import!)
Comment 3 noname 2011-08-11 11:29:28 UTC
Confirmed with [Win2K LibreOffice 3.4.2 OOO340m1 (Build:203)].

Table isn't shown correct. But when saving the original file with go-oo 3.2.1, loading it in LO, the table is shown correct. Also notice that go-oo and LO seems to cut the filesize quite a bit (unused data ?), going from 31K to around 6-8K. You might wanna try this in 3.3.3.
Comment 4 Jeffrey 2011-08-20 20:50:59 UTC
Confirmed for LibreOffice 3.4  340m1(Build:103) on OpenSuse Linux KDE.
Comment 5 Mike Kaganski 2011-09-13 18:05:25 UTC
Created attachment 51169 [details]
minimal testcase (same as "offending rtf file", but all formatting removed)
Comment 6 Mike Kaganski 2011-09-13 18:20:11 UTC
Created attachment 51170 [details]
The same data after resave in MS WordPad and cleanup

I have removed everything irrelevant from the Untitled.rtf by Volker Blum. Now this file (Cleanup.rtf) is below 400 bytes long, and contains just the text and the table, but without any formatting. Note that the borders of the table are invisible, so it may be necessary to show table borders. This file shows the same incorrect formatting in LO that the original file.

After that, I opened it in WordPad and saved again as Cleanup1.rtf, and cleaned it to include only necessary information. Now it is opened correctly in LO.

The comparison of the contents of these files (using any plain text editor) makes it look like the original file (and Cleanup.rtf) are not well-formatted. One may notice that an extra row is defined below the last visible table row (lines 20-25 of Cleanup.rtf). Other differences are in the row definitions.

However incorrect this file could be, it is very common that such files are generated by some software. Our organization, for example, is heavily affected by this issue because our e-banking software generates such files.

Naturally, I will report this problem to the other software makers. And personally I would prefer this issue to be marked as invalid here, because othervise, if you will fix it, this way you will support those software makers who generate improper files. This will make such files more common, thus doing a bad job to everyone.
Comment 7 Volker Blum 2011-09-13 23:29:52 UTC
Hi Mike:

"personally I would prefer this issue to be marked as invalid here"

I have heard this argument many times before. This will mean that no one will be able to exchange files with others that use MS Word. The file in question came straight from there. 

I think that ignoring the issue will not be a practical solution. You may wish to create a separate format category "MS Word rtf" to mark the distinction, but it seems that the old rtf import filter was built to read exactly such files, too. The new one no longer does it.

best
VB

On Sep 14, 2011, at 3:20 AM, bugzilla-daemon@freedesktop.org wrote:

> https://bugs.freedesktop.org/show_bug.cgi?id=40012
> 
> --- Comment #6 from Mike Kaganski <mikekaganski@hotmail.com> 2011-09-13 18:20:11 PDT ---
> Created an attachment (id=51170)
> --> (https://bugs.freedesktop.org/attachment.cgi?id=51170)
> The same data after resave in MS WordPad and cleanup
> 
> I have removed everything irrelevant from the Untitled.rtf by Volker Blum. Now
> this file (Cleanup.rtf) is below 400 bytes long, and contains just the text and
> the table, but without any formatting. Note that the borders of the table are
> invisible, so it may be necessary to show table borders. This file shows the
> same incorrect formatting in LO that the original file.
> 
> After that, I opened it in WordPad and saved again as Cleanup1.rtf, and cleaned
> it to include only necessary information. Now it is opened correctly in LO.
> 
> The comparison of the contents of these files (using any plain text editor)
> makes it look like the original file (and Cleanup.rtf) are not well-formatted.
> One may notice that an extra row is defined below the last visible table row
> (lines 20-25 of Cleanup.rtf). Other differences are in the row definitions.
> 
> However incorrect this file could be, it is very common that such files are
> generated by some software. Our organization, for example, is heavily affected
> by this issue because our e-banking software generates such files.
> 
> Naturally, I will report this problem to the other software makers. And
> personally I would prefer this issue to be marked as invalid here, because
> othervise, if you will fix it, this way you will support those software makers
> who generate improper files. This will make such files more common, thus doing
> a bad job to everyone.
> 
> -- 
> Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You reported the bug.

--------------------------------------------------
Dr. Volker Blum
Fritz-Haber-Institut der MPG
Abteilung Theorie
Faradayweg 4-6
D-14195 Berlin, Germany
phone +49 30 8413 4846
fax +49 30 8413 4701
blum@fhi-berlin.mpg.de
---key:1-0.0735-11600-23.05:fhi---
Comment 8 Mike Kaganski 2011-09-14 18:06:22 UTC
(In reply to comment #7)

Well, I overlooked the source of the original file. My mistake. Now I have checked with my Windows version of MS Word 2010, and got the same wrong results as you have.

This makes my statement that this is "not a LO bug" false. MS is the original creator and maintainer of the RTF standard, and it developed RTF to be capable to hold all the features of MS Word up to version 2007 inclusive (http://www.microsoft.com/download/en/details.aspx?id=10725). Their MS Word is the reference implementation of this standard, so if LO cannot render a RTF file created by MS Word, then it is a true bug in LO.

I can only try to excuse myself that I made some efforts to simplify searching for root cause of the bug to developers by cleaning up the file to narrow down the problem.

By the way, you could do the same with your other bug (Bug 39862), by editing your file with a plain text editor to narrow down the problem and remove any confidential info.
Comment 9 Jean-Baptiste Faure 2011-12-11 03:23:57 UTC
All three files open correctly in libreoffice-3-5 branch (next release 3.5.0 which contains the new RTF filter) under Ubuntu 10.04 x86_64 with FR langpack.
Will make same tests under MS-Windows before to mark this bug fixed.

Best regards. JBF
Comment 10 Jean-Baptiste Faure 2011-12-11 10:48:02 UTC
(In reply to comment #9)
> All three files open correctly in libreoffice-3-5 branch (next release 3.5.0
> which contains the new RTF filter) under Ubuntu 10.04 x86_64 with FR langpack.
> Will make same tests under MS-Windows before to mark this bug fixed.
> 
> Best regards. JBF

Ok in MS-Windows-XP too (LOdev 3.5.0 Build ID: f923851-95bcc5e-4c1bcb5)

I suggest you to test with the next 3.5.0 beta-1 which would be available next week.

Best regards. JBF
Comment 11 Jean-Baptiste Faure 2012-03-19 13:12:14 UTC
Works as expected in LO 3.5.1. Closing. Thank you.