You are not logged in.

#1 2011-11-08 17:35:32

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

XBMC Crashes A Lot

Before I filed a bug report over there I just wanted to get some input from the community in case it's an Arch related problem. XBMC seems to crash whenever I try to play a movie/TV show that doesn't seem to be supported by their codecs or something. It happens mostly with the PseudoTV plugin but will happen when I choose a movie to watch too. I've compared multiple crash logs in Kdiff3 and none of them really seem to be that much alike other then they all mention something about Pulse Audio, which I don't use (I use ALSA).

Here's three crash logs, two of which I had just triggered by opening Wake Up Ron Burgundy: The Lost Movie and by surfing through channels on PseudoTV

Log 1 
Log 2
Log 3

Last edited by brando56894 (2011-11-20 22:46:39)

Offline

#2 2011-11-09 02:01:26

pigiron
Member
From: USA
Registered: 2009-07-14
Posts: 150

Re: XBMC Crashes A Lot

Here's my take from those logs.

They all crash in the same place:

#0  0x00007f20537c0f13 in snd_pcm_close () from /usr/lib/libasound.so.2
#1  0x00007f20537ddcce in snd_pcm_rate_open () from /usr/lib/libasound.so.2
#2  0x00007f20537dff50 in ?? () from /usr/lib/libasound.so.2
#3  0x00007f20537e0f6b in ?? () from /usr/lib/libasound.so.2
#4  0x00007f20537cb39a in ?? () from /usr/lib/libasound.so.2
#5  0x00007f20537bf7d3 in snd_pcm_hw_params () from /usr/lib/libasound.so.2
#6  0x0000000000b55ea7 in CALSADirectSound::Initialize(IAudioCallback*, CStdStr<char> const&, int, PCMChannels*, unsigned int, unsigned int, bool, bool, bool) ()
#7  0x0000000000b549f1 in CAudioRendererFactory::Create(IAudioCallback*, int, PCMChannels*, unsigned int, unsigned int, bool, bool, bool) ()
#8  0x0000000000a0e3e3 in CDVDAudio::Create(stDVDAudioFrame const&, CodecID) ()
#9  0x0000000000a15b18 in CDVDPlayerAudio::Process() ()
#10 0x00000000006c7071 in CThread::staticThread(void*) ()
#11 0x00007f2057067df0 in start_thread () from /lib/libpthread.so.0
#12 0x00007f205185939d in clone () from /lib/libc.so.6
#13 0x0000000000000000 in ?? ()

It appears that XBMC is attempting to set up the ALSA sound hardware on your box by calling the ALSA snd_pcm_hw_params() function in the "#5" line above. The XBMC code should take a look at the audio that you're attempting to play (sample rate, number of channels, etc.), and set up the sound device accordingly by making that function call contained in the libasound.so.2 ALSA library.

From this point, all the code executed is within that same ALSA library.

Then, you can see in line #2, that the snd_pcm_rate_open() function is called later. Now I could be totally wrong, but by looking at the poor ALSA documentation, this may be called because you have a "rate" specified somewhere within the ALSA configuration files on your box. I partially got that info by going to the "Plugin: Rate" section of this web page:

http://www.alsa-project.org/alsa-doc/al … ugins.html

and the use of a slave rate is also implied in the snd_pcm_rate_open documentation itself here:

http://www.alsa-project.org/alsa-doc/al … 11538122b7

Lastly, you see in line #1, that something is causing that snd_pcm_rate_open function in line #1 to call the snd_pcm_close function on line #0. Without looking at the source code, my guess is it would only do this if it finds something wrong. But this last function tries to touch some memory it does not own, causing the "Program terminated with signal 11, Segmentation fault." line you see near the top of your logs... so the program crashes.

First thing I would do is grep your ALSA configuration files for the word "rate" and/or "format".

Good luck.

Last edited by pigiron (2011-11-09 02:16:32)

Offline

#3 2011-11-09 16:13:00

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: XBMC Crashes A Lot

Thanks for the info! Here's my output.

 [bran@ra ~]$ cat /usr/share/alsa/alsa.conf|grep rate
defaults.pcm.dmix.rate 48000
                description "Discard all samples (playback) or generate zero samples (capture)"



 [bran@ra ~]$ cat /usr/share/alsa/alsa.conf|grep format
defaults.pcm.dmix.format "unchanged"
defaults.pcm.file_format        "raw"
                        name defaults.pcm.file_format
        format $FORMAT
                        name defaults.pcm.file_format
        format $FORMAT

If I comment out defaults.pcm.dmix.rate 48000 in alsa.conf and restart ALSA, the video plays but XBMC says error initializing audio device. So I think you're on the right track! big_smile

Last edited by brando56894 (2011-11-09 16:23:42)

Offline

#4 2011-11-10 04:28:49

PReP
Member
From: Sweden
Registered: 2010-06-13
Posts: 359
Website

Re: XBMC Crashes A Lot

I had a similar problem a few days ago.

I tried backing up my fiddled-with alsa.conf, and start with a clean again - the sound works for my setup.

So, yeah, it seems to be something about the pcm_rate. hmm smile


. Main: Intel Core i5 6600k @ 4.4 Ghz, 16 GB DDR4 XMP, Gefore GTX 970 (Gainward Phantom) - Arch Linux 64-Bit
. Server: Intel Core i5 2500k @ 3.9 Ghz, 8 GB DDR2-XMP RAM @ 1600 Mhz, Geforce GTX 570 (Gainward Phantom) - Arch Linux 64-Bit
. Body: Estrogen @ 90%, Testestorone @ 10% (Not scientific just out-of-my-guesstimate-brain)

Offline

#5 2011-11-11 03:31:02

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: XBMC Crashes A Lot

how do you remake alsa.conf?

Offline

#6 2011-11-13 02:46:27

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: XBMC Crashes A Lot

f I comment out defaults.pcm.dmix.rate 48000 I also don't have any sound at all system wide.

Offline

#7 2011-11-20 22:49:19

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: XBMC Crashes A Lot

*Bump*

Still no progress...

Offline

Board footer

Powered by FluxBB