Bug 47436 - FILEOPEN: Writer crashes when it opens an odt file produced by JasperReport
Summary: FILEOPEN: Writer crashes when it opens an odt file produced by JasperReport
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.1 release
Hardware: All All
: high critical
Assignee: Not Assigned
URL:
Whiteboard: BSA target:3.6.0 target:3.5.4
Keywords: regression
: 49209 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-17 05:41 UTC by Jean-Baptiste Faure
Modified: 2013-07-02 14:24 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
ODT bugdoc which kills LO (17.88 KB, application/vnd.oasis.opendocument.text)
2012-03-17 06:26 UTC, Jean-Baptiste Faure
Details
Valgrind report of the crash (48.77 KB, text/plain)
2012-03-17 07:04 UTC, Arnaud Versini
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Baptiste Faure 2012-03-17 05:41:14 UTC
Problem description: 

Steps to reproduce:
1. open attached odt file

Current behavior: LO 3.5 crashes

Expected behavior: LO 3.5 opens the file as it does in 3.4.5 version

Note 1: I am not sure if the odt file produced by JasperReport is a valid ODF but LO should'nt crash.

Note 2: if I open the file with LO 3.4.5 and save it under a new name, I can open this new file with LO 3.5 but it looks slightly different. The document seems to be a very complicated set of tables with many empty cells. In LO 3.5 it is impossible to hide table boundaries.

Platform (if different from the browser): 
              
Browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0
Comment 1 Jean-Baptiste Faure 2012-03-17 06:26:24 UTC
Created attachment 58597 [details]
ODT bugdoc which kills LO
Comment 2 Jean-Baptiste Faure 2012-03-17 06:31:30 UTC
The bugdoc kills LO 3.5.2 rc0+ (Version ID : c39e96d-a73d29c-73cb0b8-f269e46-686380c) and the master too (LibreOffice 3.6.0alpha0+ 
Build ID: 08ba87c-49d3d39-e67b1bf-879ce36-638d9c).

Best regards. JBF
Comment 3 Jean-Baptiste Faure 2012-03-17 06:55:46 UTC
Version of JasperReports used to produce the bugdoc : 4.5.1
Comment 4 Arnaud Versini 2012-03-17 07:04:27 UTC
Created attachment 58605 [details]
Valgrind report of the crash
Comment 5 Jean-Baptiste Faure 2012-03-17 07:13:01 UTC
Hi Cédric,

Please, have a look at this crash. Perhaps the bugdoc is not a valid ODF file, but LO should'nt crash.

Best regards. JBF
Comment 6 Szabolcs Dézsi 2012-04-19 15:26:13 UTC
Hi!

editeng/source/items/frmitems.cxx:1954

1951:   for (int n(0); n != SAL_N_ELEMENTS(aBorders); ++n)
1952:   {
1953:       editeng::SvxBorderLine* pLine = const_cast< editeng::SvxBorderLine* >( GetLine( aBorders[n] ) );
1954:       pLine->SetStyle( eBorderStyle );
1956:   }

Here pLine is a NULL pointer, so calling its member function (SetStyle) causes SIGSEGV.

Putting 'if( pLine )' before line 1954 causes LO to load the document.
Table boundaries are impossible to hide like you said.

Szabolcs
Comment 7 Not Assigned 2012-04-20 01:39:28 UTC
Dezsi Szabolcs committed a patch related to this issue.
It has been pushed to "master":

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

fdo#47436: Fixed crash while opening odt file.
Comment 8 Jean-Baptiste Faure 2012-04-20 10:56:03 UTC
Works well in master (version 3.6.0alpha0+  (Build ID: 6a018de)). Thank you.

Is this fix backportable to LO 3.5 ?
Setting resolved as fixed anyway.

Best regards. JBF
Comment 9 Not Assigned 2012-04-23 00:10:23 UTC
Dezsi Szabolcs committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1ad284007d898c68665c91979be3bd326c290ba1&g=libreoffice-3-5

fdo#47436: Fixed crash while opening odt file.


It will be available in LibreOffice 3.5.4.
Comment 10 Julien Nabet 2012-04-28 13:01:39 UTC
*** Bug 49209 has been marked as a duplicate of this bug. ***
Comment 11 s-joyemusequna 2012-05-19 09:25:58 UTC
Verified with LOdev 3.6 (master - 18-May-2012 02h44 x86@6-fast; Build ID: 8b1d29b) under Windows Vista 64.