Clementine: Player randomly stuck in transition to next song

Created on 14 Feb 2015  路  18Comments  路  Source: clementine-player/Clementine

Running Linux, Clementine 1.2.3. This issue happens randomly, but quite frequently.

When a new track plays, sometimes the "progress bar" gets stuck at 0:01, and no sound is produced. I tried waiting for more than 20 minutes, and gave up. In this situation, if I press "pause", Clementine obeys. But if then I try to play the song again, by clicking the "play" button, Clementine refuses and the song remains paused. The only way out is to play another song (for example by clicking the "next" button), which starts immediately.

I found nothing particular in the debug output. The last entry is about the Moodbar, which says that the data has been successfully generated (that was the first time I played that song). This was printed a few instants after what was supposed to be the beginning of the next song.

So far, it seems that the issue only happens for a particular artist. I see no reason why, apart from the fact that the file name (and MP3 tags) contains accentuated characters. Note that playing one of these songs does not always trigger the problem, it still happens randomly.

Most helpful comment

Have you guys tried disabling ReplayGain. Disabling it solved the problem for me.

All 18 comments

Actually this is not an issue with accentuated characters. The problem just happened on a song without any such character, neither in the file name nor in the tags.

This is also not related to the Moodbar: I tried disabling the generation in the preferences, and the problem still occurs.

If this can be of any help: although I run Linux, my songs are located on an internal NTFS hard drive, so that they can be read from Windows as well.

I have exactly same problem on Windows with Clementine 1.2.3-978-g9dbd582. But it happens for a long time for me (at least 2 months). I am not using moodbar. Player just refuses to advance to next song. Sometimes after longer period of being stuck (couple of minutes) it begins playing next song by itself. Might be related to https://github.com/clementine-player/Clementine/issues/4613

Good to know this is not Linux related. Does this happen for any song, or could you spot a pattern? It seems from my side that this only happens for songs that have never been played before, but I'm not 100% sure.

I don't think that it's directly related to #4613, as I have a relatively small (only about 300 songs) music library and still see this myself.

I've noticed that on both Linux and Windows, it tends to happen more frequently when there are a lot of other things running. I've also found that, sometimes, if you stop playback, and then restart, it will still get stuck trying to play the next track, although other times this seems to fix the issue. I've also found that adjusting priorities (I usually run audio software at real-time priorities on Linux) doesn't seem to help at all, and that saving stats to the library makes it worse.

On Linux (and other unices), we might get better results if we do some magic with fadvise/readahead to tell the VFS layer to drop the cached data from the last track and preload the next track into cache. I'd actually been considering writing a patch to do this for some time now just cause it should improve performance, but hadn't had the time to even begin looking at the code.

I have certain AAC song that could reliably reproduce problem, but it also happens at random times with other songs that play OK for the second time.

I just installed debug version, here's log: http://pastebin.com/JLJyrTgS

