valeriymalov created this revision. Herald added projects: Frameworks, Baloo. Herald added subscribers: Baloo, kde-frameworks-devel. valeriymalov requested review of this revision.
REVISION SUMMARY Treating only MDB_NOTFOUND as an error leads to use of uninitliazed pointers and handle IDs in other cases (e.g. when get fails with MDB_BAD_TXN) and wreaks havoc in the application. This is a bit of a hacky fix since long-term solution probably requires more rigorous refactoring of the Baloo Engine. There's a lot of duplicate code and uninitialized values, which makes it hard to track the misuse of LMDB API. However this should fix a good deal of crashes, probably more. BUG: 361186 BUG: 390823 BUG: 372880 BUG: 395888 BUG: 367480 BUG: 403720 REPOSITORY R293 Baloo BRANCH master REVISION DETAIL https://phabricator.kde.org/D18664 AFFECTED FILES src/engine/CMakeLists.txt src/engine/documentdatadb.cpp src/engine/documentdb.cpp src/engine/documentiddb.cpp src/engine/documenttimedb.cpp src/engine/documenturldb.cpp src/engine/fsutils.cpp src/engine/idfilenamedb.cpp src/engine/idtreedb.cpp src/engine/mtimedb.cpp src/engine/phraseanditerator.cpp src/engine/positiondb.cpp src/engine/postingdb.cpp src/file/extractorprocess.cpp src/file/fileindexscheduler.cpp src/file/indexcleaner.cpp src/file/main.cpp src/file/metadatamover.cpp To: valeriymalov Cc: kde-frameworks-devel, #baloo, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams