Review Request 126105: Fix yet another crash in Dolphin when Baloo isn't running

Thomas Lübking thomas.luebking at gmail.com
Wed Nov 18 20:25:58 UTC 2015



> On Nov. 18, 2015, 8:06 nachm., Thomas Lübking wrote:
> > Errr... you intend to crash applications depending on whether some file is present??
> > Please fix the actual bug instead of such workaround, got a backtrace?
> 
> Boudhayan Gupta wrote:
>     Err... it **doesn't** cause a crash with the patch, causes a crash without it. This is a perfectly valid fix - this function is **supposed** to return false if the database could not be opened, for any reason whatsoever.

I didn't say this patch would introduce a crash.
I said that "something" crashes for "some" reason and you work around that by testing whether a file is present.
Your own commit message clearly says that if - for any reason - ~/.local/share/baloo/index exists (eg. i touch it), things will crash again, what means that the actual problem is not resolved but just shadowed.


- Thomas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126105/#review88544
-----------------------------------------------------------


On Nov. 18, 2015, 7:40 nachm., Boudhayan Gupta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126105/
> -----------------------------------------------------------
> 
> (Updated Nov. 18, 2015, 7:40 nachm.)
> 
> 
> 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/20151118/db2ec372/attachment.html>


More information about the Kde-frameworks-devel mailing list