Bug 293318 - Dolphin repeats a rearrange action infinitely in some cases
Summary: Dolphin repeats a rearrange action infinitely in some cases
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: general (show other bugs)
Version: 2.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords: usability
: 293343 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-02-04 19:21 UTC by Denis M. (Phr33d0m)
Modified: 2012-02-05 18:22 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.1
Sentry Crash Report:


Attachments
Video from the description which shows dolphin's described behaviour. (982.02 KB, video/x-msvideo)
2012-02-04 19:21 UTC, Denis M. (Phr33d0m)
Details
State before infinite loop (59.66 KB, image/png)
2012-02-04 20:43 UTC, Peter Penz
Details
Example directory (567 bytes, application/x-compressed-tar)
2012-02-04 20:44 UTC, Peter Penz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Denis M. (Phr33d0m) 2012-02-04 19:21:49 UTC
Created attachment 68492 [details]
Video from the description which shows dolphin's described behaviour.

Version:           2.0 (using KDE 4.8.0) 
OS:                Linux

In some specific cases while using "View Mode: Compact", if there's a filename in the last column that's large enough to go out of screen, it tries to rearranges it creating the horizontal scrollbar and... I'm not sure how to describe this exactly, so I made a video available for you where appears that behaviour: http://politeia.in/kde-dolphin-bug.avi

Also, note that this *only* happens when dolphin is maximized.

Reproducible: Always

Steps to Reproduce:
Specific to filenames lenght.


Expected Results:  
The expected behaviour should be the same as when the window is not maximized (i.e. to work).

This behaviour causes some noticable cpu utilization which on slow systems can cause a very slow system performance.
Comment 1 Denis M. (Phr33d0m) 2012-02-04 20:26:21 UTC
I forgot to add something very important: this occurs when dolphin is maximized and there is *more* than one tab opened.
If there is only 1 tab there is are no problems.
Comment 2 Peter Penz 2012-02-04 20:43:36 UTC
Created attachment 68494 [details]
State before infinite loop
Comment 3 Peter Penz 2012-02-04 20:44:45 UTC
Created attachment 68495 [details]
Example directory
Comment 4 Peter Penz 2012-02-04 20:45:24 UTC
Thanks for the report, I could reproduce the issue with the attached example directory. 

(Internal notes: The screenshot shows the state with the attached example directory where no infinite loop is done. Now decreasing the width of the window will result in an infinite loop because the scrollbar results in a decreased height and this results in a changed layout which (now) again does not need a scrollbar anymore).
Comment 5 Peter Penz 2012-02-04 20:49:54 UTC
Another internal note: When decreasing the width the new layout will be
a     e This is a longer label for the compact view h            x
b     f This is a longer label for the compact view i
c     g                                             Very long...

(and yes: I forgot the 'd' ;-)
Comment 6 Peter Penz 2012-02-05 08:55:18 UTC
*** Bug 293343 has been marked as a duplicate of this bug. ***
Comment 7 Peter Penz 2012-02-05 18:22:18 UTC
Git commit 81034de5074071d45bd4da212c80fb3dd5ea4933 by Peter Penz.
Committed on 05/02/2012 at 19:14.
Pushed by ppenz into branch 'KDE/4.8'.

Fix potential endless loop in layout

Usecase:
- No scrollbar is shown
- Window size will be decreased so that a scrollbar gets necessary

The decreased window size minus the space required for the scrollbar
results in a relayout of the items. In 99 % of all
cases a decreased window size won't result in showing more items in parallel in
comparison to a larger window size. However in the remaining 1 % this can
happen (e.g. see bug 293318 for a sample). This results in an endless loop as
now no scrollbar is required anymore, the layout changes again, the scrollbar
is required again, ...
FIXED-IN: 4.8.1

M  +34   -0    dolphin/src/kitemviews/kitemlistcontainer.cpp
M  +7    -0    dolphin/src/kitemviews/kitemlistcontainer.h
M  +13   -0    dolphin/src/kitemviews/kitemlistview.cpp
M  +8    -0    dolphin/src/kitemviews/kitemlistview.h

http://commits.kde.org/kde-baseapps/81034de5074071d45bd4da212c80fb3dd5ea4933
Comment 8 Peter Penz 2012-02-05 18:22:52 UTC
Git commit dd917bf572f7fa79c3599f717bf78d7088648bfa by Peter Penz.
Committed on 05/02/2012 at 19:14.
Pushed by ppenz into branch 'master'.

Fix potential endless loop in layout

Usecase:
- No scrollbar is shown
- Window size will be decreased so that a scrollbar gets necessary

The decreased window size minus the space required for the scrollbar
results in a relayout of the items. In 99 % of all
cases a decreased window size won't result in showing more items in parallel in
comparison to a larger window size. However in the remaining 1 % this can
happen (e.g. see bug 293318 for a sample). This results in an endless loop as
now no scrollbar is required anymore, the layout changes again, the scrollbar
is required again, ...
FIXED-IN: 4.8.1

M  +34   -0    dolphin/src/kitemviews/kitemlistcontainer.cpp
M  +7    -0    dolphin/src/kitemviews/kitemlistcontainer.h
M  +13   -0    dolphin/src/kitemviews/kitemlistview.cpp
M  +8    -0    dolphin/src/kitemviews/kitemlistview.h

http://commits.kde.org/kde-baseapps/dd917bf572f7fa79c3599f717bf78d7088648bfa