Review Request: [logviewer] Fix crash when Tpl::SearchHit has null account or entity

Dan Vratil dan at progdan.cz
Sat Aug 25 13:42:08 UTC 2012



> On Aug. 25, 2012, 1:08 p.m., David Edmundson wrote:
> > I generally don't like to allow bug fixes where we don't understand the bug. Otherwise we probably still have the bug and it'll just crash somewhere else.

Well, I dug into telepathy-logger code and it seems that it's possible for the code to legally construct TplSearchHit with null account. 

This can happen when the account manager is not ready at the time of searching or when the account was removed (but the log files are still there). So I'd say it might not be really a bug but an undocumented "feature" of the telepathy-logger rather then a bug.

I tried removing one of my Jabber accounts from Telepathy and then I was able to reproduce the crash everytime I tried to search in logviewer (without the patch). With the patch the crash is OK. 


- Dan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/106176/#review17985
-----------------------------------------------------------


On Aug. 25, 2012, 12:34 p.m., Dan Vratil wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106176/
> -----------------------------------------------------------
> 
> (Updated Aug. 25, 2012, 12:34 p.m.)
> 
> 
> Review request for Telepathy and Martin Klapetek.
> 
> 
> Description
> -------
> 
> For some reason (which is not quite clear to me) Tpl::SearchHit can have null account or entity. It might be worth finding out why it happens, but for now let's just make logviewer not to crash when such situation occurs.
> 
> 
> This addresses bug 305750.
>     http://bugs.kde.org/show_bug.cgi?id=305750
> 
> 
> Diffs
> -----
> 
>   logviewer/entity-proxy-model.cpp 5365783 
> 
> Diff: http://git.reviewboard.kde.org/r/106176/diff/
> 
> 
> Testing
> -------
> 
> Martin, could you please test it? I was unable to reproduce the crash you described in the bug even without this patch.
> 
> 
> Thanks,
> 
> Dan Vratil
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-telepathy/attachments/20120825/ebc0113d/attachment.html>


More information about the KDE-Telepathy mailing list