Bug 231129 - Stops playing after too many errors are encountered
Summary: Stops playing after too many errors are encountered
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Playback (show other bugs)
Version: 2.3.1-GIT
Platform: unspecified Linux
: VHI major
Target Milestone: 2.4.0
Assignee: Martin Sandsmark
URL:
Keywords:
: 231564 233433 233826 234617 235485 250185 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-03-17 18:25 UTC by Matthias Fuchs
Modified: 2010-11-29 17:30 UTC (History)
18 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.4


Attachments
Debug log (200.41 KB, application/octet-stream)
2010-03-17 18:26 UTC, Matthias Fuchs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Fuchs 2010-03-17 18:25:51 UTC
Version:            (using KDE 4.4.1)
OS:                Linux
Installed from:    Archlinux Packages

When a track finishes playing in Amarok it chooses the next track though it does not play it. So basically I have to press play once every track finishes.
Comment 1 Matthias Fuchs 2010-03-17 18:26:27 UTC
Created attachment 41718 [details]
Debug log
Comment 2 Myriam Schweingruber 2010-03-17 20:17:41 UTC
And which exact Amarok version are you talking about?
Comment 3 Matthias Fuchs 2010-03-17 23:53:23 UTC
2.3.0, I thought I had set that in the target information, seems to not have taken it.
Comment 4 Matthias Fuchs 2010-03-17 23:54:03 UTC
Forgot to reopen it.
Comment 5 Sven Krohlas 2010-03-18 00:22:04 UTC
I've also seen that. If I mount a device after Amarok has been started, then play files from it Amarok stops after each track.

Do you also have a setup like this?
Comment 6 Matthias Fuchs 2010-03-18 11:45:42 UTC
No, here in my setup the music I tried it with is in my home-dir and I also have some somafm streams in my playlist.

But if that matters I also often mount some hds during working on my PC, but I'm not playing music from them.
Comment 7 Sven Krohlas 2010-03-18 11:57:50 UTC
Which Phonon engine? GStreamer? Xine? Try the other one and check if you can still reproduce it.
Comment 8 Matthias Fuchs 2010-03-18 12:03:53 UTC
Yes that did the trick. Had mplayer backend activated -- don't even know why. Works now with the Xine backend.
Comment 9 Sven Krohlas 2010-03-21 18:40:35 UTC
*** Bug 231564 has been marked as a duplicate of this bug. ***
Comment 10 Sven Krohlas 2010-03-21 18:42:55 UTC
This happens with all kinds of backends, could even be a Phonon bug maybe. Afaik the Phonon-VLC prople are also looking into this.

For me it always happens once I mount my crypto disc.
Comment 11 Sven Krohlas 2010-04-09 13:48:13 UTC
*** Bug 233433 has been marked as a duplicate of this bug. ***
Comment 12 Sven Krohlas 2010-04-09 14:32:56 UTC
*** Bug 233826 has been marked as a duplicate of this bug. ***
Comment 13 Silver Salonen 2010-04-09 14:41:45 UTC
I have only Xine engine in Phonon and it happened with it too.
Comment 14 Sven Krohlas 2010-04-20 23:38:17 UTC
*** Bug 234617 has been marked as a duplicate of this bug. ***
Comment 15 Sven Krohlas 2010-04-27 08:43:59 UTC
*** Bug 235485 has been marked as a duplicate of this bug. ***
Comment 16 Dennis Schridde 2010-05-14 19:22:33 UTC
Experiencing the same issue. Had my external HD not mounted when starting Amarok, but files from it in the playlist. The first try to play thus resulted in Amarok running through the playlist like there was no tomorrow, without ever stoping (I have playlist-repeat enabled) or a way to stop it (stop button was disabled). Then I mounted the HD, Amarok finally get its sense back, but now it will stop playing after every song without any apparent reason. It even announces the next song via OSD.
Comment 17 Dennis Schridde 2010-05-14 19:27:16 UTC
P.S. I just restarted Amarok. Now my playlist is empty except for one track which is not on the external HD.

