Bug 208102 - Multiple "busy" indicator circles hang around
Summary: Multiple "busy" indicator circles hang around
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR grave
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 224418 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-09-21 19:30 UTC by Yop69
Modified: 2010-02-13 02:34 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Decade of circles animated (136.48 KB, image/png)
2009-09-21 19:31 UTC, Yop69
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yop69 2009-09-21 19:30:21 UTC
Version:           2.2 GIT NEON (using KDE 4.3.0)
OS:                Linux

On the wikipedia page load in Amarok, appears one decade of animated circles. It's very strange, I have done a print screen but I can't send it here :(

Logicaly, one circle appears.

I hope you understand my explanation ;)
Comment 1 Yop69 2009-09-21 19:31:19 UTC
Created attachment 37103 [details]
Decade of circles animated
Comment 2 Yop69 2009-09-21 19:32:34 UTC
I'm on Ubuntu Jaunty
Comment 3 Myriam Schweingruber 2009-09-21 23:20:48 UTC
Wow, I have never seen this before :)
Comment 4 Mark Kretschmann 2009-09-22 12:20:13 UTC
A similar issue was discussed on our mailing list a while ago. It may or may not have been fixed:

http://lists.kde.org/?t=125261431500001&r=1&w=2
Comment 5 Leo Franchi 2009-10-22 04:42:05 UTC
Yop, can you confirm that this is still an issue? There have been a few tweaks to the animation/load-display code in the last month.
Comment 6 Yop69 2009-10-22 09:18:47 UTC
(In reply to comment #5)
> Yop, can you confirm that this is still an issue? There have been a few tweaks
> to the animation/load-display code in the last month.

I can't confirm anything because my amarok nightly crash on start :( (https://bugs.kde.org/show_bug.cgi?id=210124)
Comment 7 Mark Kretschmann 2009-11-17 11:28:53 UTC
Any news on this? I think this might have been a Plasma bug.
Comment 8 Simon ESNEAULT 2009-11-17 11:40:46 UTC
Yep, I have never seen this ...
Comment 9 Myriam Schweingruber 2009-11-17 11:46:55 UTC
Closing then.
Comment 10 Yop69 2009-11-17 17:02:39 UTC
(In reply to comment #9)
> Closing then.

Why close it ?
I can't verify this bug on Ubuntu because my Nightly always crash on start. But I nobody debug it I think it's always here
Comment 11 Myriam Schweingruber 2009-11-17 19:05:42 UTC
You can still reopen it if you can reproduce this, don't worry.
Comment 12 Hilikus 2009-11-23 07:14:31 UTC
i also have this bug
i'm using ubuntu 9.10
i get the spinning icon on "current track" though. not on wikipedia
i do have the wikipedia widget in my list

amarok 2.2.1 and KDE 4.3.3
Comment 13 Myriam Schweingruber 2009-11-23 19:46:01 UTC
If you only have one spinning wheel appearing, that is not a bug but intended. Read the bug description correctly and see the attached screenshot, it is about multiple spinning wheels.
Comment 14 Hilikus 2009-11-23 19:59:17 UTC
in fact i have both
sometimes it's only one, sometimes its a bunch
at this very moment i have 6 spinning icons
this might be offtopic but how can a single loading icon be intended when loading has finished? it goes against standard UI expectations
Comment 15 Myriam Schweingruber 2009-11-23 21:59:26 UTC
Reopening based on comment. Thanks for the feedback
Comment 16 Myriam Schweingruber 2009-11-23 22:00:23 UTC
Changing status and version.
Comment 17 Hilikus 2009-11-24 02:24:59 UTC
(In reply to comment #12)
> i also have this bug
> i'm using ubuntu 9.10
> i get the spinning icon on "current track" though. not on wikipedia
> i do have the wikipedia widget in my list
> 
> amarok 2.2.1 and KDE 4.3.3

i removed the wikipedia widget and it still happens so it's not specific to that widget

let me know if there's more info i can provide
Comment 18 Matteo Beniamino 2009-12-10 20:22:06 UTC
Now, this is strange. I was affected by this bug, I investigated a bit and I think the problem is in the setBusy() function of the Plasma::Applet class, so I've downloaded the sources of kde4libs_4.3.2 Debian package (the distribution I'm using), applied all the Debian patches and compiled them: these should be exactly the same sources of the package installed in my system. But, if I put the resulting libplasma.so.3 in a directory contained in LD_LIBRARY_PATH the issue is fixed. I did not use the same compiler options of the packagers (in fact I used "cmake" with no options and obtained a rather larger lib, probably with all the debug symbols). If someone is interested, I've uploaded the library here:

http://www.tautologica.org/beniamino/download/libplasma.so.3.bz2
Comment 19 Matteo Beniamino 2009-12-12 14:23:47 UTC
While attempting to write a simple test case to reproduce this bug I've done something that caused it to disappear in my system, even using the original libplasma shipped with my distribution. Most likely it was the installation of some kde related package (I'm using Gnome at the moment) that either added a missing component or triggered some script that fixed something somewhere. I'm sorry I can't add more details but I've never used Kde libraries until some days ago.

This is the list of Debian packages I've installed/updated today in order to get 
the kdebase-workspace-bin for my tests:

libqtscript2.2-cil libsmokeqt4-2 libqyotoshared1 libqyoto4.5-cil libkephal4 libkfontinst4 libkscreensaver5 libkworkspace4 libnepomukquery4 libnepomukqueryclient4 libpolkit-qt0 libprocesscore4 libprocessui4 libqimageblitz4 libsolidcontrolifaces4 libsolidcontrol4 libplasma-applet-system-monitor4 libplasmaclock4 libtaskmanager4 libakonadiprivate1 kdepimlibs-data kdepimlibs5 libgps18 libksgrd4 libplasma-geolocation-interface4 libweather-ion4 plasma-dataengines-workspace plasma-widgets-workspace oxygencursors kdebase-workspace-data kdebase-workspace-kgreet-plugins kdebase-workspace-bin libsensors3 ksysguardd libeina-svn-03 libeet1 libqtruby4shared2 libsmokesoprano2 libsmokekde4-2 ruby1.8 libqt4-ruby1.8 libkde4-ruby1.8 libsmokeplasma2 libplasma-ruby1.8 libplasma-ruby libqzion0a libqedje0a plasma-scriptengine-javascript python-kde4 plasma-scriptengine-python plasma-scriptengine-qedje plasma-scriptengine-ruby plasma-scriptengine-superkaramba plasma-scriptengine-webkit libggadget-1.0-0 libggadget-qt-1.0-0 google-gadgets-common google-gadgets-gst google-gadgets-qt google-gadgets-xul plasma-scriptengine-googlegadgets plasma-scriptengines
Comment 20 Mark Kretschmann 2009-12-12 14:52:13 UTC
I think it's time to reassign this bug report to Plasma. I can't tell if it's a Plasma bug or a problem with the distro packages, but it seems unlikely that the bug is in Amarok itself.

Reassigning then, let's see what our friends from Plasma say :)
Comment 21 Mark Kretschmann 2010-01-23 08:59:04 UTC
New thread in our Amarok forum about this issue:

http://forum.kde.org/viewtopic.php?f=115&t=85097


PS:
CC'ing Aaron, as this bug seems rather grave to me (if this really is a Plasma bug, we're not fully sure yet).
Comment 22 Myriam Schweingruber 2010-01-27 07:32:26 UTC
*** Bug 224418 has been marked as a duplicate of this bug. ***
Comment 23 Tijben 2010-02-07 16:26:25 UTC
After Matteo Beniamino suggested that the bug could be caused by some missing packages, I've narrowed it down to the following list of packages which are installed by doing 'apt-get install plasma-widgets-workspace' (Ubuntu 9.10):

