Bug 324885 - nepomukindexer hangs with 100% cpu on broken LibreOffice file
Summary: nepomukindexer hangs with 100% cpu on broken LibreOffice file
Status: RESOLVED FIXED
Alias: None
Product: nepomuk
Classification: Miscellaneous
Component: fileindexer (show other bugs)
Version: 4.11.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Nepomuk Bugs Coordination
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-13 12:58 UTC by Patrick
Modified: 2013-09-13 23:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.11.2


Attachments
Broken LibreOffice Calc file. (5.98 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-09-13 12:59 UTC, Patrick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick 2013-09-13 12:58:00 UTC
I've got a LibreOffice Calc file which contains a bad content.xml file. LibreOffice can still open the file, but nepomukindexer gets stuck. To illustrate the problem, I've created an empty spreadsheet (broken.ods), removed the last tag of the content.xml file and then zipped this file to the broken.ods file. LibreOffice doesn't care about the missing tag.

Reproducible: Always

Steps to Reproduce:
1. Run nepomukindexer on the broken LibreOffice file.
Actual Results:  
Nepomukindexer hangs with 100% cpu until you press ctrl-c.

Expected Results:  
Nepomukindexer should index or ignore the broken LibreOffice file.

Calligra Sheets also has trouble with the broken LibreOffice file.
Comment 1 Patrick 2013-09-13 12:59:01 UTC
Created attachment 82316 [details]
Broken LibreOffice Calc file.
Comment 2 Simeon Bird 2013-09-13 23:10:58 UTC
Git commit dd57cd74126af56f4deae87aca4005e295147d85 by Simeon Bird.
Committed on 13/09/2013 at 23:08.
Pushed by sbird into branch 'KDE/4.11'.

In the odf extractor, check for hasError separately to EndDocument.
This fixes the case where the file ends prematurely, which would
previously loop forever.
FIXED-IN:4.11.2

M  +1    -1    services/fileindexer/indexer/odfextractor.cpp

http://commits.kde.org/nepomuk-core/dd57cd74126af56f4deae87aca4005e295147d85