Commenting on the situation in my previous post: The tracks from my external HD were gone from the collection (with only the few in my home dir remaining). Could there be a link between the playlist and the collection for songs that were inserted into the playlist from the collection? Maybe Amarok is choking on that...
Or did it maybe remember that it could not play the track before, and thus got some hickups / automatic removal from playlist?
Comment 18 langstr 2010-05-15 15:26:19 UTC
Triagers: I suspect this bug has more to do with Collection and EngineController than with Playlist (which it's currently filed under).

I suggest CC'ing/emailing the maintainers of those components.
Comment 19 Dennis Schridde 2010-05-15 16:03:35 UTC
An excerpt from ~/.xsession-errors at the time of track-(not)-change:
---
HTTP POST:  QUrl( "http://post2.audioscrobbler.com:80/protocol_1.2" )  "LAST PLAYED SONG" 
HTTP POST:  QUrl( "http://post.audioscrobbler.com:80/np_1.2" )  "NEXT SONG TO BE PLAYED" 
QWidget::setMinimumSize: (/QWidget) Negative sizes (-24,-51) are not possible
QWidget::setMaximumSize: (/QWidget) Negative sizes (-24,-51) are not possible
"OK" 
"OK" 
---

"LAST PLAYED SONG" is the song that just finished playing.
"NEXT SONG TO BE PLAYED" is the song that should be played next, which is announced via OSD, and which is apparently even announced via AudioScrobbler, but which is never actually played.
Comment 20 Dennis Schridde 2010-05-15 16:09:58 UTC
For me it is perfectly reproducible:
1. Unmount external HD with music on it
2. Start Amarok
3. Notice that the playlist is still filled with the contents from the last time Amarok was run, but that the collection now includes much less tracks (most of them are on the unmounted HD)
4. Press play
5. Notice that Amarok stops playing after each track, while still announcing the next
6. Restart Amarok
7. Notice that the playlist is now entirely empty (all tracks which are on the unmounted HD are gone)
8. Mount the HD again
9. Recreate the entire collection, because Amarok will not notice that we just mounted something into a directory that is part of the collection
10. Back to normal. Plays at usual, playlist is preserved over restarts, collection contains all items, ...
Comment 21 Carlos sanchiavedraz 2010-07-21 14:52:00 UTC
I experience the same issue.
Just to add my two cents, in my case it has nothing to do with external devices, just playing local music.

And It just happens on a per session basis, not always. When it happens you can close Amarok and start it again, then it's ok.
Comment 22 Silver Salonen 2010-07-21 14:58:00 UTC
Lately I've experienced this with files that have been deleted (result is the same as unmounting external drive, isn't it?):
1) I've added some files to playlist
2) deleted them from hard disk
3) once playlist progresses to these files, Amarok will stop before playing the file
4) after I've removed these files from playlist, Amarok's behavior continues until its restart
Comment 23 Daniel Buus 2010-08-20 11:58:28 UTC
This happens on and off for me, and has for the last year or two.

I'm on 2.3.0, and it just happened. The events leading up to it were these:

I search for Slayer in my collection, found the album I wanted to listen to, and chose "Replace Playlist". I had forgotten that I had wiped that folder previously, so all items showed up as "0:00" in length on the playlist, and Amarok ran through them one after one until saying the thing about "too many errors on playlist" or whatever.

I then started an "Update Collection" run, and looked in Dolphin for something else to listen to while Amarok would be updating.

Chose Impeach My Bush by Peaches, and drag-n-dropped the MP3s to the playlist window in Amarok.

Started playing, and Amarok would stop after each track. Restarting Amarok made things return to normal.

Actually just tried doing it on purpose and same thing happens, so here are steps to reproduce:

1) Move a folder from your library somewhere else on disk outside of Amarok.
2) Find the folder in the library in Amarok, right-click and choose "Replace Playlist" (may not be necessary to do it exactly like this, but that's what I did)
3) Start playback (I double-clicked the first song). Amarok will go through each track and fail with the "too many errors" message at the bottom.
4) Find something else in your library and do "Replace Playlist" (again, this might not be the necessary action, but that's what I did).
5) Start playing. Playback will stop after each song.

HTH :)
Comment 24 Myriam Schweingruber 2010-08-20 15:00:35 UTC
Daniel, thanks for the feedback, but the current version this bug is about is ahead of yours, Please only comment if you use the same or a later version (see the version in the header).
Comment 25 Daniel Buus 2010-08-29 12:12:29 UTC
Well, though I realize I'm using an older version, it's apparently the same bug (which has existed for much longer than any of these versions), so either way, wouldn't you agree that steps to reproduce it would be useful input?

Cheers, 
Daniel
Comment 26 Myriam Schweingruber 2010-08-29 12:35:59 UTC
Playback is handled by phonon, reassigning. Now would you all be so kind and provide your phonon backend settings? Please also specify which exact Phonon version you are using or give the KDE version. It would be equally nice if you could test with KDE 4.5.0 which uses the latest stable Phonon version.