akonadi-server kdebase-workspace-libs4+5 kdepim-runtime kdepim-runtime-data kdepim-runtime-libs4 kdepimlibs-data kdepimlibs5 libakonadiprivate1 libboost-program-options1.38.0 libgpgme11 libical0 libpth20 libstrigiqtdbusclient0 mysql-server-core-5.1 plasma-dataengines-workspace

So, on a freshly installed Ubuntu (not Kubuntu, which would install all KDE packages per default I think), doing an 'apt-get install amarok' doesn't install some package needed to eliminate the running circles.

I know it's still a big list of packages but maybe someone could narrow it down further.

Thanks anyway for tracking the issue and working so hard at Amarok.
Comment 24 Chris Brown 2010-02-10 21:06:26 UTC
I can confirm that installing plasma-widgets-workspace on my Ubuntu system fixes this issue 100%.

The package that is involved seems to be plasma-widgets-workspace itself as I can install all of the other packages listed and the problem is still present however when I install plasma-widgets-workspace the problem disappears.
Comment 25 Myriam Schweingruber 2010-02-10 21:22:39 UTC
This appears to be a packaging issue, then. Leo, should we add this to the required dependencies?
Comment 26 Aaron J. Seigo 2010-02-10 22:03:44 UTC
> when I install plasma-widgets-workspace the problem disappears

