diff -Nru baloo-4.13.0/debian/changelog baloo-4.13.0/debian/changelog --- baloo-4.13.0/debian/changelog 2014-04-15 09:46:26.000000000 +0000 +++ baloo-4.13.0/debian/changelog 2014-04-15 13:31:31.000000000 +0000 @@ -1,3 +1,10 @@ +baloo (4:4.13.0-0ubuntu3) trusty; urgency=medium + + * Add upstream_FileIndexingQueue-Catch-exception.patch catching more + xapian exceptions prevening baloo_file crashes. + + -- Harald Sitter Tue, 15 Apr 2014 15:30:33 +0200 + baloo (4:4.13.0-0ubuntu2) trusty; urgency=medium * Add upstream_catch_more_exceptions_emailsearchstore.patch from upstream diff -Nru baloo-4.13.0/debian/patches/series baloo-4.13.0/debian/patches/series --- baloo-4.13.0/debian/patches/series 2014-04-15 09:46:26.000000000 +0000 +++ baloo-4.13.0/debian/patches/series 2014-04-15 13:31:31.000000000 +0000 @@ -1 +1,2 @@ upstream_catch_more_exceptions_emailsearchstore.patch +upstream_FileIndexingQueue-Catch-exception.patch diff -Nru baloo-4.13.0/debian/patches/upstream_FileIndexingQueue-Catch-exception.patch baloo-4.13.0/debian/patches/upstream_FileIndexingQueue-Catch-exception.patch --- baloo-4.13.0/debian/patches/upstream_FileIndexingQueue-Catch-exception.patch 1970-01-01 00:00:00.000000000 +0000 +++ baloo-4.13.0/debian/patches/upstream_FileIndexingQueue-Catch-exception.patch 2014-04-15 13:31:31.000000000 +0000 @@ -0,0 +1,30 @@ +commit a7386f97164dbc9b67e032ed57ffe563d5d41ba9 +Author: Vishesh Handa +Date: Tue Apr 15 15:22:00 2014 +0200 + + FileIndexingQueue: Catch exception + + This can happen in the case when the extractor fails to index a file and + at the same time managed to remove the indexed data from the xapian db. + So weird. + +diff --git a/src/file/fileindexingqueue.cpp b/src/file/fileindexingqueue.cpp +index 6c1e946..bfce37e 100644 +--- a/src/file/fileindexingqueue.cpp ++++ b/src/file/fileindexingqueue.cpp +@@ -98,10 +98,13 @@ void FileIndexingQueue::slotFinishedIndexingFile(KJob*) + void FileIndexingQueue::slotIndexingFailed(uint id) + { + m_db->xapianDatabase()->db()->reopen(); +- Xapian::Document doc = m_db->xapianDatabase()->db()->get_document(id); +- +- updateIndexingLevel(doc, -1); +- Q_EMIT newDocument(id, doc); ++ Xapian::Document doc; ++ try { ++ Xapian::Document doc = m_db->xapianDatabase()->db()->get_document(id); ++ updateIndexingLevel(doc, -1); ++ Q_EMIT newDocument(id, doc); ++ } catch (const Xapian::Error& err) { ++ } + }