Bug 91095 - crash exporting the given docx to docbook
Summary: crash exporting the given docx to docbook
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
4.4.3.2 release
Hardware: All Linux (All)
: high major
Assignee: Miklos Vajna
URL:
Whiteboard: target:5.0.0 target:5.0.0.0.beta2 tar...
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2015-05-05 12:30 UTC by Laurent Godard
Modified: 2015-12-17 09:03 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
the offending docx file (anonymized) (18.69 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2015-05-05 12:30 UTC, Laurent Godard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Godard 2015-05-05 12:30:00 UTC
Created attachment 115339 [details]
the offending docx file (anonymized)

when saving this docx file in GUI using "xml:Docbook File" filter, libreoffice crashes

using --convert-to --headlesss fails silently

no problem with 4.4.2 so it seems to be a regression

same problem is also reported for 4.3.7

* a reported stacktrace

$ soffice --headless --convert-to "xml:DocBook File" bork.docx
convert /home/sweet/bork.docx -> /home/sweet/bork.xml using filter :
DocBook File
Overwriting: /home/sweet/bork.xml
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f5992fd26ba, pid=22216, tid=140023089584096
#
# JRE version: OpenJDK Runtime Environment (7.0_79-b14) (build 1.7.0_79-b14)
# Java VM: OpenJDK 64-Bit Server VM (24.79-b02 mixed mode linux-amd64
compressed oops)
# Derivative: IcedTea 2.5.5
# Distribution: Debian GNU/Linux 7.8 (wheezy), package 7u79-2.5.5-1~deb7u1
# Problematic frame:
# C  [libsvxcorelo.so+0x3986ba]
SdrObjCustomShape::GetSdrObjectFromCustomShape() const+0x1a
#
# Failed to write core dump. Core dumps have been disabled. To enable
core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/sweet/hs_err_pid22216.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
#   http://icedtea.classpath.org/bugzilla
#
Comment 1 Andras Timar 2015-05-05 16:58:35 UTC
Program received signal SIGSEGV, Segmentation fault.
0x00002aaacdfa8c36 in (anonymous namespace)::EnhancedCustomShapeEngine::ImplForceGroupWithText (this=0x78145a0, pCustoObj=0x2de65f0, 
    pRenderedShape=0x781be80) at /home/timar/libreoffice-master/svx/source/customshapes/EnhancedCustomShapeEngine.cxx:185
185	                static_cast<SdrObjGroup*>(pRenderedShape)->GetSubList()->NbcInsertObject( pShadowGeometry->Clone(), 0 );
Missing separate debuginfos, use: zypper install libgcrypt20-debuginfo-1.6.1-8.3.1.x86_64 libgpg-error0-debuginfo-1.15-1.2.x86_64
(gdb) bt
#0  0x00002aaacdfa8c36 in (anonymous namespace)::EnhancedCustomShapeEngine::ImplForceGroupWithText(SdrObjCustomShape const*, SdrObject*) (this=0x78145a0, pCustoObj=0x2de65f0, pRenderedShape=0x781be80)
    at /home/timar/libreoffice-master/svx/source/customshapes/EnhancedCustomShapeEngine.cxx:185
#1  0x00002aaacdfa9a52 in (anonymous namespace)::EnhancedCustomShapeEngine::render() (this=0x78145a0)
    at /home/timar/libreoffice-master/svx/source/customshapes/EnhancedCustomShapeEngine.cxx:357
#2  0x00002aaacfd79e17 in XMLShapeExport::checkForCustomShapeReplacement(com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const&) (this=0x752dd30, xShape=uno::Reference to (SwXShape *) 0x780e3a0)
    at /home/timar/libreoffice-master/xmloff/source/draw/shapeexport.cxx:249
#3  0x00002aaacfd7a19a in XMLShapeExport::collectShapeAutoStyles(com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const&) (this=0x752dd30, xShape=uno::Reference to (SwXShape *) 0x780e3a0) at /home/timar/libreoffice-master/xmloff/source/draw/shapeexport.cxx:281
#4  0x00002aaacffef49c in XMLTextParagraphExport::exportAnyTextFrame(com::sun::star::uno::Reference<com::sun::star::text::XTextContent> const&, XMLTextParagraphExport::FrameType, bool, bool, bool, com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> const*) (this=
    0x7766e20, rTxtCntnt=uno::Reference to (SwXShape *) 0x780e388, eType=XMLTextParagraphExport::FT_SHAPE, bAutoStyles=true, bIsProgress=false, bExportContent=true, pRangePropSet=0x0) at /home/timar/libreoffice-master/xmloff/source/text/txtparae.cxx:2821