and finally the mystery reveals itself. plasma-widgets-workspace contains this file:

/usr/lib/kde4/plasma_animator_default.so

that is indeed in kdebase/workspace, but it is also responsible for driving animations used via Plasma::Animator (which supported plugins so animation styles could be changed on the fly / at runtime). if it isn't installed, animations will simply not complete.

i'm guessing that Amarok was not in this case using Plasma::BusyWidget which would not have been affected by this? anyways ...

as of 4.4 that API is deprecated in favour of Kinetic. otherwise i'd suggest moving plasma_animator_default.so to runtime but i'd rather not saddle kdebase-runtime with a dead-end plugin at this point in the game.

if Amarok is now using Kinetic (or the Plasma::Animator::create(..) API instead of the old customAnimation, etc. API that is now marked as deprecated) for this then the problem won't exist.

cheers.
Comment 27 Leo Franchi 2010-02-10 22:22:43 UTC
we have the animation code adapted to the new API in a gitorious fork (actually found it while browsing gitorious yesterday...i don't know the author). but we don't depend on kde4.4 yet so we can't do much about it right now.

i'd recommend depending on kde4.4 from the release *after* 2.3 (which will be in ~3 weeks iirc?)
Comment 28 Aaron J. Seigo 2010-02-10 22:26:31 UTC
there is another option to requiring KDE SC 4.4 (which is certainly the most straightforward approach, but may keep the next amarok version out of the hands of some of your users):

i can (and will) move that library to kdebase-runtime which will solve this problem for people running older amaroks with KDE SC 4.4.1 or newer.

for 4.3.x and 4.4.0, it would be solvable by packagers moving that one library into their kdebase-runtime packages.
Comment 29 Leo Franchi 2010-02-10 23:07:30 UTC
just a note to say that we talked and have come up with a better solution that will go into amarok.
Comment 30 Leo Franchi 2010-02-11 00:15:20 UTC
commit d3cced97c3b007a651d88cfe86ffa19a85d52951
Author: Leo Franchi <lfranchi@kde.org>
Date:   Wed Feb 10 18:13:28 2010 -0500

    only show busy indicators, and animate, if plasma actually as an animator plugin. this is due to the fact that the animator plugin ships in kdebase-workspace rather than kdebase-runtime, which screws things up. it won't be fixed in kdebase itself as the whole plasma animator API was rewritten in 4.4 and the old API is deprecated now.
    
    BUG: 208102

diff --git a/src/context/Applet.cpp b/src/context/Applet.cpp
index 7d66bdd..0331007 100644
--- a/src/context/Applet.cpp
+++ b/src/context/Applet.cpp
@@ -32,6 +32,7 @@
 #include <QGraphicsScene>
 #include <QFontMetrics>
 #include <QPainter>
+#include <KServiceTypeTrader>
 
 namespace Context
 {
@@ -47,7 +48,11 @@ Context::Applet::Applet( QObject * parent, const QVariantList& args )
     , m_standardPadding( 6.0 )
     , m_textBackground( 0 )
 {
-    connect ( Plasma::Animator::self(), SIGNAL(customAnimationFinished ( int ) ), this, SLOT( animateEnd( int ) ) );
+    KService::List offers = KServiceTypeTrader::self()->query("Plasma/Animator", QString());
+    m_canAnimate = !offers.isEmpty();
+
+    if( m_canAnimate )
+        connect ( Plasma::Animator::self(), SIGNAL(customAnimationFinished ( int ) ), this, SLOT( animateEnd( int ) ) );
     setBackgroundHints(NoBackground);
 
     connect( The::paletteHandler(), SIGNAL( newPalette( const QPalette& ) ), SLOT(  paletteChanged( const QPalette &  ) ) );
@@ -239,6 +244,12 @@ Context::Applet::addAction( QAction *action, const int size )
 void
 Context::Applet::setCollapseOn()
 {
+
+    if( !m_canAnimate ) {
+        resize( size().width(), m_heightCollapseOn );
+        return;
+    }
+
     // We are asked to collapse, but the applet is already animating to collapse, do nothing
     if ( m_animationIdOn != 0 )
         return;
@@ -268,6 +279,11 @@ Context::Applet::setCollapseOff()
 {
     DEBUG_BLOCK
 
+    if( !m_canAnimate ) {
+        resize( size().width(), m_heightCollapseOff );
+        return;
+    }
+    
     // We are asked to extend, but the applet is already animating to extend, do nothing
     if ( m_animationIdOff != 0 )
         return;
@@ -360,4 +376,9 @@ Context::Applet::paletteChanged( const QPalette & palette )
     Q_UNUSED( palette )
 }
 
+bool Context::Applet::canAnimate()
+{
+    return m_canAnimate;
+}
+
 #include "Applet.moc"
diff --git a/src/context/Applet.h b/src/context/Applet.h
index a06db95..0b40229 100644
--- a/src/context/Applet.h
+++ b/src/context/Applet.h
@@ -86,7 +86,9 @@ class AMAROK_EXPORT Applet : public Plasma::Applet
 
     protected:
         Plasma::IconWidget* addAction( QAction *action, const int size = 16 );
+        bool canAnimate();
 
+        bool m_canAnimate;
         bool m_collapsed;
         int  m_heightCurrent;
         int  m_heightCollapseOn;
diff --git a/src/context/applets/lyrics/LyricsApplet.cpp b/src/context/applets/lyrics/LyricsApplet.cpp
index 7653588..3dc7833 100644
--- a/src/context/applets/lyrics/LyricsApplet.cpp
+++ b/src/context/applets/lyrics/LyricsApplet.cpp
@@ -243,7 +243,9 @@ void LyricsApplet::dataUpdated( const QString& name, const Plasma::DataEngine::D
     }
     else if( data.contains( "fetching" ) )
     {
-        setBusy( true );
+
+        if( canAnimate() )
+            setBusy( true );
 
         m_titleText = i18n( "Lyrics : Fetching ..." );
         m_lyrics->setPlainText( i18n( "Lyrics are being fetched." ) );
diff --git a/src/context/applets/photos/PhotosApplet.cpp b/src/context/applets/photos/PhotosApplet.cpp
index 6392184..1ff728a 100644
--- a/src/context/applets/photos/PhotosApplet.cpp
+++ b/src/context/applets/photos/PhotosApplet.cpp
@@ -207,7 +207,8 @@ PhotosApplet::dataUpdated( const QString& name, const Plasma::DataEngine::Data&
         setCollapseOff();
         m_widget->clear();
         m_widget->hide();
-        setBusy( true );
+        if( canAnimate() )
+            setBusy( true );
     }
     else if ( data.contains( "message" ) && data["message"].toString().contains("NA_Collapse") )
     {
diff --git a/src/context/applets/wikipedia/WikipediaApplet.cpp b/src/context/applets/wikipedia/WikipediaApplet.cpp
index ed8ec57..3235490 100644
--- a/src/context/applets/wikipedia/WikipediaApplet.cpp
+++ b/src/context/applets/wikipedia/WikipediaApplet.cpp
@@ -221,7 +221,8 @@ WikipediaApplet::dataUpdated( const QString& name, const Plasma::DataEngine::Dat
     if( data.contains("busy") )
     {
         m_webView->hide();
-        setBusy( true );
+        if( canAnimate() )
+            setBusy( true );
         return;
     }
     else
Comment 31 Leo Franchi 2010-02-13 02:34:10 UTC
commit d3cced97c3b007a651d88cfe86ffa19a85d52951
Author: Leo Franchi <lfranchi@kde.org>
Date:   Wed Feb 10 18:13:28 2010 -0500

    only show busy indicators, and animate, if plasma actually as an animator plugin. this is due to the fact that the animator plugin ships in kdebase-workspace rather than kdebase-runtime, which screws things up. it won't be fixed in kdebase itself as the whole plasma animator API was rewritten in 4.4 and the old API is deprecated now.
    
    BUG: 208102

diff --git a/src/context/Applet.cpp b/src/context/Applet.cpp
index 7d66bdd..0331007 100644
--- a/src/context/Applet.cpp
+++ b/src/context/Applet.cpp
@@ -32,6 +32,7 @@
 #include <QGraphicsScene>
 #include <QFontMetrics>
 #include <QPainter>
+#include <KServiceTypeTrader>
 
 namespace Context
 {
@@ -47,7 +48,11 @@ Context::Applet::Applet( QObject * parent, const QVariantList& args )
     , m_standardPadding( 6.0 )
     , m_textBackground( 0 )
 {
-    connect ( Plasma::Animator::self(), SIGNAL(customAnimationFinished ( int ) ), this, SLOT( animateEnd( int ) ) );
+    KService::List offers = KServiceTypeTrader::self()->query("Plasma/Animator", QString());
+    m_canAnimate = !offers.isEmpty();
+
+    if( m_canAnimate )
+        connect ( Plasma::Animator::self(), SIGNAL(customAnimationFinished ( int ) ), this, SLOT( animateEnd( int ) ) );
     setBackgroundHints(NoBackground);
 
     connect( The::paletteHandler(), SIGNAL( newPalette( const QPalette& ) ), SLOT(  paletteChanged( const QPalette &  ) ) );
@@ -239,6 +244,12 @@ Context::Applet::addAction( QAction *action, const int size )
 void
 Context::Applet::setCollapseOn()
 {
+
+    if( !m_canAnimate ) {
+        resize( size().width(), m_heightCollapseOn );
+        return;
+    }
+
     // We are asked to collapse, but the applet is already animating to collapse, do nothing
     if ( m_animationIdOn != 0 )
         return;
@@ -268,6 +279,11 @@ Context::Applet::setCollapseOff()
 {
     DEBUG_BLOCK
 
+    if( !m_canAnimate ) {
+        resize( size().width(), m_heightCollapseOff );
+        return;
+    }
+    
     // We are asked to extend, but the applet is already animating to extend, do nothing
     if ( m_animationIdOff != 0 )
         return;
@@ -360,4 +376,9 @@ Context::Applet::paletteChanged( const QPalette & palette )
     Q_UNUSED( palette )
 }
 
+bool Context::Applet::canAnimate()
+{
+    return m_canAnimate;
+}
+
 #include "Applet.moc"
diff --git a/src/context/Applet.h b/src/context/Applet.h
index a06db95..0b40229 100644
--- a/src/context/Applet.h
+++ b/src/context/Applet.h
@@ -86,7 +86,9 @@ class AMAROK_EXPORT Applet : public Plasma::Applet
 
     protected:
         Plasma::IconWidget* addAction( QAction *action, const int size = 16 );
+        bool canAnimate();
 
+        bool m_canAnimate;
         bool m_collapsed;
         int  m_heightCurrent;
         int  m_heightCollapseOn;
diff --git a/src/context/applets/lyrics/LyricsApplet.cpp b/src/context/applets/lyrics/LyricsApplet.cpp
index 7653588..3dc7833 100644
--- a/src/context/applets/lyrics/LyricsApplet.cpp
+++ b/src/context/applets/lyrics/LyricsApplet.cpp
@@ -243,7 +243,9 @@ void LyricsApplet::dataUpdated( const QString& name, const Plasma::DataEngine::D
     }
     else if( data.contains( "fetching" ) )
     {
-        setBusy( true );
+
+        if( canAnimate() )
+            setBusy( true );
 
         m_titleText = i18n( "Lyrics : Fetching ..." );
         m_lyrics->setPlainText( i18n( "Lyrics are being fetched." ) );
diff --git a/src/context/applets/photos/PhotosApplet.cpp b/src/context/applets/photos/PhotosApplet.cpp
index 6392184..1ff728a 100644
--- a/src/context/applets/photos/PhotosApplet.cpp
+++ b/src/context/applets/photos/PhotosApplet.cpp
@@ -207,7 +207,8 @@ PhotosApplet::dataUpdated( const QString& name, const Plasma::DataEngine::Data&
         setCollapseOff();
         m_widget->clear();
         m_widget->hide();
-        setBusy( true );
+        if( canAnimate() )
+            setBusy( true );
     }
     else if ( data.contains( "message" ) && data["message"].toString().contains("NA_Collapse") )
     {
diff --git a/src/context/applets/wikipedia/WikipediaApplet.cpp b/src/context/applets/wikipedia/WikipediaApplet.cpp
index ed8ec57..3235490 100644
--- a/src/context/applets/wikipedia/WikipediaApplet.cpp
+++ b/src/context/applets/wikipedia/WikipediaApplet.cpp
@@ -221,7 +221,8 @@ WikipediaApplet::dataUpdated( const QString& name, const Plasma::DataEngine::Dat
     if( data.contains("busy") )
     {
         m_webView->hide();
-        setBusy( true );
+        if( canAnimate() )
+            setBusy( true );
         return;
     }
     else