Review Request 126105: Fix yet another crash in Dolphin when Baloo isn't running
Boudhayan Gupta
bgupta at kde.org
Thu Nov 19 06:40:58 UTC 2015
> On Nov. 19, 2015, 10:35 a.m., Sune Vuorela wrote:
> > without actualy knowing the code in question, a brief look over gives me the impression that the error handling could be improved and that would make this patch not needed.
The assumption here is that if (rc != 0) in normal operation the errors are serious enough to warrant crashing the process, not handling it gracefully. Granted, I've just discovered one case where this isn't true, but that's when indexing is disabled and the db file shouldn't exist, so I've added a special check for that.
Also, that patch prevents an empty index from being created even when indexing is disabled, which is correct behaviour.
- Boudhayan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126105/#review88556
-----------------------------------------------------------
On Nov. 19, 2015, 1:10 a.m., Boudhayan Gupta wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126105/
> -----------------------------------------------------------
>
> (Updated Nov. 19, 2015, 1:10 a.m.)
>
>
> Review request for Baloo, KDE Frameworks, Pinak Ahuja, and Vishesh Handa.
>
>
> Repository: baloo
>
>
> Description
> -------
>
> Add a check in Baloo::Database::open() to return false if we're opening the database in ReadOnly mode and the database doesn't exist. This fixes a crash in Dolphin when Baloo isn't running.
>
> This isn't the entire fix - one will also have to remove ~/.local/share/baloo/index to not crash anymore; this patch prevents the file from being recreated everytime Baloo::Database::open() is run, and re-causing the crash.
>
>
> Diffs
> -----
>
> src/engine/database.cpp 4f0579f
>
> Diff: https://git.reviewboard.kde.org/r/126105/diff/
>
>
> Testing
> -------
>
> Builds, runs, doesn't crash anymore, the works.
>
>
> Thanks,
>
> Boudhayan Gupta
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20151119/f9203609/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list