#5  0x00002aaacfff6672 in XMLTextParagraphExport::exportShape(com::sun::star::uno::Reference<com::sun::star::text::XTextContent> const&, bool, com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> const*) (this=0x7766e20, rTextContent=uno::Reference to (SwXShape *) 0x780e388, bAutoStyles=true, pRangePropSet=0x0) at /home/timar/libreoffice-master/include/xmloff/txtparae.hxx:737
#6  0x00002aaacffe8720 in XMLTextParagraphExport::collectTextAutoStylesOptimized(bool) (this=0x7766e20, bIsProgress=true)
    at /home/timar/libreoffice-master/xmloff/source/text/txtparae.cxx:1564
#7  0x00002aaaca43c43b in SwXMLExport::_ExportAutoStyles() (this=0x7786650)
    at /home/timar/libreoffice-master/sw/source/filter/xml/xmlfmte.cxx:222
#8  0x00002aaacfcf83e6 in SvXMLExport::ImplExportAutoStyles(bool) (this=0x7786650)
    at /home/timar/libreoffice-master/xmloff/source/core/xmlexp.cxx:1244
#9  0x00002aaacfcf94dd in SvXMLExport::exportDoc(xmloff::token::XMLTokenEnum) (this=0x7786650, eClass=xmloff::token::XML_TEXT)
    at /home/timar/libreoffice-master/xmloff/source/core/xmlexp.cxx:1507
Comment 2 Matthew Francis 2015-05-06 05:21:21 UTC
This seems to have begun at the below commit.
Adding Cc: to vmiklos@collabora.co.uk; Could you possibly take a look at this one? Thanks

    commit d379d18666aa42031359ca8eb34b0021960347ae
    Author:     Miklos Vajna <vmiklos@collabora.co.uk>
    AuthorDate: Wed Jun 18 11:57:31 2014 +0200
    Commit:     Miklos Vajna <vmiklos@collabora.co.uk>
    CommitDate: Wed Jun 18 12:09:15 2014 +0200
    
        oox: import WPS shape with text as shape with textbox
    
        This allows having real shapes (like having rounded corners) and complex
        content (like containing a table) at the same time.
    
        WPS shapes are wrappers around drawingML markup in DOCX files, so this
        only affects the DOCX import.
    
        Change-Id: Iad1c1c61233be1c17efa1821e680927aa9587215
Comment 3 Joel Madero 2015-05-06 05:42:31 UTC
ed59b3478e490b0f62ce803180bcfa316fe33004 is the first bad commit
commit ed59b3478e490b0f62ce803180bcfa316fe33004
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Mon May 12 02:45:55 2014 +0000

    source-hash-eceba5512636445c9ce827e2d6151875a4fc4673
    
    commit eceba5512636445c9ce827e2d6151875a4fc4673
    Author:     Eike Rathke <erack@redhat.com>
    AuthorDate: Sat Mar 22 03:08:50 2014 +0100
    Commit:     Eike Rathke <erack@redhat.com>
    CommitDate: Sat Mar 22 03:43:42 2014 +0100
    
        no need to use the getter here
    
        Change-Id: I5bbec2c06a641729194ceee3882b88e7372d41a9

:100644 100644 72f1592f15110c1514b32308a0a74b8db311e7c4 2aaf839e81bfe698f6a0a8e974a8e6be6afb624d M	ccache.log
:100644 100644 31282591d5e24e71d76d258a5ad5e408c931b39d bb5a2c64d9c281fcae0a61ca87a99bac03e28d7d M	commitmsg
:100644 100644 e0c15174328ecf469154dd915b1db31d426bc4db f8f89802bf56def0915b08f39f2823a6960692bb M	make.log
:040000 040000 6201f1722de5826235386e7a2b189cdf26a0a499 8b25d749761db74ffcc5ac818945c69decd41724 M	opt


