Bug 64424 - General input/output error crash on opening Word 2007 docx file
Summary: General input/output error crash on opening Word 2007 docx file
Status: RESOLVED DUPLICATE of bug 64249
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.2.2 release
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-10 10:24 UTC by David Viner
Modified: 2013-11-13 20:15 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Word 2007 (Mac) created document that causes the crash upon opening (2.76 MB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2013-05-10 10:24 UTC, David Viner
Details
backtrace (67.58 KB, text/x-log)
2013-05-10 11:08 UTC, Jorendc
Details
bt after naive patch (19.07 KB, text/plain)
2013-05-10 19:48 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Viner 2013-05-10 10:24:57 UTC
Created attachment 79084 [details]
Word 2007 (Mac) created document that causes the crash upon opening

On attempting to open a Word docx file (created with Mac MS Office 2007) I get a General input/output error. This may be a duplicate of bug 64256 but, when opening it in Word 2000, I don't see any graphical bullet points in the document. I don't have a later version of Word so any such bullet points may be being converted upon loading into W2000. I have attached the offending doc for you.

The crash occurs in the release versions of both 4.0.2 and 4.0.3.3 (I am using the release version although I have selected the RC version as the 4.0.3.3 release wasn't an option in the version list when I submitted this bug).

Steps to reproduce:
1. Attempt to open the attached docx file.
Comment 1 Jorendc 2013-05-10 11:08:05 UTC
I can reproduce a crash using Linux Mint 14 x64 with LibreOffice Version: 4.1.0.0.alpha1+ Build ID: 94fdd5d302e34220a0b1beaf3610658d15c7b80

Terminal output:

warn:oox:3181:1:oox/source/helper/propertyset.cxx:139: PropertySet::implSetPropertyValue - cannot set property "LineEndCenter"
warn:oox:3181:1:oox/source/helper/propertyset.cxx:139: PropertySet::implSetPropertyValue - cannot set property "LineEndName"
warn:oox:3181:1:oox/source/helper/propertyset.cxx:139: PropertySet::implSetPropertyValue - cannot set property "LineEndWidth"
warn:oox:3181:1:oox/source/helper/propertyset.cxx:139: PropertySet::implSetPropertyValue - cannot set property "LineJoint"
warn:writerfilter:3181:1:writerfilter/source/dmapper/DomainMapper_Impl.cxx:1715: Exception when adding shape: 
warn:writerfilter:3181:1:writerfilter/source/dmapper/OLEHandler.cxx:114: Exception in OLE Handler: position cannot be determined with this method
/usr/include/c++/4.7/bits/stl_stack.h:160:error: attempt to access an 
    element in an empty container.

Objects involved in the operation:
sequence "this" @ 0x0x1bb3960 {
  type = St5stackIN5boost10shared_ptrIN12writerfilter7dmapper24DomainMapperTableManagerEEENSt7__debug5dequeIS5_SaIS5_EEEE;
}
Comment 2 Jorendc 2013-05-10 11:08:32 UTC
Created attachment 79091 [details]
backtrace
Comment 3 Julien Nabet 2013-05-10 19:48:56 UTC
Created attachment 79120 [details]
bt after naive patch

On pc Debian x86-64 with master sources updated today, I reproduced the crash with same bt as Joren.

I noticed this:
    244     GetParaPortions().Reset();
    245 
    246     ParaPortion* pIniPortion = new ParaPortion( aEditDoc[0] );
    247     GetParaPortions().Insert(0, pIniPortion);

GetParaPortions is declared twice in editeng/source/editeng/editeng.cxx and editeng/source/editeng/impedit.hxx one is const, the other is non const
In both case, it returns "aParaPortionList" which has the type "ParaPortionList".
This last one is a class (present in editdoc.hxx/cxx) containing boost::ptr_vector<ParaPortion> maPortions

Since "Reset" method clear the ptr_vector (see http://opengrok.libreoffice.org/xref/core/editeng/source/editeng/editdoc.cxx#759)
I thought that replacing the call to "Insert" by a call to "Append" would help. But I had a new bt attached.
Comment 4 Julien Nabet 2013-05-10 19:49:54 UTC
Cédric/Michael: one for you?
Comment 5 Cao Cuong Ngo 2013-05-14 15:57:53 UTC

*** This bug has been marked as a duplicate of bug 64249 ***