[Akonadi] [Bug 401865] akonadi_indexing_agent crashes due to GlassTable::set_overwritten throwing an error

Ahmad Samir bugzilla_noreply at kde.org
Wed Aug 19 17:08:17 BST 2020


https://bugs.kde.org/show_bug.cgi?id=401865

Ahmad Samir <a.samirh78 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED
      Latest Commit|                            |https://invent.kde.org/pim/
                   |                            |akonadi-search/commit/ff6cd
                   |                            |f57350228004ad431b7b0d98fa8
                   |                            |d3f7d120

--- Comment #12 from Ahmad Samir <a.samirh78 at gmail.com> ---
Git commit ff6cdf57350228004ad431b7b0d98fa8d3f7d120 by Ahmad Samir.
Committed on 18/08/2020 at 17:41.
Pushed by dvratil into branch 'master'.

Fix crash by handling exceptions thrown by GlassTable::set_overwritten

Xapian::Enquire::get_mset ultimately calls GlassTable::block_to_cursor,
which could throw Xapian::DatabaseModifiedError if the database has been
modified/deviated too much since it was opened for searching; handle that
case by trying to call reopen on the database (as per the upstream error
message[1]), then query it again, if that fails just return.

Also handle one other exception, Xapian::DatabaseCorruptError; this has
been reported in [2].

Use QByteArray::toStdString when calling the Xapian::Database ctor.

[1] https://xapian.org/docs/sourcedoc/html/glass__table_8cc_source.html#l00288
[2] https://bugs.kde.org/show_bug.cgi?id=363928#c9
Related: bug 363928

M  +24   -5    lib/indexeditems.cpp

https://invent.kde.org/pim/akonadi-search/commit/ff6cdf57350228004ad431b7b0d98fa8d3f7d120

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Kdepim-bugs mailing list