Download it now!
Bug 128820 - SAXException: [word/document.xml line 20] when you try to open a document from Word 2007-365 (*.docx) format created with LO with a image copy from Draw
Summary: SAXException: [word/document.xml line 20] when you try to open a document fro...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4 all versions
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:6.5.0 target:6.4.0.1 target:6.3.5
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2019-11-15 12:18 UTC by Alejandro Moreno
Modified: 2019-11-25 17:05 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
All documents and image with exception message (301.69 KB, application/x-zip-compressed)
2019-11-15 12:18 UTC, Alejandro Moreno
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alejandro Moreno 2019-11-15 12:18:28 UTC
Created attachment 155841 [details]
All documents and image with exception message

SAXException: [word/document.xml line 20] when you try to open a document from Word 2007-365 (*.docx) format created with LO with a image copy from Draw inside the document.

bug.odt: Original document
bug.docx: bug.odt but save as Word 2007-365 (*.docx) with Libreoffice Writer.

If you open bug.docx with Libreoffice you will see a display box with exception message.
Comment 1 Xisco Faulí 2019-11-15 12:34:43 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=18ae77a065cb8ae6940d4067f6ab7e99a3f74047

author	Mike Kaganski <mike.kaganski@collabora.com>	2017-01-18 10:16:14 +0300
committer	Mike Kaganski <mike.kaganski@collabora.com>	2017-01-19 07:02:09 +0000
commit	18ae77a065cb8ae6940d4067f6ab7e99a3f74047 (patch)
tree	c964a7e45fb26ec41475b3cee7454d9c7ced21bb
parent	a2ad27a2be429c6d17ef28c28ac5aee66ad8545d (diff)
Also consider saved exceptions when mbEnableThreads is true

Bisected with: bibisect-linux-64-5.4

Adding Cc: to Mike Kaganski
Comment 2 Julien Nabet 2019-11-15 19:06:04 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.

I started from the odt and save as bug2.docx, I noticed:
warn:legacy.osl:146518:146518:vcl/source/gdi/bitmap3.cxx:887: BitDepth adaptation failed (!)
warn:legacy.osl:146518:146518:vcl/source/gdi/bitmap3.cxx:814: Bitmap::Scale has changed the ColorDepth, this should *not* happen (!)
warn:oox.drawingml:146518:146518:oox/source/drawingml/fillproperties.cxx:1030: ArtisticEffectProperties::getEffectToken - unexpected token name
warn:oox.drawingml:146518:146518:oox/source/drawingml/fillproperties.cxx:1030: ArtisticEffectProperties::getEffectToken - unexpected token name
warn:oox.drawingml:146518:146518:oox/source/drawingml/fillproperties.cxx:1030: ArtisticEffectProperties::getEffectToken - unexpected token name
TODO VMLExport::Commit(), unimplemented id: 327, value: 3600, data: [0, 0x7fff843024a0]
TODO VMLExport::Commit(), unimplemented id: 135, value: 0, data: [0, 0x7fff843024a0]
TODO VMLExport::Commit(), unimplemented id: 450, value: 2895108, data: [0, 0x7fff843024a0]
...
warn:legacy.tools:146518:146518:filter/source/msfilter/eschesdo.cxx:851: ImplEESdrWriter::~ImplEESdrWriter: unwritten SolverContainer
warn:legacy.osl:146518:146518:vcl/source/gdi/bitmap3.cxx:887: BitDepth adaptation failed (!)
warn:legacy.osl:146518:146518:vcl/source/gdi/bitmap3.cxx:814: Bitmap::Scale has changed the ColorDepth, this should *not* happen (!)
warn:vcl:146518:146518:vcl/source/window/winproc.cxx:840: ImplHandleKey: Keyboard-Input is sent to a frame without focus
warn:vcl:146518:146518:vcl/source/window/winproc.cxx:840: ImplHandleKey: Keyboard-Input is sent to a frame without focus
warn:vcl:146518:146518:vcl/source/window/winproc.cxx:840: ImplHandleKey: Keyboard-Input is sent to a frame without focus
warn:legacy.osl:146518:146518:vcl/source/gdi/bitmap3.cxx:887: BitDepth adaptation failed (!)
warn:legacy.osl:146518:146518:vcl/source/gdi/bitmap3.cxx:814: Bitmap::Scale has changed the ColorDepth, this should *not* happen (!)

Then when trying to open bug2.docx:
warn:oox:146786:146786:oox/source/drawingml/textparagraphpropertiescontext.cxx:336: TextParagraphPropertiesContext::onCreateContext: unhandled element: 871
warn:oox:146786:146786:oox/source/drawingml/textparagraphpropertiescontext.cxx:336: TextParagraphPropertiesContext::onCreateContext: unhandled element: 2804
warn:oox:146786:146786:oox/source/drawingml/textparagraphpropertiescontext.cxx:336: TextParagraphPropertiesContext::onCreateContext: unhandled element: 4197
warn:oox:146786:146786:oox/source/drawingml/textcharacterpropertiescontext.cxx:236: TextCharacterPropertiesContext::onCreateContext: unhandled element: 5461
...
warn:legacy.osl:146786:146786:oox/source/helper/graphichelper.cxx:120: GraphicHelper::GraphicHelper - cannot get target frame
warn:sax:146786:146786:sax/source/fastparser/fastparser.cxx:613: Unexpected exception from XML parser com.sun.star.xml.sax.SAXException message: No namespace defined for pic
    wrapped: void
