Solved Crash on next music track
#1
My XBMC crashes when listening to music and the next track in the playlist starts to play. When the current track has about 5 seconds left the next track in the playlist starts to play, when the first song ends XBMC crashes.

I do not have "Crossfade between songs" enabled, if you're wondering. The volume of the 2 tracks isn't changed either when switching track.

Debug log: http://pastebin.com/PDttpXeh
I'm running XBMC Frodo RC3
Reply
#2
Do you use PulseAudio? If so I think the issue has been reported in October 2012. Please see http://trac.xbmc.org/ticket/13387
Reply
#3
(2013-01-19, 04:54)kylex Wrote: Do you use PulseAudio? If so I think the issue has been reported in October 2012. Please see http://trac.xbmc.org/ticket/13387

I do use PulseAudio, and yes that ticket does describes exactly what I experience, only I don't use SMB or DLNA for my music. All my music files are local.

Just to be sure it wasn't a PulseAudio related configuration error I did a reinstall today, and that didn't change a thing.
Reply
#4
Yes, I have the same problem. Also on local files. I enabled PulseAudio to fix another issue only to realize it broke playing music.
Reply
#5
Hi
You can try in settings~music~playback switching crossfade between songs to 0 and uncheck crossfade between albums....
also its been a long time since I had the issue and Im not 100% sure this helped or fixed the issue, hell Im not even sure its the right package as Ive had to look through a bash history file a few 1000 lines long Smile but think this fixed the issue with crossfade on
Code:
sudo apt-get install libmad0


Reply
#6
(2013-01-20, 01:14)Wozza_au Wrote: Hi
You can try in settings~music~playback switching crossfade between songs to 0 and uncheck crossfade between albums....
also its been a long time since I had the issue and Im not 100% sure this helped or fixed the issue, hell Im not even sure its the right package as Ive had to look through a bash history file a few 1000 lines long Smile but think this fixed the issue with crossfade on
Code:
sudo apt-get install libmad0

Enabling crossfading does help! I've set it to 1 second (I can't go lower than that) and now XBMC doesn't crash anymore now. However something I forgot to mention that's maybe related to the issue is that audio seems to lag quite often. It only happens when I'm listening to music though, movies and tv shows work perfrectly. About every 15-30 seconds there's a small stutter that lasts like a millisecond. Also when the next track starts to play with crossfading enabled there's crackling noise that last for a second.

I unfortunatly already have libmad installed on my system Sad

-edit-

Using the crossfading enabled trick introduces another bug. When playing the next song in the playlist and stopping the track XBMC crashes.
Debug log: http://pastebin.com/q8BMBUHC
Reply
#7
Hi,
I had crossfade set to off. I can't choose 0, 1 is the lowest setting I can use. But now it seems to work Smile. I already had the lib installed. Thank you very much for the tip.
Reply
#8
Hi there,

I too had this issue with music playlists making XBMC crash. Within roughly 3-5 seconds of changing to the next song it crashed XBMC.
I already had libmad0 installed also. I did, however, have cross-fading disabled (don't like it) - enabling cross-fading and setting to 1 fixes the crash.

Arch 64bit
XBMC 12.0 Frodo (GIT:unknown 29 Jan 2013)
Aeon MQ3 - 2.0.1
NFS4 library
MP3
Pulseaudio
XBMC 11.0-BETA3
NON-PVR
AEON MQ3 - version 1.2.3
Reply
#9
(2013-01-20, 02:30)Quaith Wrote: Enabling crossfading does help! I've set it to 1 second (I can't go lower than that) and now XBMC doesn't crash anymore now. However something I forgot to mention that's maybe related to the issue is that audio seems to lag quite often. It only happens when I'm listening to music though, movies and tv shows work perfrectly. About every 15-30 seconds there's a small stutter that lasts like a millisecond. Also when the next track starts to play with crossfading enabled there's crackling noise that last for a second.

I unfortunatly already have libmad installed on my system Sad

