Linux [SOLVED] PulseAudio: Failed to create context - XBMC CRASH
#1
Hi to all,

my problem seems to be already treated but any of the threads I found solved it.

I installed XBMCubuntu 11.01 "Eden" on a ZOTAC ZBOX ID36BR-PLUS.
The HW configuration is:
- CPU: Intel Atom D525
- GPU: NVidia ION 2
- HD: Samsung 250GB
- RAM: 2GB DDR3 800MHz

I have no HDMI audio device plugged to my box, so I use the analog output.

When I try to play a video, the XBMC crashes.
Studying the log files, I founded the following line repeated in any crash report:
Code:
ERROR: PulseAudio: Failed to create context
It seems to be the cause of the crash, but hope you can confirm it to me.

I tryed a lot of Audio configuration from the System->Settings->System->Audio output menu, but it doesn't work at all. I tryed to put the "custom" strings suggested by other users into the specific forms, but they didn't work, too.

These are the latest crash log files:
1) http://pastebin.com/YySE6JKT
2) http://pastebin.com/Wi6gtekg

The only positive but "strange" at the same time is that a clean installation of XBMCubuntu works fine, with a HDMI output as default. When I change into Analog, it works for a while, then starts to crash. After the frst crash, it crashes anytime I try to play a video (both on-line than DVD).

Many thanks for your help.
J.
Reply
#2
Hi to all,

I add the APLAY output, hope could help:

Code:
xbmc@xbmc-media:~$ sudo aplay -l
**** List of PLAYBACK Hardware Devices ****
ALSA lib conf.c:1219:(parse_def) default is not a compound
ALSA lib conf.c:1685:(snd_config_load1) _toplevel_:1:13:Invalid argument
ALSA lib conf.c:3467:(snd_config_hook_load) /home/xbmc/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:3326:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:3713:(snd_config_update_r) hooks failed, removing configuration
aplay: device_list:249: control open (0): Invalid argument
ALSA lib conf.c:1219:(parse_def) default is not a compound
ALSA lib conf.c:1685:(snd_config_load1) _toplevel_:1:13:Invalid argument
ALSA lib conf.c:3467:(snd_config_hook_load) /home/xbmc/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:3326:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:3713:(snd_config_update_r) hooks failed, removing configuration
aplay: device_list:249: control open (1): Invalid argument
xbmc@xbmc-media:~$

Thanks for your help.
J.
Reply
#3
Can you install gdb using "sudo apt-get install gdb", then turn on debug logging in XBMC, make it crash and post another crashlog.
Reply
#4
Hi again,

I made a backup and then I deleted the .asoundrc file from the /home/xbmc directory.

After that, I obtained the following aplay output:
Code:
xbmc@xbmc-media:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC888 Analog [ALC888 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC888 Digital [ALC888 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
xbmc@xbmc-media:~$

Setting the "HDA Intel IEC958 0" together with the "Analog" output in the System-Settings-System-Audio output, finally the XBMC doens't crash, but the audio doesn't work.

I noticed the master volume is set to 0 level but I can't change it.

Could you please help me?
Many thanks,
J.
Reply
#5
You probably selected the wrong audio device then.
Reply
#6
I assume by "analog" output that you mean the 3.5mm audio out for the front channel? When you choose "Analog" for the Audio Output Type, what options does it give you for Audio Device?
HTPC 1 - Zotac ZBOX ID80U | 4GB RAM | 64GB SSD | Openelec | Confluence
HTPC 2 - Zotac ZBOX ID41U | 4GB RAM | 60GB SSD | Openelec | Confluence
Server - unRAID Server | 3 x 2TB WD Green HDD, 1TB WD Black HDD (Cache) | Sabnzbd | CouchPotato | Sickbeard
Reply
#7
Thanks to bobo1on1 and Plaguester for the interest and suggestions.

I finally try ALL the audio device options together with the Analog output, as a "monkey".
The only option that works with that output is the so called "Default (ALSA)". All the other ones show a "Failed to initialize audio device - check audio settings" warning. No audio.

Plaguester: yes, with "Analog" I mean the 3.5 jack output. When I change the Audio output, it doesn't change any audio device. I have to do it by myself. I believe could be because I deleted the asoundrc file (otherwise it didn't work).

In the next future, when I'll have a 5.1 audio output or a hdmi output, I'll have to try other configurations.

Could you please tell me if is it better to configure an asoundrc file? Many thanks.
In any case I'm going to put [SOLVED] in the first post.

J.
Reply
#8
same hardware, same issue and same fix worked. Many thanks
Reply
#9
Same problem here.. tried three install that work great. Sound often seems te vanish, changing the setting from hdmi tot analog or to all speakers seems te solve the problem for a session and then suddenly exact the same problem as in this thread.
Constant restarting from XBMC.

Can not find the .asoundrc file in /home/xbmc so theres nothing to delete.
Any thougts?

hardware Asrock ion 330


same problem in this thread: http://forum.xbmc.org/showthread.php?tid=129312

but alas.. aplay -l only gives sort of output a above
Quote: **** List of PLAYBACK Hardware Devices ****
ALSA lib conf.c:1219Sadparse_def) default is not a compound
ALSA lib conf.c:1685Sadsnd_config_load1) _toplevel_:1:13:Invalid argument
ALSA lib conf.c:3467Sadsnd_config_hook_load) /home/xbmc/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:3326Sadsnd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:3713Sadsnd_config_update_r) hooks failed, removing configuration
aplay: device_list:249: control open (0): Invalid argument
ALSA lib conf.c:1219Sadparse_def) default is not a compound
ALSA lib conf.c:1685Sadsnd_config_load1) _toplevel_:1:13:Invalid argument
ALSA lib conf.c:3467Sadsnd_config_hook_load) /home/xbmc/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:3326Sadsnd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:3713Sadsnd_config_update_r) hooks failed, removing configuration
aplay: device_list:249: control open (1): Invalid argument

looks like a serious bug

edit: rm .asoundrc deleted the file and restored the aplay -l output.

result:

**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: VT1708S Analog [VT1708S Analog]
Subdevices: 2/2
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
card 0: NVidia [HDA NVidia], device 1: VT1708S Digital [VT1708S Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0

but no sound still ( positive part: XBMC does not crash !)



Reply
#10
Hi,

it depends of which type of output you need to play audio.
If you use an analog output, try the setting I wrote above: "Analog" + "Default (ALSA)"
If you use the HDMI try another setting.

I changed the options step by step and tested them time by time.

Good luck!
J.
Reply
#11
Hi.
Maybe it is not related but this gets my attention. "/home/xbmc/.asoundrc may be old or corrupted: consider to remove or fix it"

I found when looking for the course of xbmc crashing that the file .asoundrc contained
pcm.default {
xxxxx
xxxxxxx
}
So the lack of the "!" as in pcm.!default makes alsa crash and subsequently also xbmc if you try to play something
Normally this should be taken care of by alsactl but it is not. Manually correct to pcm.!default gets overwritten anytime .asoundrc gets changed.
The solution to that problem is to take the major settings to /etc/asound.conf and let alsactl write mixer settings to .asoundrc

Regards Nenne
Reply

Logout Mark Read Team Forum Stats Members Help
[SOLVED] PulseAudio: Failed to create context - XBMC CRASH0