<table><tr><td style="">valeriymalov created this revision.<br />Herald added projects: Frameworks, Baloo.<br />Herald added subscribers: Baloo, kde-frameworks-devel.<br />valeriymalov requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D18664">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Treating only MDB_NOTFOUND as an error leads to use of uninitliazed<br />
pointers and handle IDs in other cases (e.g. when get fails with<br />
MDB_BAD_TXN) and wreaks havoc in the application.</p>
<p>This is a bit of a hacky fix since long-term solution probably requires<br />
more rigorous refactoring of the Baloo Engine. There's a lot of<br />
duplicate code and uninitialized values, which makes it hard to track<br />
the misuse of LMDB API.</p>
<p>However this should fix a good deal of crashes, probably more.</p>
<p>BUG: 361186<br />
BUG: 390823<br />
BUG: 372880<br />
BUG: 395888<br />
BUG: 367480<br />
BUG: 403720</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R293 Baloo</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D18664">https://phabricator.kde.org/D18664</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/engine/CMakeLists.txt<br />
src/engine/documentdatadb.cpp<br />
src/engine/documentdb.cpp<br />
src/engine/documentiddb.cpp<br />
src/engine/documenttimedb.cpp<br />
src/engine/documenturldb.cpp<br />
src/engine/fsutils.cpp<br />
src/engine/idfilenamedb.cpp<br />
src/engine/idtreedb.cpp<br />
src/engine/mtimedb.cpp<br />
src/engine/phraseanditerator.cpp<br />
src/engine/positiondb.cpp<br />
src/engine/postingdb.cpp<br />
src/file/extractorprocess.cpp<br />
src/file/fileindexscheduler.cpp<br />
src/file/indexcleaner.cpp<br />
src/file/main.cpp<br />
src/file/metadatamover.cpp</div></div></div><br /><div><strong>To: </strong>valeriymalov<br /><strong>Cc: </strong>kde-frameworks-devel, Baloo, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams<br /></div>