Bug 292895

Summary: Context view is not fully formed when starting Amarok
Product: [Applications] amarok Reporter: bill p. (aka google01103) <dweeble01103>
Component: Context ViewAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: minor CC: asturm, axel.braun, b3nmore, bwyazel, fire, gabextreme, hrvoje.senjan, john, kde, kirill.bogdanenko, lafferx, liuerfire, martin.ruessler, matej, mr.erdk, pligdas, proba223, sam, simon.esneault, simon, thoor1, turtlevt, web, xhanka00, XVampireX
Priority: NOR    
Version: 2.5-git   
Target Milestone: 2.7   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In: 2.6
Attachments: how Amarok looks when started

Description bill p. (aka google01103) 2012-01-30 19:01:41 UTC
Created attachment 68345 [details]
how Amarok looks when started

Version:           2.5.0 (using KDE 4.8.0) 
OS:                Linux

Context view is not fully formed when starting Amarok but if the width is adjusted just a bit the context view is fully displayed

best way to describe it is the attached pic (also found here http://simplest-image-hosting.net/jpg-0-screen-20120130-085503)

might be relevant that I am using QT 4.8

Reproducible: Didn't try

Steps to Reproduce:
start app

Actual Results:  
Context view is not fully formed

Expected Results:  
Context view is fully formed

wiping out Amarok's config files and app folder does not fix this
Comment 1 Sam Lade 2012-01-30 20:11:54 UTC
This is not Qt 4.8 specific - I am now getting the same issue with Amarok Git, KDE 4.8 and Qt 4.7.4. I had not, however, seen the problem with KDE 4.7. This said, I didn't get it the first couple of times I started it on KDE 4.8 either, but it seems to be happening every time now.
http://img824.imageshack.us/img824/7809/amarokcontextweird.png
Comment 2 Myriam Schweingruber 2012-01-30 20:28:34 UTC
I still can't reproduce this here.
Comment 3 proba223 2012-02-01 12:03:06 UTC
I can confirm this with the stable version of Amarok.

Distro: Arch linux
WM: Awesome 
Package versions:
amarok 2.5.0-2
kdebase-runtime 4.8.0-1
kdelibs 4.8.0-1
qt 4.8.0-2
awesome 3.4.11
cairo-xcb 1.10.2
Comment 4 Myriam Schweingruber 2012-02-01 21:18:48 UTC
Apparently it happen here as well, but I can only reproduce it when closing and reopening Amarok shortly one after the other.
Comment 5 bill p. (aka google01103) 2012-02-01 21:51:38 UTC
Myriam define "shortly"? I just waited 10 minutes and it did not display correctly

As best as I can recall duration between re-openings does not matter for me
Comment 6 Myriam Schweingruber 2012-02-01 22:38:59 UTC
Shortly between closing Amarok and restarting it: about a minute or two
Comment 7 John Farrar 2012-02-04 16:10:32 UTC
Also seeing this intermittantly.  Plus, on occasions, half the collection list disappears and only scrolls in half the allocated window.

openSuse 12.1
KDE 4.8
Amarok 2.50-141-2
qt 4.80-254-1
Comment 8 Myriam Schweingruber 2012-02-09 20:57:47 UTC
(In reply to comment #7)
> Also seeing this intermittantly.  Plus, on occasions, half the collection list
> disappears and only scrolls in half the allocated window.
> 
Could you provide screenshots of that?
Comment 9 John Farrar 2012-02-10 09:58:46 UTC
On 09/02/12 20:57, Myriam Schweingruber wrote:
> https://bugs.kde.org/show_bug.cgi?id=292895
>
>
>
>
>
> --- Comment #8 from Myriam Schweingruber<myriam kde org>   2012-02-09 20:57:47 ---
> (In reply to comment #7)
>> Also seeing this intermittantly.  Plus, on occasions, half the collection list
>> disappears and only scrolls in half the allocated window.
>>
> Could you provide screenshots of that?
>

It is intermittant.  Of course, haven't seen it since I posted!  Will 
take screen shot if it happens again.

John F.
Comment 10 simon 2012-02-10 11:58:34 UTC
same here with current git, screenshot looks exactly like mine

i get some 


amarok(7995)/libplasma Plasma::ViewPrivate::updateSceneRect: !!!!!!!!!!!!!!!!! setting the scene rect to QRectF(0,0 200x200) associated screen is -1
amarok(7995)/libplasma Plasma::ViewPrivate::updateSceneRect: !!!!!!!!!!!!!!!!! setting the scene rect to QRectF(0,0 200x200) associated screen is -1
amarok: BEGIN: void LyricsApplet::dataUpdat

and 200*200px might fit to the size
Comment 11 Mekenok HearsCrow 2012-02-29 22:07:18 UTC
I just upgraded my SuSe 12.1 system from KDE 4.7 to KDE 4.8 today. While amarok worked fine before the upgrade, I am having the same problem as initially described - the context panel does not properly open until the main window is resized.

I know, it's not a big problem - just annoying, but I wanted to let you know the problem is not just for one individual.
Comment 12 Myriam Schweingruber 2012-03-01 12:22:10 UTC
This is related to plasma actually, we are about to refactor the Context View rewriting the engines. Not sure this will happen before Amarok 2.7 though.
Comment 13 b3nmore 2012-03-26 12:08:30 UTC
(In reply to comment #10)
> same here with current git, screenshot looks exactly like mine
> 
> i get some 
> 
> 
> amarok(7995)/libplasma Plasma::ViewPrivate::updateSceneRect:
> !!!!!!!!!!!!!!!!! setting the scene rect to QRectF(0,0 200x200) associated
> screen is -1
> amarok(7995)/libplasma Plasma::ViewPrivate::updateSceneRect:
> !!!!!!!!!!!!!!!!! setting the scene rect to QRectF(0,0 200x200) associated
> screen is -1
> amarok: BEGIN: void LyricsApplet::dataUpdat
> 
> and 200*200px might fit to the size

That's right, amarok ignores the geometry setting in .kde/share/config/amarok-appletsrc and just starts with 200,200.
Comment 14 Sam Lade 2012-03-26 18:00:52 UTC
Okay, I ran git bisect, and this bug was introduced by commit 79bd9a7c6777e3f5d4e723bc5d3b00e5d6fe532b, "Fix infinite loop in context view eating CPU until main window is shown", by Matěj Laitl (I've cc'ed him in on this bug).
Confirmed by undoing that change on current master, and the applet containment starts the right size. The CPU consumption bug returns, however.
Comment 15 Matěj Laitl 2012-03-26 21:31:18 UTC
(In reply to comment #14)
> Okay, I ran git bisect, and this bug was introduced by commit
> 79bd9a7c6777e3f5d4e723bc5d3b00e5d6fe532b, "Fix infinite loop in context view
> eating CPU until main window is shown", by Matěj Laitl (I've cc'ed him in on
> this bug).
> Confirmed by undoing that change on current master, and the applet
> containment starts the right size. The CPU consumption bug returns, however.

OK, thanks for digging this out. I will eat my own dogfood and try to find the root of the problem.
Comment 16 Sam Lade 2012-03-26 21:51:54 UTC
(In reply to comment #15)
> (In reply to comment #14)
> > Okay, I ran git bisect, and this bug was introduced by commit
> > 79bd9a7c6777e3f5d4e723bc5d3b00e5d6fe532b, "Fix infinite loop in context view
> > eating CPU until main window is shown", by Matěj Laitl (I've cc'ed him in on
> > this bug).
> > Confirmed by undoing that change on current master, and the applet
> > containment starts the right size. The CPU consumption bug returns, however.
> 
> OK, thanks for digging this out. I will eat my own dogfood and try to find
> the root of the problem.

The CPU drain was definitely a bigger issue. This seems only to have been recorded post KDE4.8, so that might provide some hints as to what exactly is going wrong.
My guess is the simplest solution here is just triggering the resize event at the correct point once it actually knows its size. I did have a look at the code, but it's not something I've ever worked with before and I only got as far as confirming that triggering a timer to run the resizing code with a short delay works; I didn't locate the point at which the size actually becomes available, but it's after the MainWindow init finishes.
The Plasma stuff is scheduled to be replaced by QML instead at some point, so it's probably not worth fixing the layouts properly at this juncture unless that's easier.
Comment 17 Myriam Schweingruber 2012-03-27 15:33:59 UTC
*** Bug 296878 has been marked as a duplicate of this bug. ***
Comment 18 Daniel Faust 2012-04-04 07:25:50 UTC
*** Bug 297444 has been marked as a duplicate of this bug. ***
Comment 19 daniel 2012-04-07 13:36:35 UTC
*** Bug 297649 has been marked as a duplicate of this bug. ***
Comment 20 Myriam Schweingruber 2012-05-25 20:41:35 UTC
*** Bug 300597 has been marked as a duplicate of this bug. ***
Comment 21 Myriam Schweingruber 2012-06-03 17:55:27 UTC
*** Bug 301094 has been marked as a duplicate of this bug. ***
Comment 22 Andreas Sturmlechner 2012-06-10 20:56:34 UTC
Any progress? It's a minor issue, but hugely annoyingly visible :)

KDE SC 4.8.4, Qt-4.8.2, amarok-2.5.90

Plus, I've also seen the garbled collection list mentioned in comment #7 which is a bit more annoying.
Comment 23 Myriam Schweingruber 2012-06-11 18:41:03 UTC
(In reply to comment #22)
> Any progress? It's a minor issue, but hugely annoyingly visible :)

No, but we are about to rewrite the Context View, this bug is not solvable otherwise. So you will need some more patience as this is a GSoC project. As you can see from the target already...

> Plus, I've also seen the garbled collection list mentioned in comment #7
> which is a bit more annoying.

Not related to this bug at all and reported in a different bug.
Comment 24 lafferx 2012-06-12 18:19:37 UTC
This bug also exists in 2.5.0-2 and 2.5.90 Windows versions.
However, I have not encountered it in 2.4.3-4 (still talking about the w32 version).
Comment 25 Myriam Schweingruber 2012-06-18 13:14:10 UTC
*** Bug 302064 has been marked as a duplicate of this bug. ***
Comment 26 Kyrylo Bohdanenko 2012-06-20 15:40:52 UTC
Would like to mention that amarok 2.4 on KDE 4.8 and amarok 2.5 on KDE 4.7 looked fine. Th issue started to appear only on KDE 4.8 & amarok 2.5.
Comment 27 Cédric Bellegarde 2012-06-20 15:48:52 UTC
Bug present with KDE 4.9 and last stable amarok version...
Comment 28 Myriam Schweingruber 2012-06-21 09:15:10 UTC
Folks, thanks for all that feedback, but there is no need to confirm, this already is on the latest git and we really have already all the information we need. Please read the comments before adding info we already have.
Comment 29 Andreas Sturmlechner 2012-06-22 01:23:09 UTC
So I've returned to amarok master, but it isn't fixed there - probably in some developer's branch? ;)

Sorry for the nagging, but if it isn't going to be fixed until 2.7 an otherwise great piece of software will appear to be of beta quality at first sight for a long time - which it certainly isn't. Really no half-ugly workaround possible?
Comment 30 Matěj Laitl 2012-06-22 07:46:04 UTC
(In reply to comment #29)
> Really no half-ugly workaround possible?

There certainly is, I'll work-around this for 2.6.
Comment 31 Myriam Schweingruber 2012-06-22 19:16:30 UTC
*** Bug 302327 has been marked as a duplicate of this bug. ***
Comment 32 Matěj Laitl 2012-06-25 22:49:42 UTC
Git commit a0f4288e0b952830d38151264c0a8b042e32d8a4 by Matěj Laitl.
Committed on 26/06/2012 at 00:42.
Pushed by laitl into branch 'master'.

Fix Context view not being fully formed on startup

Something from inside Plasma tries to resize context view's sceneRect()
to 200x200 px. I don't know why this happens, but let's hope we'll have
QML context view soon, so don't investigate and use a work-around.
FIXED-IN: 2.6
DIGEST: popular bug fixed in Amarok

M  +1    -0    ChangeLog
M  +2    -1    src/context/containments/verticallayout/VerticalToolbarContainment.cpp

http://commits.kde.org/amarok/a0f4288e0b952830d38151264c0a8b042e32d8a4
Comment 33 bill p. (aka google01103) 2012-06-25 23:34:58 UTC
recompiled with Matěj Laitl's Git commit a0f4288e0b952830d38151264c0a8b042e32d8a4 and it appears to be fixed
Comment 34 Matěj Laitl 2012-06-27 10:21:28 UTC
*** Bug 288575 has been marked as a duplicate of this bug. ***
Comment 35 Hrvoje Senjan 2012-06-28 00:28:22 UTC
Also confirming this is fixed
Comment 36 Andreas Sturmlechner 2012-06-28 07:26:01 UTC
seems to be fixed, yeah :D
Comment 37 Myriam Schweingruber 2012-07-07 23:37:07 UTC
*** Bug 302874 has been marked as a duplicate of this bug. ***
Comment 38 Myriam Schweingruber 2012-07-08 11:32:45 UTC
*** Bug 302988 has been marked as a duplicate of this bug. ***
Comment 39 Myriam Schweingruber 2012-07-25 03:31:25 UTC
*** Bug 304027 has been marked as a duplicate of this bug. ***