Bug 39856 - Some (probably malformed) RTF files crash LibO 3.4, but opens under LibO 3.3
Summary: Some (probably malformed) RTF files crash LibO 3.4, but opens under LibO 3.3
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
3.4.2 release
Hardware: x86 (IA32) All
: medium critical
Assignee: Miklos Vajna
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2011-08-05 02:22 UTC by Olivier Migeot
Modified: 2016-05-01 15:22 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
An example of such a file (541.79 KB, application/rtf)
2011-08-05 02:22 UTC, Olivier Migeot
Details
Error followed backtrace (42.37 KB, text/plain)
2011-10-25 14:34 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Migeot 2011-08-05 02:22:31 UTC
Created attachment 49948 [details]
An example of such a file

A bit of context : The french ministry of economics (Bercy, for the french of us) provides some useful forms to local administrations (towns, counties, and the such). Those documents are provided in RTF format, and they've often been problematic : random OOo (in the old times) crashes, formatting issues, etc.

Still, the problems seemed to become scarce over the time, and I had a lot less issues with LibO 3.3. Sadly, LibO 3.4 might have included a regression : the very same file that somehow worked on 3.3 freezes 3.4 (blank screen right before the "File import" progress bar completes, 50% CPU usage forever)

It's easy to reproduce, at least on a Windows machine (yet to test on other OSes) : run LibreOffice 3.4, open the given file, and enjoy. The very same process on 3.3 gives us rather quickly a readable content (progress bar goes unnoticed).
Comment 1 tester8 2011-10-08 14:06:52 UTC
Reproduced with

LO 3.4.3 OOO340m1 (Build:302)
Ubuntu 10.04.3 x86
Linux 2.6.32-34-generic Russian UI
Comment 2 Jean-Baptiste Faure 2011-10-20 22:14:24 UTC
I reproduce the problem under Ubuntu 10.04 FR (x86_64) :
- LibO 3.4.3 : CPU at 100%, I need to kill soffice
- master : crash with the following message:
.../master/writerfilter/source/dmapper/DomainMapper.cxx(l3372)
Segmentation fault (core dumped)
- LibO 3.3.3 packaged by Ubuntu (PPA) : opens the file without problem.

Assigned to Miklos. Please feel free to reassign to default if you can't work on this bug. :-) 

Best regards. JBF
Comment 3 Miklos Vajna 2011-10-24 00:22:08 UTC
Hi,

Thanks, will have a look.

Miklos
Comment 4 Julien Nabet 2011-10-25 14:34:30 UTC
Created attachment 52768 [details]
Error followed backtrace

I put the error followed by the bt. (made on Debian Wheezy x86-32 with sources updated this day from git branch master).

Hope it could help.
Comment 5 Miklos Vajna 2011-10-25 15:03:44 UTC
Julien,

Thanks, the bug is probably in DomainMapper_Impl::SetFieldFFData() - will have a look once I find some spare time soon. :)

Miklos
Comment 6 Julien Nabet 2011-10-25 22:47:18 UTC
Hi Miklos,

Yes, it crashes at this line :
FieldContextPtr pContext = m_aFieldStack.top();

But I don't know why m_aFieldStack is empty. I suppose it's better to know why it's empty than to put a check of non emptiness of this field in the DomainMapper_Impl::SetFieldFFData()

Julien.
Comment 7 Miklos Vajna 2011-10-28 16:11:17 UTC
In fact the problem was earlier, the importer tried to parse fly frames inside tables, which it should not do.

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

should fix the issue. If I were at it, I also fixed the import of the 'รจ' character and the state of the checkboxes (the filter marked them as checked, while they were not).
Comment 8 Jean-Baptiste Faure 2011-10-29 08:50:10 UTC
No crash in my current build of the master (Ubuntu 10.04 x86_64).

Thank you very much Miklos :-)

JBF
Comment 9 Jean-Baptiste Faure 2012-03-19 12:59:03 UTC
No crash confirmed with LO 3.5.1. Closing. Thank you.
Comment 10 Jean-Baptiste Faure 2016-05-01 15:22:30 UTC
Should have added keyword regression (comment #2).

Best regards. JBF