If you use the Xine backend this is a duplicate of bug 227307
Comment 27 Mark Kretschmann 2010-08-29 14:22:14 UTC
I think this might be an Amarok bug. That's because:

We have some code in Amarok that prevents it from going into an endless loop when playing too many broken/non-existing tracks. So we have a counter, and it will stop after XY broken tracks. This counter should get reset after the next successful play... but maybe there is a bug involved.

I'll take a look.
Comment 28 Mark Kretschmann 2010-08-29 15:13:43 UTC
My initial suspicion was wrong (it's not that part of the code), but I still think it could be a bug in Amarok (maybe in EngineController).
Comment 29 Mark Kretschmann 2010-09-04 19:05:20 UTC
*** Bug 250185 has been marked as a duplicate of this bug. ***
Comment 30 Myriam Schweingruber 2010-09-05 02:34:18 UTC
*** Bug 250227 has been marked as a duplicate of this bug. ***
Comment 31 Frederik Schwarzer 2010-10-01 17:07:30 UTC
I encounter the same issue, My steps to reproduce are as follows:

A) 1) put some files in the playlist.
   2) remove one of the tracks from hard disk
   3) play the playlist
Amarok stops after the track that is removed and after that it stops after every track. Restarting Amarok solves it.

B) 1) put some files and a stream in the playlist
   2) play the playlist and disconnect your network connection before
      it reaches the stream
Amarok skips the stream but then stops after each of the following tracks. Restarting Amarok solves it here as well.
Comment 32 Cameron 2010-10-16 05:50:45 UTC
Kinda new to Ubuntu. Using Amarok 4.5.1 on Ubuntu 10.10 and it's pretty much unuseable- it won't play a single thing, and i'm using files from the same HD as the OS. Am I just plain doing it wrong?
Comment 33 Myriam Schweingruber 2010-10-16 12:10:52 UTC
Cameron, this is not a support forum, please address your questions to either http://forum.kde.org/amarok or ask in #amarok or #kubuntu on irc.freenode.net. Your problems are most likely missing codecs.
Also, the Amarok version can't be 4.5.1, that is the KDE version. I guess you use version 2.3.1. Make sure you have the kubuntu-restricted-extras package installed.
Comment 34 Vovochka 2010-10-28 00:40:19 UTC
Kde 4.5.2
phonon 4.4.2
beckend xine
amarok 2.3.2

Bug still reproducible. As soon as amarok looses an input source it will stop playback after each song.

As it was sad, it's not necessary to be a local file. It could be a radio stream, last.fm or what ever.

For example if would listen to last.fm and will loose inet connection, after i'll add local files, amarok will stop playback after each track.
Comment 35 Sergey Ivanov 2010-11-29 17:18:17 UTC
commit 2320c43fc8d19735938afdcc7aabcff6d5751108
branch master
Author: Sergey Ivanov <123kash@gmail.com>
Date:   Mon Nov 29 19:17:22 2010 +0300

    Fix issue when amarok begins to stops after each track, after playback error (removed file, network disconnect, etc.).
    BUG: 231129

diff --git a/src/EngineController.cpp b/src/EngineController.cpp
index 08a787b..8a7f480 100644
--- a/src/EngineController.cpp
+++ b/src/EngineController.cpp
@@ -1145,19 +1145,22 @@ EngineController::slotStateChanged( Phonon::State newState, Phonon::State oldSta
         emit trackError( m_currentTrack );
 
         warning() << "Phonon failed to play this URL. Error: " << m_media.data()->errorString();
+        warning() << "Forcing phonon engine reinitialization.";
+
+        /* In case of error Phonon MediaObject automaticaly switches to KioMediaSource,
+           which cause problems: runs StopAfterCurrentTrack mode, force PlayPause button to
+           reply the track (can't be paused). So we should reinitiate Phonon after each Error.
+        */
+        initializePhonon();
 
         errorCount++;
         if ( errorCount >= maxErrors )
         {
             Amarok::Components::logger()->longMessage( i18n( "Too many errors encountered in playlist. Playback stopped." ), Amarok::Logger::Warning );
             error() << "Stopping playlist.";
-            stop();
-            // don't request a new track
         }
         else
         {
-            // stopping apparently is needed to reset the error.
-            m_media.data()->stop();
             // and start the next song
             slotAboutToFinish();
         }