Amarok loops through all songs when the sound device isn't available

Bug #85791 reported by Bogdan Butnaru
22
Affects Status Importance Assigned to Milestone
amarok (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: amarok

When Amarok tries to play a song but the sound device is unavailable (another program is using it) Amarok will try to loop through all the tracks in the playlist, becoming very irresponsive.

Each time a track starts playing Amarok hogs the processor -- I assume it starts building the 'track info' panel and even decoding the file before it notices the sound doesn't work. So it moves to the next file and again hogs the processor.

Amarok should stop trying to play things automatically when it detects the same error consecutively for a few times, until it receives user direction.

Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

This is probably the same issue as Bug #45814, but in his case it was the codec that was missing, so presumably the system was still responsive.

Revision history for this message
Sarah Kowalik (hobbsee-deactivatedaccount) wrote :

which version of amarok is this?

Changed in amarok:
status: Unconfirmed → Needs Info
Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

Dammit, I _always_ forget to say things like that.

It just happened with 1.4.5, but it had this behavior for as long as I've been using it, i.e. at least five months. I'm using Feisty, but it did the same on Edgy, too.

Revision history for this message
Daniel T Chen (crimsun) wrote :

This bug report is vague regarding "some problems with pulseaudio, which means that occasionally the sound hardware goes down".

That sentence contains two /separate/ issues. Please provide links to the aforementioned bugs you've filed.

Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

Well, the pulseaudio issue is not relevant for the Amarok problems. The Amarok bug manifests itself whenever the sound hardware becomes unavailable, no matter why.

In this case it was triggered by a pulseaudio problem, but that's not relevant. It's Amarok's behavior that blocks the computer.

(If you just want to simulate the bug, I _think_ you can install pulseaudio, configure it to intercept alsa, and kill the pulseaudio daemon while Amarok is playing. This should cause the same effect. In my case the bug was caused by Flash 9 hogging the audio server, but really that's another issue. I have a support question up about it.)

description: updated
Revision history for this message
Siegfried Gevatter (rainct) wrote : Re: Amarok loops through all songs when the sound device isn't unavailable

I can confirm this issue.

Since I switched from `libsdl1.2debian-alsa' to `libsdl1.2debian-oss', if Amarok starts playing when another program is using sound, it will loop through all sounds until I manage to stop it. If I click on the icon to make it's window visible, it displays a little warning bubble (left-bottom) saying that the sound device is unavailable for each track.

Ubuntu Feisty (7.04)
Amarok: 1.4.7 (Qt: 3.3.7, KDE: 3.5.6)
Sound Engine: xine (connector: auto-detect)

I'm updating to Gutsy right now and will confirm if this issue is also still there.

Changed in amarok:
importance: Undecided → Medium
status: Incomplete → Confirmed
Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

It happens to me in Gutsy, too. It also happens if the sound device becomes unavailable (eg, using PulseAudio when the network fails).

It also happens when the _files_ become unavailable (eg, the remote drive can't be accessed through the network anymore): Amarok cycles through the entire playlist, which can take a lot of time (at full processor usage) on big or "smart" playlists.

Revision history for this message
cwgannon (cwgannon) wrote :

Yep, I'm having the same problem (though I doubt more confirmation is needed). Is there *any* fix at all?

Revision history for this message
wolfwitch (wolf-mylunarden) wrote :

I just wanted to chime-in on this as it has been a persistent problem with Amarok (and I don't necessarily believe it is a Ubuntu problem).

Amarok seems to want to completely take over the OSS (sound server), and won't play nice with any other apps that want to use sound. You may have also noticed that you can't use any other applications that produce sound while Amarok is running (movies, flash, mp3 streams), and system sounds don't work either.

And, has has already been stated- if anything does manage to grab OSS's attention while Amarok is running- it will simply loop through the playlist or, in some cases, just lock up.

I haven't found any fixes or solutions, nor have I found a music player I like better than Amarok.

Revision history for this message
Ryan Sinn (ryan-sinn) wrote :

I'm seeing this as well -- when the xine engine isn't available it starts to grind through the whole collection (when you're on Random Playlist)

Does anybody know if this affects the automatic rating / score that Amarok assigns to a song based on the time you listen to it?

Revision history for this message
AndyOsi (andres-osinski) wrote :

Confirmed for myself ever since I've used Amarok. Honestly it is a fairly serious issue. I have a soundcard whose driver detection is flaky, so the audio device does not always work, and when it fails, it takes Amarok down with it. It got to the point where I'm actually running foobar2000 on Wine to work around this.

Revision history for this message
Myriam Schweingruber (myriam) wrote :

If the sound card has a flaky driver detection, it's more likely a problem with your sound card than a software issue, I wouldn't blame Amarok for that. It looks more like a sound backend issue IMHO.
Anyhow, Amarok 1.4 is not maintained anymore upstream and Amarok 2 is currently in beta2 (available in the current Intrepid). As Amarok 2 uses Phonon, this is unlikely to happen anymore.

Revision history for this message
Myriam Schweingruber (myriam) wrote :

this bug should be closed, as there is no way this will ever get fixed upstream, Amarok 1.4.x being not maintained anymore.

Revision history for this message
Harald Sitter (apachelogger) wrote :

We still support 1.4(.10) until April 2010.

Revision history for this message
AndyOsi (andres-osinski) wrote : Re: [Bug 85791] Re: Amarok loops through all songs when the sound device isn't available

Myriam,
      While it is the soundcard's issue that it is not detected, the point
is that when it doesn't get detected, Amarok tries to access an ALSA sink
that does not exist. The proper behavior for that should be for it to detect
that and stop playing completely without cycling. The case for my sound card
is specific to myself, but you could easily recreate by inputting garbage in
the sound device section of the config for outputting to ALSA.
      At any rate, if there is no more support, so be it, I can live with
Quod Libet and foobar.

On Wed, Oct 8, 2008 at 12:53 PM, Harald Sitter <email address hidden>wrote:

> We still support 1.4(.10) until April 2010.
>
> --
> Amarok loops through all songs when the sound device isn't available
> https://bugs.launchpad.net/bugs/85791
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Andrew Ash (ash211) wrote :

It's been quite some time since this bug was reported and last commented on, so I'd like to solicit feedback to whether this bug still exists in the Amarok 2.x series. It has been observed as far back as Amarok 1.2.3 in Apr 2005 [1], but that bug was closed due to being against the 1.4 series. If we can confirm the issue still in Amarok 2, we can reopen that bug. I searched currently open bugs in Amarok's bugtracker for this one, but couldn't find it in bugs.kde.org [2].

For those picking up midway, the bug described here is _not_ that sound doesn't play out of Amarok -- that's often a Pulseaudio or other sound system error. This bug deals with the way Amarok handles a sound system that can't play anything -- typically because a sound device is unavailable. In those instances, Amarok will fail on the current track and advance to the next one, which then fails, so it advances again, etc. When this happens on dynamic playlists in particular (essentially of infinite length), it hogs CPU and makes Amarok unresponsive.

How does this bug now stand in relation to Amarok 2?

[1] https://bugs.kde.org/show_bug.cgi?id=103289
[2] https://bugs.kde.org/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&product=amarok&content=loop+through+sound+device

Revision history for this message
Myriam Schweingruber (myriam) wrote :

Comparing Amarok 2 to Amarok 1.4.x is not a good idea, as those version do not work the same way at all, remember, Amarok 2 is a complete re-write.. Since version 2.x, Amarok doesn't handle sound itself at all, but lets phonon do the work. So if a sound device is not available, Amarok can do strictly nothing about it. Reassign this to phonon maybe?

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Amarok does stop after too many playlist errors, so I'd consider this fixed.

Changed in amarok (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.