Review Request 111919: Fix possible crash when disabling grouping

Mark Gaiser markg85 at gmail.com
Wed Aug 7 12:29:41 BST 2013


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


I can't reproduce it with your suggestions in the bug report or even with some creative group enabling/disabling.. I guess it's just a rare crash. But the patch seems OK to me. Not giving a ship it because i don't know the code in which you made the change.

- Mark Gaiser


On Aug. 6, 2013, 9:26 p.m., Frank Reininghaus wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111919/
> -----------------------------------------------------------
> 
> (Updated Aug. 6, 2013, 9:26 p.m.)
> 
> 
> Review request for Dolphin.
> 
> 
> Description
> -------
> 
> Sometimes when enabling and then disabling grouping, I get a crash.
> 
> I think the problem is that KItemListView::slotGroupedSortingChanged(bool current) uses a QMutableHashIterator to iterate through the groups while they are being removed. The problem is that they are not removed using the iterator, but by another function inside the loop. The iterator can thus become invalid, and iterating further can cause all sorts of trouble if we are unlucky.
> 
> The solution is to use a QHashIterator. This iterator creates an internal copy of the container which is not modified when elements are being removed.
> 
> 
> This addresses bug 323248.
>     http://bugs.kde.org/show_bug.cgi?id=323248
> 
> 
> Diffs
> -----
> 
>   dolphin/src/kitemviews/kitemlistview.cpp 0c3183c 
> 
> Diff: http://git.reviewboard.kde.org/r/111919/diff/
> 
> 
> Testing
> -------
> 
> Cannot reproduce the crash any more.
> 
> 
> Thanks,
> 
> Frank Reininghaus
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20130807/eb0d3bf9/attachment.htm>


More information about the kfm-devel mailing list