# bad: [423a84c4f7068853974887d98442bc2a2d0cc91b] source-hash-c15927f20d4727c3b8de68497b6949e72f9e6e9e
# good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
git bisect start 'latest' 'oldest'
# good: [e02439a3d6297a1f5334fa558ddec5ef4212c574] source-hash-6b8393474974d2af7a2cb3c47b3d5c081b550bdb
git bisect good e02439a3d6297a1f5334fa558ddec5ef4212c574
# good: [4850941efe43ae800be5c76e1102ab80ac2c085d] source-hash-980a6e552502f02f12c15bfb1c9f8e6269499f4b
git bisect good 4850941efe43ae800be5c76e1102ab80ac2c085d
# good: [a900e72b6357882284c5955bdf939bf14269f5fb] source-hash-dd1050b182260a26a1d0ba6d0ef3a6fecc3f4e07
git bisect good a900e72b6357882284c5955bdf939bf14269f5fb
# skip: [e80660c5a1d812cd04586dae1f22767fc3778c4a] source-hash-07c60c8ee2d1465544a6a39e57bc06b3690b8dfb
git bisect skip e80660c5a1d812cd04586dae1f22767fc3778c4a
# bad: [df9bcaed2faa2a8d11b19f877cdff3a12a887278] source-hash-6ba9692d8bbe3e3c245aca9a7c928e81178d05f1
git bisect bad df9bcaed2faa2a8d11b19f877cdff3a12a887278
# bad: [9d57c189d74551d2b3770cc81139ea10a62e672f] source-hash-5b5e62650354788e50b44f32c22b687b2018aba9
git bisect bad 9d57c189d74551d2b3770cc81139ea10a62e672f
# good: [ce81582766413e76a63c047bfd6227ab12fcd866] source-hash-3d1b1eea83703919c43620f9adef05e5b24c4bed
git bisect good ce81582766413e76a63c047bfd6227ab12fcd866
# bad: [87bfccc81c2d8028642492b80505217d7b42a5a8] source-hash-5b4b6b2aad548cdc27ba2aa7d87ff584ec7e97dd
git bisect bad 87bfccc81c2d8028642492b80505217d7b42a5a8
# good: [5aabfb0ff009add636c42a60c05cc03bbf5cc1dd] source-hash-f2130cea98f6c9ce7c90207828f5d0c7ec3e4020
git bisect good 5aabfb0ff009add636c42a60c05cc03bbf5cc1dd
# bad: [54cb1e734a8a8afb71a38fb1ff0f61103af44147] source-hash-1b922da415339726fb0186246dba6a03429b33bf
git bisect bad 54cb1e734a8a8afb71a38fb1ff0f61103af44147
# bad: [ed59b3478e490b0f62ce803180bcfa316fe33004] source-hash-eceba5512636445c9ce827e2d6151875a4fc4673
git bisect bad ed59b3478e490b0f62ce803180bcfa316fe33004
# first bad commit: [ed59b3478e490b0f62ce803180bcfa316fe33004] source-hash-eceba5512636445c9ce827e2d6151875a4fc4673
Comment 4 Laurent Godard 2015-05-06 09:09:46 UTC
in case it helps, some extra console outputs 

* on loading the document

