Bug 287847 - KPluginSelector freezes in Amarok and KRunner, but not in KWin settings (4.7.80 regression)
Summary: KPluginSelector freezes in Amarok and KRunner, but not in KWin settings (4.7....
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kdeui (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords: regression
: 287213 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-11-29 15:42 UTC by K900
Modified: 2011-12-09 20:18 UTC (History)
1 user (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 K900 2011-11-29 15:42:18 UTC
Version:           unspecified (using Devel) 
OS:                Linux

It's a regression in 4.7.80, I can't reproduce it on 4.7.3 using the same hardware and drivers. There was a bug long ago that related the problem to the widget style, but it doesn't seem the case because it still hangs with both CDE and Cleanlooks. I can't verify it now (but I'll try and rebuild with debug symbols), but it is probably stuck in some kind of an infinite loop or recursion, as it seems to respond to first events after some 5-10 seconds (like scrolling). It also works in a normal way for some 0.5s just after the widget is shown.

Reproducible: Always

Steps to Reproduce:
1) Start Amarok. open settings and click the Plugins tab.
2) Start KRunner and click the settings button

Actual Results:  
Application freezes, but can be killed with xkill.

Expected Results:  
No freeze.

lspci: http://paste.kde.org/152648
glxinfo: http://paste.kde.org/152654
Comment 1 K900 2011-12-01 14:46:30 UTC
Tested on a clean setup and with other video drivers (Nouveau), and it's still 100% reproducible
Comment 2 K900 2011-12-01 16:21:31 UTC
Most definitely related to https://git.reviewboard.kde.org/r/103165/diff/#5.2 . The rest of the patch seems ok though. Reverted this in Agilia packaging.
Comment 3 Thomas Lübking 2011-12-01 19:00:12 UTC
Git commit 70c6350fac3ab2b74d61811606eb250da7c5a061 by Thomas Lübking.
Committed on 01/12/2011 at 19:46.
Pushed by luebking into branch 'KDE/4.7'.

Fix regression induced (but likely not caused) by commit e91e5fed6b1aad365e12e919f430c3e8147552d3

Commiting on behalf of Jaime Torres.

Ratio:
On k-c-d I suggested this would be another ouotcome of bug #213068 and Jaime could confirm this and the
scrollbar policy workaround to work.
He suggested to fix it by "setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);" instead (since presumingly the
pluginselector is always top-down oriented)
I tested that variant as well and could not reproduce the issue.

Since Jaime has no acces to his development environment for today he asked me to either revert his commit or
apply the hotfix working around bug #213068 as mentioned above.

Because i could not spot any bug in his commit i'll go with the hotfix to prevent a regression.
Resolving the actual recursion bug is an outstanding issue.

CCBUG: 213068
CCBUG: 287847

M  +1    -0    kutils/kpluginselector.cpp

http://commits.kde.org/kdelibs/70c6350fac3ab2b74d61811606eb250da7c5a061
Comment 4 Weng Xuetian 2011-12-01 21:10:15 UTC
*** Bug 287213 has been marked as a duplicate of this bug. ***
Comment 5 K900 2011-12-02 13:22:57 UTC
@Thomas: Is anyone still looking into this or are you leaving the workaround there? I tried to find the issue, but I'm not really good at C++...
Comment 6 Aaron J. Seigo 2011-12-02 20:53:21 UTC
Git commit ee00a9f572a383b98c4fd01f0b0477ff9148c5d7 by Aaron Seigo, on behalf of Thomas Lübking.
Committed on 01/12/2011 at 19:46.
Pushed by aseigo into branch 'frameworks'.

Fix regression induced (but likely not caused) by commit e91e5fed6b1aad365e12e919f430c3e8147552d3

Commiting on behalf of Jaime Torres.

Ratio:
On k-c-d I suggested this would be another ouotcome of bug #213068 and Jaime could confirm this and the
scrollbar policy workaround to work.
He suggested to fix it by "setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);" instead (since presumingly the
pluginselector is always top-down oriented)
I tested that variant as well and could not reproduce the issue.

Since Jaime has no acces to his development environment for today he asked me to either revert his commit or
apply the hotfix working around bug #213068 as mentioned above.

Because i could not spot any bug in his commit i'll go with the hotfix to prevent a regression.
Resolving the actual recursion bug is an outstanding issue.

CCBUG: 213068
CCBUG: 287847

M  +1    -0    kutils/kpluginselector.cpp

http://commits.kde.org/kdelibs/ee00a9f572a383b98c4fd01f0b0477ff9148c5d7
Comment 7 Thomas Lübking 2011-12-05 20:43:57 UTC
(In reply to comment #5)
> @Thomas: Is anyone still looking into this or are you leaving the workaround
> there? I tried to find the issue, but I'm not really good at C++...

Sorry for the delay, i'm not subscribed to this bug.
I think we've a proper fix:
https://git.reviewboard.kde.org/r/103335/

It would be great if you could give it a try and confirm or deny the solution.
Comment 8 Thomas Lübking 2011-12-06 18:38:55 UTC
Git commit 08325ba32b72326030004cc28430431193d82fc2 by Thomas Lübking.
Committed on 05/12/2011 at 14:56.
Pushed by luebking into branch 'KDE/4.7'.

fix KCategorizedView race

BUG: 213068
BUG: 287847
REVIEW: 103335

QListView::updateGeometries() has it's own opinion on whether the scrollbars should be visible (valid range) or not
and triggers a (sometimes additionally timered) resize through ::layoutChildren()
http://qt.gitorious.org/qt/qt/blobs/4.7/src/gui/itemviews/qlistview.cpp#line1499
(the comment above the main block isn't all accurate, layoutChldren is called regardless of the policy)

As a result QListView and KCategorizedView occasionally started a race on the scrollbar visibility, effectively blocking the UI
So we prevent QListView from having an own opinion on the scrollbar visibility by
fixing it before calling the baseclass QListView::updateGeometries() and restoring the policy afterwards

M  +23   -1    kdeui/itemviews/kcategorizedview.cpp
M  +0    -2    kutils/kpluginselector.cpp

http://commits.kde.org/kdelibs/08325ba32b72326030004cc28430431193d82fc2
Comment 9 Thomas Lübking 2011-12-09 20:18:07 UTC
Git commit 8095c11d181e967cb161de3452f45c1df81bbc66 by Thomas Lübking.
Committed on 08/12/2011 at 18:58.
Pushed by luebking into branch 'KDE/4.7'.

Fix KCategorizedView race - better :p

BUG: 213068
BUG: 287847
REVIEW: 103335

M  +24   -9    kdeui/itemviews/kcategorizedview.cpp

http://commits.kde.org/kdelibs/8095c11d181e967cb161de3452f45c1df81bbc66