Look around 07:40:28.894 mark. There's ~20 second delay between two actions of setting metadata. Also, there is moodbar cache loading message, even though moodbar is disabled in settings. If I delete moodbarcache folder it gets recreated, but it doesn't seem to influence delay we are talking about (see second log: http://pastebin.com/X5DBaxwU)

Happens to me every now and then (Win 7, 64bit). If I press stop and then start it plays normally.

So, I've done some further experimentation, and have noticed the following things:

  1. this happens more frequently for me with FLAC, OGG, and other xiph.org codecs than with mp3 files
  2. It appears to happen more frequently with compressed audio than uncompressed audio (I've been unable to reproduce it with au and aiff formats, although I did have it happen a couple of times when testing wav files)
  3. It seems to happen more frequently with higher bit-depths (more common for 24-bit audio than 16-bit), and higher sample rates (I couldn't get to happen with audio sampled at 22.05K, and it happened more frequently with 48k than 44.1k)
  4. It happens to me more frequently on my Windows (both 7 and 8.1) systems than my Linux systems.

I have used clementine on three different computers, and on my laptop with Linux everything is good, on my desktop with windows 7 its good, but on my laptop with windows 8.1 it happens every time I try to skip a track with the media buttons on the keyboard, and about half of the time when using the buttons on clementine. On all three computers I used moodbars. The remote also works like expected on both other computers, but on here whenever it gets stuck the remote just stops connecting. Then I tried reinstalling it to see if that would fix anything, but all that did is that my media buttons wont work at all. On all three devices I use smart playlist with 5 rules on dynamic mode

I have had this issue on Windows for a long time, too. About 4 months ago on Windows 8/8.1 and now on Windows 10. I've tried everything to fix it in the past such as random crossfade settings, full reinstalls, and using nightlies to no avail.

Like others have pointed out it seems more likely to happen when the system is under strain, but it can do it any time.

I had previously been using Clementine on Linux for about 4 months with no issues.

same problems here, environment is Kubuntu 16.04. with repo version 1.2.3.

Have you guys tried disabling ReplayGain. Disabling it solved the problem for me.

Same problem here. For an unknown reason, some tracks won't start playing, so the cursor stays stuck to the end of the previous track in the playlist. Same if the track is queued (Ctrl+D).

Thanks to @rickysarraf 's suggestion : In preferences I have disabled "use replaygain metadata if available" and replayed my "previous track" : Now it plays the next track at the end of the previous track.
Disabling replaygain makes also queued tracks working.
Disabling "compression to avoid clips" does not change anything when replaygain is enabled.
Changing pre-amp replaygain level has no effect either.

This is obviously an issue regarding playback with replaygain, combined to an unknown parameter that makes playback bugging. Maybe sample rate, filename, directory name, usupported characters or tags... I don't know. Does anybody can help ?

Edit (sept 10th) : The replaygain trick worked only for few random tracks from my collection. Unfortunately, the problem remains the same, for playlists and queued tracks, even if replaygain playback is disabled :-( . I don't know what to try next. Any idea ?

Clementine Version 1.3.1-228-gd9b3a93 package from Ubuntu 18.04 "Bionic Beaver" repositories, running on Linux 3.16.57-25 for arm64 (odroid C2).

Could be fixed by #6103 . Testing required.

Seems like #6103 fixed it for me.
I'm on linux with pulseaudio.

I haven't used Clementine in a while, but I will try to test this. However I can already say that, indeed, the songs which used to trigger this bug in my first message are indeed at 22k Hz sampling while the vast majority of my library is at 44k. So #6103 is likely going to fix it! Awesome.

I have this problem too, stops playing after every couple songs. all 320kbps mp3. all 44khz of course :)

I've got a similar problem. Playing song hangs a moment before the end.

Brief

Tools -> Preferences -> Audio output
Set Buffer duration option to 0 ms.

Details

I have a huge music collection. Songs had a different volume. I tried to fix it one day. One doomsday!
Using mp3gain I had marked all my songs with super-duper ID3v2 tags. Then troubles begin... I have tried Quit&Start Clementine, reinstall Clementine.

There are only two options, which helps me:

  1. Disable GainReplay option. It wasn't a solution for me, cause it was my goal!
  2. Set Buffer duration option to 0 ms.

The second one has helped me and make me happy with equal-loud songs in my playlist. I hope it will help you too. Also, I hope it will help to localize bug in the code.

Clementine version: Version 1.3.1
OS: Ubuntu 18.04.1 LTS 64-bit
GNOME: 3.28.2
uname -a: Linux <username> 4.15.0-43-generic #46-Ubuntu SMP Thu Dec 6 14:45:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
apt list clementine: clementine/bionic,now 1.3.1+git276-g3485bbe43+dfsg-1.1build1 amd64 [installed]

Ubuntu 18.10
Version 1.3.1-543-g6c159481e

I had the problem described, whether flac or mp3, or other, it was always the same song.

I used sr9000's set buffer duration to 0ms, worked for me on 1.3.1 (repository stable)

I compiled 1.3.1-543-g6c159481e, and the problem went away, I have replay gain, I have buffer set to 4000ms, everything just works.

I'm happy to provide more information if it's helpful. Long Live 1.3.2 (whenever it's cut.)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

darkMatterSound picture darkMatterSound  路  3Comments

MiguelTremblay picture MiguelTremblay  路  6Comments

Clementine-Issue-Importer picture Clementine-Issue-Importer  路  6Comments

Pulfer picture Pulfer  路  3Comments

andreas93j picture andreas93j  路  6Comments