warn:writerfilter:13137:1:writerfilter/source/dmapper/DomainMapper_Impl.cxx:563: no context of type 1 available
...
<a lot of same line>
...
warn:writerfilter:13137:1:writerfilter/source/dmapper/DomainMapper_Impl.cxx:563: no context of type 1 available
warn:sw.uno:13137:1:sw/source/core/unocore/unotext.cxx:2280: Exception when setting property: HorizontalBorder. Message: 
warn:sw.uno:13137:1:sw/source/core/unocore/unotext.cxx:2280: Exception when setting property: VerticalBorder. Message: 
warn:sw.uno:13137:1:sw/source/core/unocore/unotext.cxx:2280: Exception when setting property: BottomBorder. Message: 
warn:sw.uno:13137:1:sw/source/core/unocore/unotext.cxx:2280: Exception when setting property: LeftBorder. Message: 
warn:sw.uno:13137:1:sw/source/core/unocore/unotext.cxx:2280: Exception when setting property: RightBorder. Message: 
warn:sw.uno:13137:1:sw/source/core/unocore/unotext.cxx:2280: Exception when setting property: TopBorder. Message: 
...
<a lot of same lines>
...
warn:sw.uno:13137:1:sw/source/core/unocore/unotext.cxx:2280: Exception when setting property: HorizontalBorder. Message: 
warn:sw.uno:13137:1:sw/source/core/unocore/unotext.cxx:2280: Exception when setting property: VerticalBorder. Message: 
warn:sw.uno:13137:1:sw/source/core/unocore/unotext.cxx:2280: Exception when setting property: BottomBorder. Message: 
warn:sw.uno:13137:1:sw/source/core/unocore/unotext.cxx:2280: Exception when setting property: LeftBorder. Message: 
warn:sw.uno:13137:1:sw/source/core/unocore/unotext.cxx:2280: Exception when setting property: RightBorder. Message: 
warn:sw.uno:13137:1:sw/source/core/unocore/unotext.cxx:2280: Exception when setting property: TopBorder. Message: 
warn:legacy.osl:13206:1:vcl/source/filter/wmf/emfwr.cxx:1526: EMFWriter::ImplWriteActions: unsupported MetaAction #150
warn:legacy.osl:13206:1:vcl/source/filter/wmf/wmfwr.cxx:1636: WMFWriter::WriteRecords: unsupported MetaAction #150
warn:legacy.osl:13206:1:oox/source/core/contexthandler2.cxx:112: ContextHandler2Helper::implEndElement - context stack broken
warn:writerfilter:13206:1:writerfilter/source/dmapper/DomainMapper.cxx:1047: DomainMapper::lcl_attribute: unhandled token: 92354
warn:legacy.osl:13206:1:oox/source/helper/storagebase.cxx:67: StorageBase::StorageBase - missing base input stream
warn:legacy.osl:13206:1:sw/source/core/layout/anchoredobject.cxx:581: <SwAnchoredObject::GetObjRectWithSpaces> - cache for object rectangle inclusive spaces marked as valid, but it couldn't be. Missing invalidation of cache. Please inform OD.
warn:legacy.osl:13206:1:sw/source/core/layout/anchoredobject.cxx:581: <SwAnchoredObject::GetObjRectWithSpaces> - cache for object rectangle inclusive spaces marked as valid, but it couldn't be. Missing invalidation of cache. Please inform OD.
warn:legacy.osl:13206:1:sw/source/core/layout/anchoredobject.cxx:581: <SwAnchoredObject::GetObjRectWithSpaces> - cache for object rectangle inclusive spaces marked as valid, but it couldn't be. Missing invalidation of cache. Please inform OD.
warn:legacy.osl:13206:1:editeng/source/items/frmitems.cxx:476: unknown MemberId
warn:legacy.osl:13206:1:editeng/source/items/frmitems.cxx:476: unknown MemberId


* on saving as Docbook


