Opened 8 years ago

Closed 7 years ago

#10149 closed Bug Report - Crash (Invalid)

Frontend audio setup configured for PulseAudio device segfaults when Pulse is not installed

Reported by: ville.aakko@… Owned by: JYA
Priority: minor Milestone: unknown
Component: MythTV - Audio Output Version: Master Head
Severity: low Keywords: mythfrontend pulseaudio segmentation fault crash workaround
Cc: Ticket locked: no



This is on Gentoo and media-tv/mythtv-0.25_pre20110728 ebuild.

I recently removed Pulseaudio from my HTPC, since it was causing more harm than gain (originally, I installed it to play around with ProjectM).

Then, I noticed that I have no audio in MythTV anymore. And that it segfaults when going to the audio settings, with no sensible error message.

I just guessed that the change from PulseAudio? -> no PulseAudio? at all was the culprit... tried recompiling MythTV, 'mythfrontend --reset' downgrading, restoring DB backup, nothing helped.... it took me a while to figure out what to do. I needed to 'mythfrontend -O AudioOutputDevice?=alsa'. (I found the right setup entry by grepping the mysql dump :-/ ). Then, I got an error that the output device "alsa" is invalid, but was able to go through the audio setup without mythfrontend crashing on me.

Hope this helps someone, if you get into the same situation!

Also, hope it is not too difficult to find and destroy the bad line of code causing this not-so-user friendly crash ;-)


Steps to reproduce:

1) Set audio device to pulseaudio, when no Pulseaudio is available (not sure if this is possible, when pulseaudio is not installed, in my case it was, but was then removed; maybe with -O AudioOutputDevice?=Pulseaudio:default).

2) Start mythfrontend

3) Go to Settings -> Audio

Actual results:

Mythfrontend crashes (segmentation fault) without any chance to change the audio device

Expected results:

Mythfrontend should not crash, but instead give an error message. Also, perhaps 'mythfrontend --reset' should also reset and / or rescan audio devices...

Change History (5)

comment:1 Changed 8 years ago by ville.aakko@…

Not sure why this trac but the extra ? -marks in the above text...

comment:2 Changed 8 years ago by Raymond Wagner

My bet is that your current binaries are still dependent on the now-removed pulseaudio libraries. In any case, your copy is over three months old. Update to a recent changeset and see if the problems persist.

comment:3 Changed 8 years ago by thrash.dude@…

Happened to me as well. This is the use case I used - Previously ran MythTV on Slackware (no pulse audio), installed Arch and set up MythTV (has pulse audio) on the same host.

Backend remembers audio settings, running MythTV on Slackware segfaults because of the stored setting of pulse audio. Considering Slackware does not include Pulse audio, MythTV built on Slackware without pulse audio, MythTV segfaults same as OP.

How to fix -- Run mythfrontend with --override-setting to set audio to Alsa, then you can enter the settings screen and change the audio preference.

comment:4 Changed 8 years ago by Raymond Wagner

Component: MythTV - GeneralMythTV - Audio Output
Owner: set to JYA
Status: newassigned
Summary: MythTV frontend segfaults when opening Audio setup, and Pulseaudio set as audio device when Pulseaudio is not availableFrontend audio setup configured for PulseAudio device segfaults when Pulse is not installed
Type: Bug Report - GeneralBug Report - Crash
Version: UnspecifiedTrunk Head

comment:5 Changed 7 years ago by JYA

Resolution: Invalid
Status: assignedclosed

You should get: PulseAudio:default is invalid or not useable.

I can't reproduce this problem.

Steps to reproduce it: 1-Run mythfrontend with -O AudioOutputDevice?=PulseAudio:default

2-Install Pulse and start Pulse server, start myth, configure it to use PulseAudio:default server. Play content. Quit mythfrontend, kill pulseaudio server, uninstall pulseaudio server. Start mythfrontend , you get the message: PulseAudio:default is invalid or not useable.

You can't remove the pulse libraries if you have compiled mythtv with pulse support, it should be a dependency and removing pulse library should also remove all packages depending on pulse libraries. Additionally, mythfrontend compiled with pulse support, so linked to pulse libraries, wouldn't even start due to missing dynamic libraries.

On my ubuntu platform, trying to remove the pulse libraries would pretty much remove every packages installed on my machine

Note: See TracTickets for help on using tickets.