Bug 357229 - amarok: skips track, jumps to middle of next track, when switching to next song in playlist
Summary: amarok: skips track, jumps to middle of next track, when switching to next so...
Status: REPORTED
Alias: None
Product: Phonon
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 4.8.3
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Harald Sitter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-27 19:25 UTC by missive
Modified: 2021-03-09 22:36 UTC (History)
3 users (show)

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


Attachments
Output of amarok --debug-audio 2>&1 (14.26 KB, text/plain)
2016-01-17 21:12 UTC, Florian Lindner
Details
amarok --debug --debug-audio (379.45 KB, text/x-log)
2016-01-19 19:30 UTC, Florian Lindner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description missive 2015-12-27 19:25:56 UTC
Sometimes (~half the time) when going to the next song in the playlist, Amarok will skip a song and jump at least partway (20% - 60%) through the next song.

I just upgraded to Ubuntu 15.10 and this just started happening.

I am using a dynamic playlist to generate the songs to play, but I tried shutting off dynamic list and that did not change anything.

Just now it skipped 2 entire songs, starting at the beginning of the 3rd following song in the list.



Reproducible: Sometimes

Steps to Reproduce:
1. set up playlist of songs
2. play


Actual Results:  
sometimes skips songs in the list (perhaps starting to play them for an instant, but then skipping on to the next song, sometimes skipping again, sometimes jumping in to the middle of a song.)

Expected Results:  
play songs in list in order, not skipping
always play from the start of the song
Comment 1 Myriam Schweingruber 2015-12-28 03:01:02 UTC
Which exact phonon backend do you have? try switching the phonon backend (there should be gstreamer and vlc backends) and see if it happens with both (You need to restart Plasma to make the backend change effective)
Comment 2 Florian Lindner 2016-01-09 19:36:54 UTC
I can confirm that behaviour and I have experienced with GStreamer as well as VLC backend.

amarok -d gives that error message:

amarok: BEGIN: void EngineController::seekTo(int) 
amarok:   [EngineController] seek to:  171000 
amarok:   BEGIN: virtual void Phonon::VLC::MediaObject::seek(qint64) 
amarok:     seeking 171000 msec 
amarok:   END__: virtual void Phonon::VLC::MediaObject::seek(qint64) [Took: 0s] 
amarok: END__: void EngineController::seekTo(int) [Took: 0s] 
amarok: BEGIN: void Phonon::VLC::MediaObject::changeState(Phonon::State) 
amarok:    Phonon::PlayingState  -->  Phonon::BufferingState  
amarok: END__: void Phonon::VLC::MediaObject::changeState(Phonon::State) [Took: 0s] 
[00007f02bcc05e38] mpgatofixed32 audio converter error: libmad error: bad main_data_begin pointer
amarok: BEGIN: void EngineController::slotAboutToFinish() 
amarok:   BEGIN: void Playlist::Actions::requestNextTrack() 
amarok:     BEGIN: void Playlist::Actions::play(quint64, bool) 
amarok:       BEGIN: void EngineController::setNextTrack(Meta::TrackPtr) 
amarok:       END__: void EngineController::setNextTrack(Meta::TrackPtr) [Took: 0s] 
amarok:     END__: void Playlist::Actions::play(quint64, bool) [Took: 0s] 
amarok:   END__: void Playlist::Actions::requestNextTrack() [Took: 0s] 
amarok: END__: void EngineController::slotAboutToFinish() [Took: 0s] 

This happens while using the VLC backend, but GStreamer backends gives the same error message

Amarok is 2.8.0 / KDE 4.14.15, but KDE Frameworks 5 
libmad is 0.15.1b
Comment 3 Myriam Schweingruber 2016-01-11 15:17:00 UTC
Florian: apparently you have some faulty tracks, as the error message suggests: 

audio converter error: libmad error: bad main_data_begin pointer

