Bug 250227 - Amarok stuck in bad state if music directory becomes inaccessible
Summary: Amarok stuck in bad state if music directory becomes inaccessible
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 2.3.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: 2.4.0
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-05 02:17 UTC by fermulator
Modified: 2011-05-25 08:57 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fermulator 2010-09-05 02:17:58 UTC
Version:           2.3.1 (using KDE 4.4.1) 
OS:                Linux

Consider the following setup:
 * Amarok 2.3.1
 * MusicDir = /mnt/myServer/Music

myServer is a file server, with a "Music" directory shared via Samba.  I have it mounted to /mnt/myServer/Music.  Amarok's library is pointing to this source for it's music collection.

If the music library becomes inaccessible, Amarok can't playback the music, so it tries indefinitely to skip to the next track.  Due to the playback mode, it continues to try, and try again.

PRIMARY PROBLEM: The user can't click the "stop" button!

Reproducible: Always

Steps to Reproduce:
 1) Open Amarok, Music library scanned, and loaded.  Amarok playback configured as "Repeat Playlist" (i.e. it loops through the playlist, and starts at the top again)
 2) Application functioning normally, play/stop/pause/next/previous, etc.
 3) Load up 10+ tracks into the playlist (i.e. 1 or several albums).
 4) Press the "Play" button
 5) It works.
 6) Now, do "sudo umount /mnt/myServer/Music".  This simulates a network outage, or the server going offline.

All of a sudden Amarok can't playback the music, so it tries indefinitely to skip to the next track.  Due to the playback mode, it continues to try, and try again.

PRIMARY PROBLEM: The user can't click the "stop" button!

Actual Results:  
Bad user experience.  Inability to tack back control of Amarok in the event that the music library becomes inaccessible.

Expected Results:  
Not sure the correct behaviour.

 A) For sure, the user should be able to click the stop button.

 B) Possibly, (as an optimization), Amarok should figure out if the music library is inaccessible and stop trying?  WARNING:  This change might be bad.  Consider a large playlist, with, say, an entire Artist directory missing.  If there were 1000 songs in that artists directory, we certainly should continue trying, because the next artist tracks are available for playback...
Comment 1 fermulator 2010-09-05 02:18:59 UTC
Also, another downside here, is if the user closes Amarok in the "inaccessible music directory state", and fixes the problem, then re-opens amarok, it has to rescan the collection! UGH.  (is this a different bug?)
Comment 2 Myriam Schweingruber 2010-09-05 02:34:18 UTC
That is indeed another bug: #171213

*** This bug has been marked as a duplicate of bug 231129 ***
Comment 3 fermulator 2010-09-05 20:17:32 UTC
I don't think this is a duplicate of bug 231129.  231129 talks about the counter for number of broken tracks before failing.

For this defect, I think we should address part A).  Part B) is discussed in 231129, but Part A) is not addressed.
Comment 4 Myriam Schweingruber 2011-05-07 11:31:21 UTC
Could you please upgrade to a newer Amarok version and test again? Current is Amarok 2.4.0, Amarok 2.4.1 is to be released tomorrow.

Please report back.
Comment 5 fermulator 2011-05-23 02:53:30 UTC
I upgraded to 2.4.0.

After attempting to reproduce this bug, I can confirm that it is now fixed with the latest version, 2.4.0.

Instead of repeating the playlist forever, the following message is displayed in the bottom right hand corner of the playlist:
"Too many errors encountered in playlist.  Playback stopped."

I then restored accessibility to the music store files, click "next track", and playback resumed without an issue.

Great work!