Bug 115883 - SAXException: [word/document.xml line 2]: unknown error on opening DOCX
Summary: SAXException: [word/document.xml line 2]: unknown error on opening DOCX
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.1.0 target:6.0.2 target:5.4.6
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2018-02-20 13:46 UTC by Timur
Modified: 2019-09-23 19:50 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Docx (125.59 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-02-20 15:19 UTC, Timur
Details
console logs (35.09 KB, text/plain)
2018-02-20 21:06 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timur 2018-02-20 13:46:53 UTC
There's error with LO master 6.1+ on opening attachment 97802 [details] from Bug 77794.
Error is SAXException: [word/document.xml line 2]: unknown error.
Wasn't there before.
Comment 1 Xisco Faulí 2018-02-20 14:50:45 UTC
Hi Timur,
The attachment link points to an image.
Could you please double check it ?
Comment 3 Dieter 2018-02-20 19:51:09 UTC
I could open attachment from comment 2 without any problems.

Version: 6.1.0.0.alpha0+ (x64)
Build ID: 77a535285f0fd5f2464430abdc67cf99be024868
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-01-23_23:04:23
Locale: de-DE (de_DE); Calc: CL
Comment 4 Julien Nabet 2018-02-20 21:06:35 UTC
Created attachment 140023 [details]
console logs

On pc Debian x86-64 with master sources updated today, I could reproduce this.

I attached console logs.
Comment 5 Julien Nabet 2018-02-20 21:07:15 UTC
"SAXException: [word/document.xml line 2]: unknown error
Proceeding with import may cause data loss or corruption, and application may become unstable or crash."
Comment 6 Julien Nabet 2018-02-20 21:07:45 UTC
For the record, I use enable-dbgutil.
Comment 7 Julien Nabet 2018-02-20 21:18:53 UTC
#0  0x00007fffca0fc3fb in (anonymous namespace)::Entity::saveException(com::sun::star::uno::Any const&) (this=0x555557b6d180, e=
    uno::Any("com.sun.star.uno.RuntimeException": {<com::sun::star::uno::Exception> = {Message = "", Context = empty uno::Reference}, <No data fields>}))
    at /home/julien/lo/libreoffice/sax/source/fastparser/fastparser.cxx:619
#1  0x00007fffca0fb872 in (anonymous namespace)::Entity::endElement() (this=0x555557b6d180) at /home/julien/lo/libreoffice/sax/source/fastparser/fastparser.cxx:493
#2  0x00007fffca0ffe99 in sax_fastparser::FastSaxParserImpl::callbackEndElement() (this=0x555557b6d030)
    at /home/julien/lo/libreoffice/sax/source/fastparser/fastparser.cxx:1263
#3  0x00007fffca0fa608 in (anonymous namespace)::call_callbackEndElement(void*, xmlChar const*, xmlChar const*, xmlChar const*) (userData=0x555557b6d030)
    at /home/julien/lo/libreoffice/sax/source/fastparser/fastparser.cxx:314
#4  0x00007fffe6afbd05 in  () at /usr/lib/x86_64-linux-gnu/libxml2.so.2
#5  0x00007fffe6b048b9 in  () at /usr/lib/x86_64-linux-gnu/libxml2.so.2
#6  0x00007fffe6b0620e in xmlParseChunk () at /usr/lib/x86_64-linux-gnu/libxml2.so.2
#7  0x00007fffca0fe2f9 in sax_fastparser::FastSaxParserImpl::parse() (this=0x555557b6d030) at /home/julien/lo/libreoffice/sax/source/fastparser/fastparser.cxx:1052

(gdb) frame 7
#7  0x00007fffca0fe2f9 in sax_fastparser::FastSaxParserImpl::parse (this=0x555557b6d030) at /home/julien/lo/libreoffice/sax/source/fastparser/fastparser.cxx:1052
1052	            bContinue = xmlParseChunk( rEntity.mpParser, reinterpret_cast<const char*>(seqOut.getConstArray()), nRead, 0 )

(gdb) p seqOut.getConstArray()
$2 = (const signed char *) 0x555557e6f078 "-RU\"/></w:rPr><w:lastRenderedPageBreak/><w:t>Корпоративные лицензии</w:t></w:r></w:p></w:tc><w:tc><w:tcPr><w:tcW w:w=\"6869\" w:type=\"dxa\"/></w:tcPr><w:p w:rsidR=\"0054188B\" w:rsidRP"...

$ apt-cache show libxml2
Package: libxml2
Version: 2.9.4+dfsg1-6.1
Comment 8 Timur 2018-02-21 08:10:26 UTC
Seems very recent, mine is libo-master~2018-02-19_23.37.52_LibreOfficeDev_6.1.0.0.alpha0_Win_x86
I add bibisectRequest.
Comment 9 Xisco Faulí 2018-02-21 09:41:19 UTC
Regression introduced by:

author	Miklos Vajna <vmiklos@collabora.co.uk>	2018-02-14 15:31:35 +0100
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2018-02-14 20:21:57 +0100
commit 8b73bafbc18acb4dd8911d2f2de8158d98eb6144 (patch)
tree 5bb43213b1c7ef8802d8f6b50bffdf9742117ad2
parent b13678b1e1d6f4cac548ae7e088b6030c31cf081 (diff)
tdf#115719 DOCX import: increase paragraph spacing for anchored objects
... like Word 2013 does, when the version string indicates that the new
layout is wanted.

An alternative to this change would be to add a new sw layout
compatibility flag and handle this at a layout level (somewhere in
SwAnchoredObject::GetObjRectWithSpaces()). The downside of that approach
is that once a layout flag is added, it's not preferred to tweak its
behavior, while doing the same at import time is not a problem.

Bisected with: bibisect-linux64-6.1

Adding Cc: to Miklos Vajna
Comment 10 Commit Notification 2018-02-23 08:06:52 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#115883 DOCX import: catch RuntimeException from SwXFrame

It will be available in 6.1.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 11 Commit Notification 2018-02-26 10:44:08 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bd2e7b2a5bcb8f7838c7de828d0ecdd071ee4c64&h=libreoffice-6-0

tdf#115883 DOCX import: catch RuntimeException from SwXFrame

It will be available in 6.0.2.

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 12 Commit Notification 2018-02-26 10:44:18 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=71a99a730229fac391822fb164661017c9409b56&h=libreoffice-5-4

tdf#115883 DOCX import: catch RuntimeException from SwXFrame

It will be available in 5.4.6.

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.