Bug 324885

Summary: nepomukindexer hangs with 100% cpu on broken LibreOffice file
Product: [Unmaintained] nepomuk Reporter: Patrick <mail>
Component: fileindexerAssignee: Nepomuk Bugs Coordination <nepomuk-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: nepomuk-bugs
Priority: NOR    
Version: 4.11.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 4.11.2
Sentry Crash Report:
Attachments: Broken LibreOffice Calc file.

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