Review Request 110719: fix KoXmlReader to break on error instead of trying on and on
Commit Hook
null at kde.org
Thu May 30 10:17:54 BST 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110719/#review33414
-----------------------------------------------------------
This review has been submitted with commit 0a4cc79a9b94dea9fffba37368201615c3eff5f1 by Friedrich W. H. Kossebau to branch calligra/2.7.
- Commit Hook
On May 30, 2013, 9:13 a.m., Friedrich W. H. Kossebau wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110719/
> -----------------------------------------------------------
>
> (Updated May 30, 2013, 9:13 a.m.)
>
>
> Review request for Calligra.
>
>
> Description
> -------
>
> Words currently will hang with hot wheels on loading the file http://heap.kogmbh.net/vandenoever/tmp/yo.odt
>
> Reason is that the condition to break the parsing is only testing if the end is officially reached. But as the API Dox of QXmlStreamReader::readNext() ( http://qt-project.org/doc/qt-4.8/qxmlstreamreader.html#readNext) tells "The exception is when error() returns PrematureEndOfDocumentError. This error is reported when the end of an otherwise well-formed chunk of XML is reached, but the chunk doesn't represent a complete XML document."
>
> So also checking for !xml.hasError() seems needed.
>
> Okay to backport to 2.7?
>
>
> Now this bug was just uncovered because of another problem:
> for some reason the file meta.xml seems to be not properly extracted from the odt, so this can be seen in the log (with this patch applied):
>
> words(17718)/koffice (lib komain): Parsing error in "meta.xml" ! Aborting!
> In line: 1 , column: 0
> Error message: "Premature end of document."
>
> Unzipping yo.odt with unzip shows that meta.xml has some proper looking content. So possibly our zip reading code has a bug. Needs to be investigated separately.
>
>
> Diffs
> -----
>
> libs/odf/KoXmlReader.cpp b5fe9f8
>
> Diff: http://git.reviewboard.kde.org/r/110719/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Friedrich W. H. Kossebau
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20130530/248d0c1a/attachment.htm>
More information about the calligra-devel
mailing list