Bug 324885 - nepomukindexer hangs with 100% cpu on broken LibreOffice file
Summary: nepomukindexer hangs with 100% cpu on broken LibreOffice file
Alias: None
Product: nepomuk
Classification: Unclassified
Component: fileindexer (show other bugs)
Version: 4.11.1
Platform: Archlinux Packages Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Nepomuk Bugs Coordination
Depends on:
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

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

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.

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