Bug 41080 - FILEOPEN: LibreOffice "hogs" CPU when opening particular RTF file
Summary: FILEOPEN: LibreOffice "hogs" CPU when opening particular RTF file
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.4.3 release
Hardware: All All
: high critical
Assignee: Miklos Vajna
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-21 04:24 UTC by Thomas
Modified: 2012-03-19 14:09 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
How the file should look like (523.60 KB, application/pdf)
2011-09-21 04:33 UTC, Thomas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas 2011-09-21 04:24:02 UTC
When opening the following RTF file in LibreOffice, the opening process seems to enter an endless loop, as it consumes all available CPU time. The program's window is no longer updated, the progress bar is seen only briefly appearing to reach 100%.

http://alex.state.al.us/uploads/29801/ListofSoftwarePrograms.rtf

Installation: Gentoo Linux, using app-office/libreoffice-bin-3.4.3-r2
Comment 1 Thomas 2011-09-21 04:33:06 UTC
Created attachment 51452 [details]
How the file should look like

I should clarify it: LibreOffice does not crash. After some time (1–2 minutes), the file is shown, although the layout is messed up.

Microsoft Word opens the file in a matter of seconds. How it looks like is shown in attached PDF file.
Comment 2 Thomas 2011-09-21 04:33:36 UTC
It is not really a major problem, changing to minor
Comment 3 Jean-Baptiste Faure 2011-09-24 09:24:57 UTC
Same problem with rtf files provided by French public administrations for public procurements.
For example: RTF files available here: http://www.economie.gouv.fr/daj/formulaires-declaration-candidat
These files are necessary to apply and are provided in RTF format only. :-(
So set importance to High / Critical.

Best regards. JBF
Comment 4 Miklos Vajna 2011-10-13 07:44:22 UTC
Thomas,

Can you see if this is still a problem for you with a master build?

I can reproduce the hang with -3-4, but not on master.
Comment 5 Miklos Vajna 2011-10-13 08:09:28 UTC
JBF,

I checked http://www.economie.gouv.fr/files/directions_services/daj/marches_publics/formulaires/DC/imprimes_dc/dc1.rtf, that even crashes master. :)

After tracking it down, it seems the problem is that it has a footnote inside a table, and support for that is buggy in master.

I'll try to fix that soon.
Comment 6 Miklos Vajna 2011-10-14 05:56:36 UTC
Should be fixed in master with http://cgit.freedesktop.org/libreoffice/core/commit/?id=ee2e2a1f5255797f4b4f4c127cf7e82fc44fb541
Comment 7 Jean-Baptiste Faure 2011-10-21 23:24:46 UTC
(In reply to comment #6)
> Should be fixed in master with
> http://cgit.freedesktop.org/libreoffice/core/commit/?id=ee2e2a1f5255797f4b4f4c127cf7e82fc44fb541

Hi Miklos, it works well in the master for my test file. Should it be possible to backport this fix to LibO 3.4.4 ?

Best regards. JBF
Comment 8 Miklos Vajna 2011-10-22 02:59:49 UTC
Hi JBF,

Unfortunately not, as master has a rewritten RTF import filter. A similar fix may not be too hard for the old filter in -3-4, but I don't know that code too much, so definitely lack of free time to prepare such a fix.

Miklos
Comment 9 Jean-Baptiste Faure 2011-10-22 04:57:02 UTC
(In reply to comment #8)
> Hi JBF,
> 
> Unfortunately not, as master has a rewritten RTF import filter. A similar fix
> may not be too hard for the old filter in -3-4, but I don't know that code too
> much, so definitely lack of free time to prepare such a fix.
> 
> Miklos

Ah, ok. I thought the new RTF filter was already in 3.4.

Best regards. JBF
Comment 10 bgrzesiowski 2012-02-16 09:20:38 UTC
Same here. 1 MB rtf file, which can easily be edited in wine's wordpad freezes whole desktop. I repeated the process twice and after reboot – same result: over 3GB of own data as reported by top. Brings back horrible memories of Win 98.

LibO 3.5 Writer, Fedora 16
Comment 11 Miklos Vajna 2012-02-16 09:55:59 UTC
This bug was about:

1) a CPU hog in 3.4 and
2) a crash in 3.5

not about general performance problems with 3.5. See bug 44736, that is still open and tracking this, so commenting here is not necessary.

Thanks.
Comment 12 Jean-Baptiste Faure 2012-03-19 14:09:57 UTC
No crash anymore confirmed in LO 3.5.1. Closing. Thank you.