warn:sax:146786:146786:sax/source/fastparser/fastparser.cxx:613: Unexpected exception from XML parser com.sun.star.xml.sax.SAXException message: No namespace defined for pic
    wrapped: void
warn:svx.uno:146786:146786:svx/source/unodraw/unoshape.cxx:1625: Unknown Property: FromWordArt
warn:svx.uno:146786:146786:svx/source/unodraw/unoshape.cxx:1625: Unknown Property: GraphicColorMode
warn:sax:146786:146786:sax/source/fastparser/fastparser.cxx:613: Unexpected exception from XML parser com.sun.star.xml.sax.SAXException message: No namespace defined for pic
    wrapped: void
warn:sax:146786:146786:sax/source/fastparser/fastparser.cxx:613: Unexpected exception from XML parser com.sun.star.xml.sax.SAXException message: No namespace defined for pic
    wrapped: void
warn:sax:146786:146786:sax/source/fastparser/fastparser.cxx:613: Unexpected exception from XML parser com.sun.star.xml.sax.SAXException message: No namespace defined for pic
    wrapped: void
warn:legacy.osl:146786:146786:svx/source/unodraw/shapepropertynotifier.cxx:116: PropertyChangeNotifier::notifyPropertyChange: no factory!
warn:sax:146786:146786:sax/source/fastparser/fastparser.cxx:1266: Empty NamespaceStack

The detailed error message is:
File format error found at
SAXParseException: "No namespace defined for pic"
SAXParseException: '[word/document.xml line 20]: Namespace prefix pic on bodyPr is not defined
', Stream 'word/document.xml', line 20, Column 5292(row,col).
Comment 3 Mike Kaganski 2019-11-16 14:37:11 UTC
This is not a regression after that commit (if regression at all). As expected, that commit started to warn on some corrupted files that were silently processed before (throwing part of the stream away without warning). Accepting the warning would produce exactly the same (partial) result as before.

https://gerrit.libreoffice.org/82980
Comment 4 Commit Notification 2019-11-16 15:56:24 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b699a693cabf307418d3aa2c159d58a4bedd43a4

tdf#128820: use wps namespace for simple text shapes

It will be available in 6.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2019-11-17 02:18:12 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8e7d89295c0b9e0515baab88d99c05ac293ac645

tdf#128820: improve unit test to not depend on opening bad file failing

It will be available in 6.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Alejandro Moreno 2019-11-18 07:49:59 UTC
(In reply to Commit Notification from comment #4)
> Mike Kaganski committed a patch related to this issue.
> It has been pushed to "master":
> 
> https://git.libreoffice.org/core/commit/
> b699a693cabf307418d3aa2c159d58a4bedd43a4
> 
> tdf#128820: use wps namespace for simple text shapes
> 
> It will be available in 6.5.0.
> 
> The patch should be included in the daily builds available at
> https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
> information about daily builds can be found at:
> https://wiki.documentfoundation.org/Testing_Daily_Builds
> 
> Affected users are encouraged to test the fix and report feedback.

I test the fix with daily build and I can confirm that work well.
Comment 7 Xisco Faulí 2019-11-18 10:11:17 UTC
(In reply to Alejandro Moreno from comment #6)
> (In reply to Commit Notification from comment #4)
> > Mike Kaganski committed a patch related to this issue.
> > It has been pushed to "master":
> > 
> > https://git.libreoffice.org/core/commit/
> > b699a693cabf307418d3aa2c159d58a4bedd43a4
> > 
> > tdf#128820: use wps namespace for simple text shapes
> > 
> > It will be available in 6.5.0.
> > 
> > The patch should be included in the daily builds available at
> > https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
> > information about daily builds can be found at:
> > https://wiki.documentfoundation.org/Testing_Daily_Builds
> > 
> > Affected users are encouraged to test the fix and report feedback.
> 
> I test the fix with daily build and I can confirm that work well.

Setting to VERIFIED then
Mike Kaganski, thanks for fixing this issue.
Backported to libreoffice-6-4 < https://gerrit.libreoffice.org/#/c/83070/ > and libreoffice-6-3 < https://gerrit.libreoffice.org/#/c/83071/ >
Comment 8 Commit Notification 2019-11-20 16:11:03 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/d54bae3471e9b9529f1ac03c811c3370d9f5ed89

tdf#128820: use wps namespace for simple text shapes

It will be available in 6.4.0.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2019-11-25 17:05:55 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/01ac1e24856121239e289b07b711b3f688187ccf

tdf#128820: use wps namespace for simple text shapes

It will be available in 6.3.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.