Just to narrow this down:
what type of tracks are we talking about?

You both use Plasma 5 apparently, did this happen with KDE4 before or is this a new behavior with Plasma 5?

Since I can't reproduce this here at all with KDE4, I strongly suspect this to be a new problem caused by either phonon or libmad. 
Just to make this clear: libmad (the MPEG audio converter) is not an Amarok dependency at all, but might be for Phonon or the backends.
Comment 4 Florian Lindner 2016-01-11 15:25:54 UTC
The problem is not reproducible. A track that is skipped plays fine the next time, therefore I doubt that it stems from a faulty track.

I do not remember having it before Plasma 5, but also don't think it came with Plasma 5, either. I think it has happened with mp3 tracks only.

I concur that this is not a Amarok bug, but lies in the deeper layers of the audio stack.
Comment 5 Myriam Schweingruber 2016-01-11 17:26:14 UTC
Well, then there is really very little we can do about, pushing it to Phonon, they might know what causes the problem.
Comment 6 Harald Sitter 2016-01-12 09:51:12 UTC
Please get a debug output from phonon about this.

https://techbase.kde.org/Development/Tutorials/Debugging/Phonon#Environment_Variables

You can also start amarok with `amarok --debug-audio` that will toggle on all phonon debugging.
Comment 7 Florian Lindner 2016-01-17 21:12:46 UTC
Created attachment 96703 [details]
Output of amarok --debug-audio 2>&1

I have listened to a couple of songs until Amarok skipped one song. After playing 5 seconds of the next song I stopped and quit Amarok.
Comment 8 Florian Lindner 2016-01-17 21:16:13 UTC
I have listened to a couple of songs until Amarok skipped one song. After playing 5 seconds of the next song I stopped and quit Amarok.

Backend is

gstreamer 1.6.2-1
gstreamer0.10 0.10.36-4

Whatever KDE uses for backend.
Comment 9 Florian Lindner 2016-01-19 19:30:56 UTC
Created attachment 96740 [details]
amarok --debug --debug-audio
Comment 10 Florian Lindner 2016-01-19 19:31:54 UTC
I have produced another log with using amarok --debug --debug-audio.

This times it hasn't just skipped the track but jumped at the middle instead of starting from beginning.
Comment 11 Myriam Schweingruber 2016-01-20 12:07:33 UTC
(In reply to Florian Lindner from comment #10)
> I have produced another log with using amarok --debug --debug-audio.
> 
> This times it hasn't just skipped the track but jumped at the middle instead
> of starting from beginning.

Thanks for the output, but it would be nice if you could reduce that to the 50 or so lines when the problem happens (or at least tell me which track is skipped so I can find that)
Comment 12 Florian Lindner 2016-01-20 21:39:27 UTC
As I said, I quit Amarok after the error occured. So look for the last song.
Comment 13 Myriam Schweingruber 2016-01-20 23:26:02 UTC
(In reply to Florian Lindner from comment #12)
> As I said, I quit Amarok after the error occured. So look for the last song.

right, there are several dozens of lines when you quit amarok, this will take some time... 
Do you remember what type of track it was, mp3 or FLAC? There have been problems with file type transitions in the past, more information would really be helpful...
Comment 14 Florian Lindner 2016-01-21 07:42:29 UTC
It was all FLAC and the artist name (also contained in the filename) was Downset.

Downset - 11 - Sangre De Mis Manos was played successfully, the next track, Downset - 12 - Horrifying started from the middle.
Comment 15 Myriam Schweingruber 2016-01-21 10:01:58 UTC
(In reply to Florian Lindner from comment #14)
> It was all FLAC and the artist name (also contained in the filename) was
> Downset.
> 
> Downset - 11 - Sangre De Mis Manos was played successfully, the next track,
> Downset - 12 - Horrifying started from the middle.

Thank you for the information.
Comment 16 Justin Zobel 2021-03-09 22:36:54 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.