got the exact same issue with stuttering on my ION system running frodo on ubuntu 10.04
also noticed that CPU load it pretty high on mp3 playback, even with visualisation turned off, had no issues with eden
Reply
#10
I have the same issue and reported all the information in an already opened ticket : http://trac.xbmc.org/ticket/13845
I also linked this forum thread in my comment. Hope this help !
Reply
#11
(2013-02-07, 23:21)spiroid Wrote: I have the same issue and reported all the information in an already opened ticket : http://trac.xbmc.org/ticket/13845
I also linked this forum thread in my comment. Hope this help !

Thanks! I was starting to think that it somehow was maybe related to just a combination of my OS and pulseaudio, but it seems like people running Ubuntu and Debian using an older version of pulseaudio are having this issue as well. I'm really hoping that this doesn't get on the to-do list for v13.. I really miss not being able to play music through xbmc!
Reply
#12
Thanks for the reports and this thread.

Attached are two one different ways of fixing this issue in a wrong way. Problem is that a helper thread wants to enter the mainloop which is not okay, because the resume is called from "outside" this is not allowed to call the resume directly.

First is, ignore the resume before something goes wrong:
Code:
diff --git a/xbmc/cores/AudioEngine/Engines/PulseAE/PulseAEStream.cpp b/xbmc/cores/AudioEngine/Engines/PulseAE/PulseAEStream.cpp
index d261217..4df7d04 100644
--- a/xbmc/cores/AudioEngine/Engines/PulseAE/PulseAEStream.cpp
+++ b/xbmc/cores/AudioEngine/Engines/PulseAE/PulseAEStream.cpp
@@ -372,6 +372,9 @@ void CPulseAEStream::Pause()
This patch was bullshit - fixed correctly in master :-)

The second one is even more dump to stop the player from stopping itself when starting up, so I won't post it.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#13
(2013-02-10, 00:49)fritsch Wrote: Thanks for the reports and this thread.

Attached are two one different ways of fixing this issue in a wrong way. Problem is that a helper thread wants to enter the mainloop which is not okay, because the resume is called from "outside" this is not allowed to call the resume directly.

First is, ignore the resume before something goes wrong:
Code:
diff --git a/xbmc/cores/AudioEngine/Engines/PulseAE/PulseAEStream.cpp b/xbmc/cores/AudioEngine/Engines/PulseAE/PulseAEStream.cpp
index d261217..4df7d04 100644
--- a/xbmc/cores/AudioEngine/Engines/PulseAE/PulseAEStream.cpp
+++ b/xbmc/cores/AudioEngine/Engines/PulseAE/PulseAEStream.cpp
@@ -372,6 +372,9 @@ void CPulseAEStream::Pause()

void CPulseAEStream::Resume()
{
+  if(!m_pause)
+    return;
+
   if (m_Initialized)
     m_Paused = Cork(false);
}

The second one is even more dump to stop the player from stopping itself when starting up, so I won't post it.

Compiled the latest git version with your patch, unfortunatly doesn't work. XBMC still crashes when changing tracks and it already starts the next song a few seconds before the current song ends. Crossfading is disabled when testing this.

Output from terminal when xbmc crashes:

Code:
no talloc stackframe around, leaking memory
Assertion '!m->thread || !pa_thread_is_running(m->thread) || !in_worker(m)' failed at pulse/thread-mainloop.c:169, function pa_threaded_mainloop_lock(). Aborting.
/usr/bin/xbmc: regel 137:  5000 Afgebroken              (geheugendump gemaakt) "$LIBDIR/xbmc/xbmc.bin" $SAVED_ARGS
Crash report available at /home/tijs/xbmc_crashlog-20130210_015240.log

Crashlog: http://pastebin.com/kBKZXwBW
Reply
#14
Thank you Fritsch for your commit on the xbmc git, my xbmc doesn't crash anymore! Smile
It still ignores the cross-fading setting though, but I can live with that as long as it's not crashing.
Reply
#15
@Quaith. It does a little bit of crossfading right? though have disabled it?

Try to set the audiophile mode in advancedsettings.xml that will probably stop it from doing so.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply

Logout Mark Read Team Forum Stats Members Help
Crash on next music track1