warn:ucb.ucp.gio:13206:1:ucb/source/ucp/gio/gio_content.cxx:404: ignoring GError "L'emplacement indiqué n'est pas pris en charge" for <service:com.sun.star.wizards.letter.CallWizard?insert>
warn:ucb.ucp.gio:13206:1:ucb/source/ucp/gio/gio_content.cxx:404: ignoring GError "L'emplacement indiqué n'est pas pris en charge" for <service:com.sun.star.wizards.fax.CallWizard?insert>
warn:ucb.ucp.gio:13206:1:ucb/source/ucp/gio/gio_content.cxx:404: ignoring GError "L'emplacement indiqué n'est pas pris en charge" for <service:com.sun.star.wizards.agenda.CallWizard?insert>
warn:ucb.ucp.gio:13206:1:ucb/source/ucp/gio/gio_content.cxx:404: ignoring GError "L'emplacement indiqué n'est pas pris en charge" for <service:com.sun.star.wizards.web.CallWizard?start>
warn:ucb.ucp.gio:13206:1:ucb/source/ucp/gio/gio_content.cxx:404: ignoring GError "L'emplacement indiqué n'est pas pris en charge" for <macro:///ImportWizard.Main.Main>
warn:ucb.ucp.gio:13206:1:ucb/source/ucp/gio/gio_content.cxx:404: ignoring GError "L'emplacement indiqué n'est pas pris en charge" for <macro:///Euro.AutoPilotRun.StartAutoPilot>
warn:ucb.ucp.gio:13206:1:ucb/source/ucp/gio/gio_content.cxx:404: ignoring GError "L'emplacement indiqué n'est pas pris en charge" for <service:com.sun.star.wizards.letter.CallWizard?insert>
warn:ucb.ucp.gio:13206:1:ucb/source/ucp/gio/gio_content.cxx:404: ignoring GError "L'emplacement indiqué n'est pas pris en charge" for <service:com.sun.star.wizards.fax.CallWizard?insert>
warn:ucb.ucp.gio:13206:1:ucb/source/ucp/gio/gio_content.cxx:404: ignoring GError "L'emplacement indiqué n'est pas pris en charge" for <service:com.sun.star.wizards.agenda.CallWizard?insert>
warn:ucb.ucp.gio:13206:1:ucb/source/ucp/gio/gio_content.cxx:404: ignoring GError "L'emplacement indiqué n'est pas pris en charge" for <service:com.sun.star.wizards.web.CallWizard?start>
warn:ucb.ucp.gio:13206:1:ucb/source/ucp/gio/gio_content.cxx:404: ignoring GError "L'emplacement indiqué n'est pas pris en charge" for <macro:///ImportWizard.Main.Main>
warn:ucb.ucp.gio:13206:1:ucb/source/ucp/gio/gio_content.cxx:404: ignoring GError "L'emplacement indiqué n'est pas pris en charge" for <macro:///Euro.AutoPilotRun.StartAutoPilot>
warn:ucb.ucp.gio:13206:1:ucb/source/ucp/gio/gio_content.cxx:404: ignoring GError "L'emplacement indiqué n'est pas pris en charge" for <vnd.sun.star.findbar:FocusToFindbar>
warn:legacy.osl:13206:1:vcl/source/gdi/image.cxx:394: ImageAryData::Load: failed to load image 'cmd/sc_shapesmenu.png'
warn:legacy.osl:13206:1:vcl/source/gdi/image.cxx:394: ImageAryData::Load: failed to load image 'cmd/sc_formatimagemenu.png'
warn:legacy.osl:13206:1:vcl/source/gdi/image.cxx:394: ImageAryData::Load: failed to load image 'cmd/sc_changepicture.png'
warn:legacy.osl:13206:1:vcl/source/gdi/image.cxx:394: ImageAryData::Load: failed to load image 'cmd/sc_compressgraphic.png'
warn:ucb.ucp.gio:13206:1:ucb/source/ucp/gio/gio_content.cxx:404: ignoring GError "L'emplacement indiqué n'est pas pris en charge" for <service:com.sun.star.deployment.ui.PackageManagerDialog>
warn:legacy.osl:13206:1:include/cppuhelper/interfacecontainer.h:475: object is disposed
warn:legacy.osl:13206:1:include/cppuhelper/interfacecontainer.h:475: object is disposed
warn:legacy.osl:13206:1:include/cppuhelper/interfacecontainer.h:475: object is disposed
warn:legacy.osl:13206:1:include/cppuhelper/interfacecontainer.h:475: object is disposed
Comment 5 Laurent Godard 2015-05-07 08:48:35 UTC
a unit test is available on gerrit
https://gerrit.libreoffice.org/#/c/15653/1
Comment 6 Commit Notification 2015-05-21 14:26:02 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#91095 svx: avoid unconditional SdrObject -> SdrObjCustomShape static_cast

It will be available in 5.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2015-05-21 15:12:18 UTC
Laurent Godard committed a patch related to this issue.
It has been pushed to "master":

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

unit test for tdf#91095

It will be available in 5.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2015-05-26 08:14:39 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=92a9c03e5100952dd364e38366ec0f80999cbc43&h=libreoffice-5-0

tdf#91095 svx: avoid unconditional SdrObject -> SdrObjCustomShape static_cast

It will be available in 5.0.0.0.beta2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2015-06-09 10:33:16 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9d816d79cae3526c2da5f038b4b285f7cf00b762&h=libreoffice-4-4

tdf#91095 svx: avoid unconditional SdrObject -> SdrObjCustomShape static_cast

It will be available in 4.4.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 Robinson Tryon (qubit) 2015-12-17 09:03:41 UTC
Migrating Whiteboard tags to Keywords: (bibisected)
[NinjaEdit]