Bug 251274 - Multifolder selection ('select') hangs when selecting server folders after pressing 'done'
Summary: Multifolder selection ('select') hangs when selecting server folders after pr...
Status: CLOSED FIXED
Alias: None
Product: KDE PIM Mobile
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Maemo 5 Linux
: VHI critical
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-15 09:15 UTC by Bernhard E. Reiter
Modified: 2010-10-01 12:27 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard E. Reiter 2010-09-15 09:15:05 UTC
Maemo 4:4.5~20100910.1175159-1maemo3.1174786

In Kontact Mobile frontend Mail and Calendar,
I can hang both frontends by trying to select several server folders.

On the main screen, choose the "select" button to select several folders.
I can draw in two folders from one level to the right, they both
get checked-symbols and then I press done
and it hangs the frontend for me.
Comment 1 Bernhard E. Reiter 2010-09-15 09:15:59 UTC
The multifolder selection is quite important for the calender view
to be useful.

I also encountered this on the 20100903 experimental tag version.
Comment 2 Bjoern Ricks 2010-09-15 15:47:19 UTC
I am able to reproduce this bug with email folders
it did work in korg for me
Comment 3 Stephen Kelly 2010-09-15 18:54:43 UTC
SVN commit 1175718 by skelly:

Don't create a QItemSelection with duplicate ranges.

The 'source' selection model might have a selection which includes
a particular index and its parent. We need to be careful to not
include the overlap twice in the result.

BUG: 251274

 M  +9 -0      kbreadcrumbselectionmodel.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1175718
Comment 4 Stephen Kelly 2010-09-15 18:56:02 UTC
SVN commit 1175719 by skelly:

Don't create a QItemSelection with duplicate ranges.

The 'source' selection model might have a selection which includes
a particular index and its parent. We need to be careful to not
include the overlap twice in the result.

CCBUG: 251274

 M  +9 -0      kbreadcrumbselectionmodel.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1175719
Comment 5 András Manţia 2010-09-16 10:31:44 UTC
I forgot to update before checking the br, so I debugged into it and came up with this patch:
Index: itemviews/kselectionproxymodel.cpp
===================================================================
--- itemviews/kselectionproxymodel.cpp  (revision 1175646)
+++ itemviews/kselectionproxymodel.cpp  (working copy)
@@ -191,7 +191,7 @@
         const QModelIndex nextSibling = ansList.value(bestParentRow + 1);
 
         if (!nextSibling.isValid()) {
-            continue;
+            break;
         }
 
         if (youngestAncestor.row() <= nextSibling.row()) {


The reasoning of the change is that if nextParent == commonParent at the beginning and nextSibling is not valid, the loop will never end.
Comment 6 Felix Wolfsteller 2010-09-17 16:59:05 UTC
Still reproduceable with kmail-mobile version 4:4.5~20100917.1176264-1maemo1.1174921 . Did not try with organizer.
Comment 7 Bernhard E. Reiter 2010-09-20 09:21:20 UTC
I can confirm the issue is still there with Kontact Mobil "Mail" on
Package: kdepim-mobile
Version: 4:4.5~20100917.1176295-1maemo1.1174921
Package: libqt4-experimental-gui
Version: 4.7.0~git20100908-0maemo1

It seems like a "busy wait" as kmail-mobile seems to be eating CPU.
Comment 8 Felix Wolfsteller 2010-09-20 11:46:15 UTC
Gone in version 4:4.5~20100920.1177273-1maemo1.1174921 (kmail-mobile).
Comment 9 Bjoern Ricks 2010-09-20 12:38:59 UTC
Seems to me a problem only if two or more imap folders are selected but
nevertheless it still occurs with 4:4.5~20100917.1176295-1maemo1.1174921. Are there any patches for this issue not included in latest tag?
Comment 10 Felix Wolfsteller 2010-09-20 12:45:07 UTC
(In reply to comment #9)
> Seems to me a problem only if two or more imap folders are selected but
Only noticed now as well, but the original reporter was pretty precise in the bugs title:  "... hangs when selecting _server_ folders ..." :)

> nevertheless it still occurs with 4:4.5~20100917.1176295-1maemo1.1174921. Are
> there any patches for this issue not included in latest tag?
Comment 11 Felix Wolfsteller 2010-09-21 11:26:58 UTC
Reverting my comment #8 .
Persists in version 4:4.5~20100920.1177660-1maemo1.1177547 . When only selecting __non-local__ folders, pressing "Done" leads to a hanging application.
Comment 12 Bernhard E. Reiter 2010-09-22 10:19:13 UTC
To stress two point that have been in my original report, but not explicitely
stressed:
Reproducable with _two_ _imap_ folders from _one level_.
Comment 13 Volker Krause 2010-09-28 18:25:59 UTC
Please retest with revision >= 1180700, Steve's fixes were not merged into the kdelibs komo branch, which explains why they didn't show any effect.
Comment 14 Felix Wolfsteller 2010-10-01 12:27:42 UTC
Confirmed, works as expected in 4:4.5~20101001.1181430-1maemo1.1181463 .