[Kde-pim] Review Request: Check that EntityTreeModelPrivate::m_collection actually contains a key before the assertion

Stephen Kelly steveire at gmail.com
Thu Sep 29 13:23:15 BST 2011


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


This patch doesn't get my approval. If you need an if() like that, then an invariant in the class is no longer true (m_collections and the keys of m_childEntities should be in sync). If that class invariant is broken you'll have more, different, and hidden crashes later.

Can you post your plasma crash backtrace in a bug report please?

- Stephen Kelly


On Sept. 28, 2011, 10:16 p.m., David Narváez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102616/
> -----------------------------------------------------------
> 
> (Updated Sept. 28, 2011, 10:16 p.m.)
> 
> 
> Review request for Akonadi, KDEPIM-Libraries and Stephen Kelly.
> 
> 
> Description
> -------
> 
> I was experiencing crashes when updating iCal resources, similar to bug 273676 (but probably not the same) and after some debugging I found out that the Q_ASSERT to check that m_collection indeed has the key to remove (line 1030) was causing the issue. Adding a check to be sure the key is indeed in m_collections should fix that, but I'm not sure if code should worry more about why the key is not in m_collections or just do the check. Makes sense?
> 
> 
> This addresses bug 273676.
>     http://bugs.kde.org/show_bug.cgi?id=273676
> 
> 
> Diffs
> -----
> 
>   akonadi/entitytreemodel_p.cpp d3ab393 
> 
> Diff: http://git.reviewboard.kde.org/r/102616/diff/diff
> 
> 
> Testing
> -------
> 
> 1. Add an iCal resource (I'm actually not sure if this happens with all iCal resources, if needed I could point at one URL which fails in all of my KDE 4.7 installations)
> 2. Plasma crashes
> 3. Apply the patch and restart plasma-desktop
> 4. Open KOrganizer and update the iCal resource, plasma should not crash now
> 
> 
> Thanks,
> 
> David Narváez
> 
>

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list