Crashing Audacity 1.3.9 & 1.3.10 on Mandriva 2010.0

This section is now closed.
Forum rules
Audacity 1.3.x is now obsolete. Please use the current Audacity 2.x.x package for your distribution or compile Audacity from the source code.
Locked
Kevin_the_Drummer
Posts: 4
Joined: Mon Mar 29, 2010 10:31 pm
Operating System: Please select

Crashing Audacity 1.3.9 & 1.3.10 on Mandriva 2010.0

Post by Kevin_the_Drummer » Mon Mar 29, 2010 11:02 pm

I can't choose ALSA devices with Audacity. When I try, Audacity immediately crashes. I think I need to change my device because I don't get any input signal when I record, nor does playback make any sound. I'd prefer a different behavior, and I'm hoping that someone here has helpful suggestions.

For what it's worth, I'm running on hardware that worked just fine with Mandriva 2007.0. I say that bcause I think I can rule out hardware troubles.

I very recently got Amarok's playback to make sound on this system once I disabled Pulse Audio for the sound cards, and selected the Ensoniq AudioPCI ENS1371 card in Amarok's configuration, as that's the card connected to my computer speakers.

I have enabled recording, unmuted and adjusted the gain of my inputs and outputs using a mixer, KMix. I also looked through the FAQ, and searched this and other websites for help before considering posting here.

/proc/asound/cards contains:

Code: Select all

 0 [pcsp           ]: PC-Speaker - pcsp
                      Internal PC-Speaker at port 0x61
 1 [AudioPCI       ]: ENS1371 - Ensoniq AudioPCI
                      Ensoniq AudioPCI ENS1371 at 0xa800, irq 19
 2 [M1010          ]: ICE1712 - M Audio Delta 1010
                      M Audio Delta 1010 at 0xa400, irq 18
 3 [M1010_1        ]: ICE1712 - M Audio Delta 1010
                      M Audio Delta 1010 at 0x9400, irq 17
I want to use device #1, the ENS1371, in the above list. When I bring up the the Audacity Preferences "Devices" configuration dialog the default settings are an OSS host with /dev/dsp as the playback device and /dev/dsp1 as the recording device. In the "Interface" section of the dialog there's a line saying:

Code: Select all

Using: PortAudio V19-devel (built Oct 20 2009 10:02:01)
The Audacity devices dialog provides me with these choices:

Code: Select all

   OSS
   playback
       /dev/dsp
       /dev/dsp3
   recording
       /dev/dsp1
       /dev/dsp3

   ALSA
   playback
       pcsp: pcsp (hw1:0,0)
       Ensoniq AudioPCI: ES1371 DAC1 (hw1:1,1)
       M Audio Delta 1010: ICE1721 multi (hw3:0)
       front
       default
       dmix
   recording
       Ensoniq AudioPCI: ES1371 DAC2/ADC (hw1:1,0)
       M Audio Delta 1010: ICE1721 multi (hw3:0)
       default
If I alter the playback or recording devices to choose anything ALSA, then simply clicking on "OK" for the dialog is enough to cause Audacity to crash. Even just changing from OSS to ALSA is enough to crash Audacity when I click "OK".

After trying Audacity, I started to try with Ardour, then ran out of time. I left QJackCtl running, which means that today I get additional choices in Audacity as I write this help request. Those choices are:

Code: Select all

   JACK Audio Connection Kit
   recording
       alsa_pcm
       system
   playback
       alsa_pcm
       system
It turns out that I _CAN_ choose the JACK default alsa_pcm devices and click OK and have Audacity continue to run. I don't know if it plays or records as I'm far from that computer now.

Maybe the answer is to alter the default card of my three cards to be the Ensoniq AudioPCI ES1371 card. I remember doing this kind of thing before in /etc/modprobe.conf to get the modules to load in the order of my preference. Would anyone recommend for or against that?

When Audacity starts, it complains with these lines:

Code: Select all

Expression '*idev = open( idevName, flags )' failed in 'src/hostapi/oss/pa_unix_oss.c', line: 811
Expression 'OpenDevices( idevName, odevName, &idev, &odev )' failed in 'src/hostapi/oss/pa_unix_oss.c', line: 857
Expression 'PaOssStream_Initialize( stream, inputParameters, outputParameters, streamCallback, userData, streamFlags, ossHostApi )' failed in 'src/hostapi/oss/pa_unix_oss.c', line: 1234
When Audacity crashes, it complains with this line:

Code: Select all

audacity: pcm_params.c:2348: sndrv_pcm_hw_params: Assertion `err >= 0' failed.
That last line smells a little like not having the right kernel module loaded. But, I have no evidence to that effect. My loaded kernel modules related to 'snd' are:

Code: Select all

snd_seq_midi            5972  0 
snd_ice1712            51888  9 
snd_ice17xx_ak4xxx      3320  1 snd_ice1712
snd_ak4xxx_adda         7384  2 snd_ice1712,snd_ice17xx_ak4xxx
snd_ens1371            19660  5 
snd_cs8427              7120  1 snd_ice1712
snd_seq_dummy           2548  0 
snd_i2c                 5004  2 snd_ice1712,snd_cs8427
snd_mpu401_uart         6624  1 snd_ice1712
gameport               11080  1 snd_ens1371
snd_seq_oss            24468  0 
snd_seq_midi_event      6676  2 snd_seq_midi,snd_seq_oss
snd_rawmidi            20012  9 snd_seq_midi,snd_ens1371,snd_mpu401_uart
snd_seq                44276  10 snd_seq_midi,snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device          6616  5 snd_seq_midi,snd_seq_dummy,snd_seq_oss,snd_rawmidi,snd_seq
snd_ac97_codec         92972  2 snd_ice1712,snd_ens1371
ac97_bus                1552  1 snd_ac97_codec
snd_pcm_oss            32908  0 
snd_pcsp                9132  1 
snd_pcm                65992  8 snd_ice1712,snd_ens1371,snd_ac97_codec,snd_pcm_oss,snd_pcsp
snd_timer              18628  3 snd_seq,snd_pcm
snd_mixer_oss          14112  1 snd_pcm_oss
snd_page_alloc          8468  1 snd_pcm
snd                    53812  38 snd_ice1712,snd_ak4xxx_adda,snd_ens1371,snd_cs8427,snd_i2c,snd_mpu401_uart,snd_seq_oss,snd_rawmidi,snd_seq,snd_seq_device,snd_ac97_codec,snd_pcm_oss,snd_pcsp,snd_pcm,snd_timer,snd_mixer_oss
soundcore               7236  1 snd
I've tried the current Mandriva 2010.0 offering of Audacity, which is version 1.3.9. Someone on the Mandriva forum thought that a bug just like mine was fixed in Audacity 1.3.10, and Mandriva has that release in their contrib/backports repository. I tried 1.3.10, with the same results.

I'm not married to ALSA, but I'm hoping that using ALSA will let me record and playback with Audacity. If OSS will work, then that's fine with me. But, I can't make OSS record or play sound.

Any suggetions? Anybody?

Thanks....

steve
Site Admin
Posts: 80682
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Crashing Audacity 1.3.9 & 1.3.10 on Mandriva 2010.0

Post by steve » Tue Mar 30, 2010 1:12 pm

I'm not familiar with Mandriva (I use Ubuntu) so I'll only be able to deal with pretty general issues.

The current version of Audacity is 1.3.11 (1.3.12 is due to be released in a few days). I think, as has been suggested, that there were some stability problems in 1.3.9, but if that had been the root of your issue then it should have been resolved by installing 1.3.10.

I'm a bit concerned about you disabling PulseAudio. I'm aware that a lot of people have struggled to get PulseAudio working properly, it is nevertheless a core component in many Linux distributions. Removing or disabling PulseAudio can break a lot of things, including Audacity, and getting everything working again is too big an issue for me to deal with here.

I don't know your reasons for disabling PulseAudio, and I am aware that PulseAudio is hotly debated by many Linux users and I'm not going to get involved in that argument, but I'll give a bit of insight from my own experience.

I have 2 Ubuntu based installations - one uses PulseAudio and the other uses plain ALSA without PulseAudio. Both work well.

The first time that I tried removing PulseAudio, I managed to get basic functionality of the sound system, but there were multiple small issues that I was never able to fully resolve - it worked, but it did not work well (I might as well have been using Vista). I had stability issues with Audacaity that I was unable to resolve.

I then rebuilt the operating system with a minimal install of Ubuntu (the kernel, a few utilities such as text a text editor and network support, but not much else) and added a Desktop, ALSA and other applications. This was built without ever installing PulseAudio. This system works well and has no issues with the sound system. The moral of this story is that it is much easier to get ALSA working correctly if PulseAudio has neber been installed than it is to remove PulseAudio.

The other system is a pretty standard Ubuntu installation (with PulseAudio). It took me a while to understand how to use PulseAudio and it is necessary to install Pavucontrol (which was not a standard part of the default Ubuntu install) in order to configure it correctly for recording. Once I worked out how to use it correctly, it has been great and has had very few problems. The omission of Pavucontrol from many distributions and inadequate documentation have been the major cause of Linux users problems with PulseAudio.

Audacity is entirely dependent on a correctly functioning sound system. If there are problems with the sound system you will never get Audacity to work well.

I'm very interested to hear if you are able to get Audacity to work using Jack. This could be the easiest solution to your issues. If Audacity works on your system with Jack, then that's the problem solved - just set Jack to auto start on boot-up.

Jack Audio System is one of the common reasons that people disable or remove PulseAudio. Many Linux distributions do not configure PulseAudio with Jack support (there is no Jack Sink), which means that Jack and PulseAudio are constantly fighting each other (pasuspender is required to keep PulseAudio quiet while using Jack). If you have correctly disabled PulseAudio, this gives you a good chance of getting Audacity to work with Jack.

Audacity will work well with Jack, but with one major limitation. Audacity connects to the computer sound system using Portaudio, but the PortAudio ports are not persistent. Recording/Playback ports are opened on demand (they are present during record/playback but disappear when you press "Stop"). By default the "Portaudio input (recording) port" will connect to the "system output port" and the "Portaudio output (playback) port" will connect to the "System input port". This provides basic record/playback functionality, but because the ports disappear when you press stop, it is difficult to set up other routing. (To set up alternative routing you must have Audacity in "Pause" mode, then make the connection changes, then "unpause" Audacity).

A couple of important tips for getting Audacity to work with Jack:
1) Set the default sample rate and bit depth in Audacity to the same as is used by Jack.
2) Do not enable the recording monitor (the record level meter) in Audacity before you have used Audacity in record mode. If you open Audacity and try to enable the record meter before Audacity has established its initial connection to Jack, Audacity will crash. After you have used Audacity to record at least once in the current session this problem disappears - it's only when you first launch Audacity that you will get this problem.
Kevin_the_Drummer wrote:That last line smells a little like not having the right kernel module loaded.
I did a Google search for "Ensoniq AudioPCI ENS1371" and a lot of results came up regarding kernel module loading problems.

Have a go with Jack and see how you get on. Whether that works or not could tell us a lot.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Kevin_the_Drummer
Posts: 4
Joined: Mon Mar 29, 2010 10:31 pm
Operating System: Please select

Re: Crashing Audacity 1.3.9 & 1.3.10 on Mandriva 2010.0

Post by Kevin_the_Drummer » Tue Mar 30, 2010 5:01 pm

Wow! Steve, thanks for your very thorough response. It'll be a few days at least for me to be able to go through your message and try things in detail.

Before receiving your message I did try a few things. I built Audacity 1.3.11 and found it to exhibit the same behavior on my system. I also reordered the loading of modules for my soundcards in /etc/modprobe.conf placing the card that I want to be my default card to have its modules loaded first, and also having it show up with the lowest numbered /dev/dsp#. I haven't had a chance to test the effect of my modprobe.conf swizzle.

Given your comments about PulseAudio, maybe I should reenable it on my default sound device. But, I don't know how to enable PulseAudio on only one of my 3 audio devices. My other two sound devices are a pair of M-Audio Delta 1010s which I use for recording with Ardour. As such, I always use them with JACK. How can I tell if my PulseAudio is built and/or configured to cooperate to its best ability with JACK? I noticed that when I start JACK on one sound device, that the device being run by JACK no longer shows up in the list of things pavucontrol presents to me. Is this the right way for it to work?

After your comment about pavucontrol, I reenabled PulseAudio, as pavucontrol showed no devices and complained about having nothing to control before exiting. With PulseAudio running pavucontrol shows that every input and output slider is up, and nothing is muted. Although, the icons that show muting are a bit unclear. With PulseAudio running, Amarok shows that as its sound device in its configuration dialog. I'll have to sit in front of the computer to understand why Amarok wouldn't make sound when PulseAudio was running. Can you tell me how PulseAudio would handle routing? That is, if I play something with Amarok, then to which sound device will PulseAudio send the signal? If PulseAudio sends the signal to the first device in the list, then maybe my device swizzle in modprobe.conf will enable sound for me with Amarok while using PulseAudio? But, 'pcsp' still shows up as my first audio device in /proc/asound/cards and that might be trouble for playing sounds. 'pcsp' didn't show up for me on this computer with prior versions of Mandriva.

As far as PulseAudio's "controversy" goes, it's just another in the list of improvements that take a while to mature. A lot of the stuff we take for granted today went through similar growing pains before being widely accepted. A short list of these are: 2.6.x kernels, devfs, udev, supermount, ipchains, iptables, KDE4, etc. I'd bet that PortAudio will be better configured "out of the box" by distributions over time. When that happens, people will be happier with it.

Thanks.....

steve
Site Admin
Posts: 80682
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Crashing Audacity 1.3.9 & 1.3.10 on Mandriva 2010.0

Post by steve » Tue Mar 30, 2010 7:31 pm

As you've obviously been kicking round in the Linux world for a while you will understand that "sound" on Linux is not exactly "tidy". :?

If you are using Ardour for recording with Jack, then it would seem an obvious choice to try and get Audacity working with Jack.
Audacity has a history of instability with Jack, or just not *@$! working, but is a lot better these days than in the past.

If all of your other stuff is working with PulseAudio disabled, then I'd shy away from re-enabling it. The important thing is to have it working well for the applications and purposes that are most important. If recording with Ardour is the main thing, then that's the one to not mess up.
Kevin_the_Drummer wrote:My other two sound devices are a pair of M-Audio Delta 1010s which I use for recording with Ardour.
Very nice :D Does that work well?
Kevin_the_Drummer wrote:How can I tell if my PulseAudio is built and/or configured to cooperate to its best ability with JACK?
In the "PulseAudio Manager" there should (ideally) be Jack listed in "sources" and "sinks" in the "Devices" window. As I understand it, if Jack support is compiled into PulseAudio, then it should be possible to configure Jack to use PulseAudio as its audio device. That's quite an exciting prospect but I've not tried it.
The standard Ubuntu install does not have support for Jack compiled into PulseAudio.
Kevin_the_Drummer wrote:I noticed that when I start JACK on one sound device, that the device being run by JACK no longer shows up in the list of things pavucontrol presents to me. Is this the right way for it to work?
Probably correct, but not quite the way that it works on my system. Pavucontrol still "claims" to have access to the sound card, though I don't think that it really has, and if I try to access PulseAudio on that device I get complaints that indicate that PulseAudio does not have access to the device. Jack requires exclusive access to the device, so I think what you are seeing is more correct than my machine.
Kevin_the_Drummer wrote:Can you tell me how PulseAudio would handle routing? That is, if I play something with Amarok, then to which sound device will PulseAudio send the signal?
Leaving Jack out of the picture completely - on a working PulseAudio set-up, if you play sound on, for example, Amarok, then PulseAudio can connect it to any of your devices, or even to multiple devices. If I'm watching a video on my laptop at home, I'll plug in a Behringer UCA 202 which is connected to my hi-fi and send the sound to both the laptop speakers (internal Intel sound card) and to the hi-fi (external USB sound card). This is done using Pavucontrol. Simply go to the "playback" tab, click on the "v" by the application that you want to route, and select "Move Stream". Apparently, if you're on a network you can even configure it to play through a remote device.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Kevin_the_Drummer
Posts: 4
Joined: Mon Mar 29, 2010 10:31 pm
Operating System: Please select

Re: Crashing Audacity 1.3.9 & 1.3.10 on Mandriva 2010.0

Post by Kevin_the_Drummer » Tue Mar 30, 2010 7:49 pm

It'd be great to get Ardour and Audacity working with JACK. I'd also want at least Amarok working with JACK, although I might end up switching my general purpose sound file player to something else, if and when wireless audio throughout my house from one store of sound files seems easier.

One of my reasons for upgrading from Mandriva 2007.0 to Mandriva 2010.0 was to get the benefit from the low level system stuff, e.g. kernel, that would allow me to slave the two Delta 1010s such that they appear as one 20 channel device to ALSA/JACK. One Delta 1010 by itself works fabulously with Ardour. My only reservation about them is that the more modern motherboards are starting to skimp on the number of PCI slots; many mobo have only one PCI slot these days. The 1010s require one PCI slot each. Maybe I'll move to a firewire setup some day. As you might be able to tell from my username, I record drums, which tends to require more channels than say, a singer.

Is the "Pulse Audio Manager" the same thing as pavucontrol? If it is, then I didn't see any sinks or sources using pavucontrol. But, I'd only started QJackCtl, and not any clients. Maybe starting a client, like Ardour, would give me some sinks and sources to show up in pavucontrol?

I looked at the list of packages installed on my system. One of them is pulseaudio-module-jack-0.9.21-0.1mdv2010.0 which is advertised as "JACK support (sink and source modules) for the PulseAudio sound server." My list of seeming Pulse Audio related installed packages is:

Code: Select all

alsa-plugins-pulse-config-1.0.21-2mdv2010.0
gstreamer0.10-pulse-0.10.16-3mdv2010.0
libalsa-plugins-pulseaudio-1.0.21-2mdv2010.0
libpulseaudio0-0.9.21-0.1mdv2010.0
libpulseaudio-devel-0.9.21-0.1mdv2010.0
libpulseglib20-0.9.21-0.1mdv2010.0
libpulsezeroconf0-0.9.21-0.1mdv2010.0
pulseaudio-0.9.21-0.1mdv2010.0
pulseaudio-client-config-0.9.21-0.1mdv2010.0
pulseaudio-esound-compat-0.9.21-0.1mdv2010.0
pulseaudio-module-gconf-0.9.21-0.1mdv2010.0
pulseaudio-module-jack-0.9.21-0.1mdv2010.0
pulseaudio-module-x11-0.9.21-0.1mdv2010.0
pulseaudio-module-zeroconf-0.9.21-0.1mdv2010.0
pulseaudio-utils-0.9.21-0.1mdv2010.0
task-pulseaudio-2010.0-3mdv2010.0
vlc-plugin-pulse-1.0.4-1plf2010.0
It would seem that a lot of stuff is on my system attending to Pulse Audio. I just don't know what to do with it all yet.

I'll look more at moving streams in Pulse Audio when I sit at that computer and hear what I'm doing.

Thanks A LOT for all the education!

steve
Site Admin
Posts: 80682
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Crashing Audacity 1.3.9 & 1.3.10 on Mandriva 2010.0

Post by steve » Tue Mar 30, 2010 8:20 pm

Kevin_the_Drummer wrote:Is the "Pulse Audio Manager" the same thing as pavucontrol?
No - I couldn't remember the package name so I've had to look it up. It's "paman".
Apparently this package is now obsolete, so I assume that the functionality has been moved elsewhere. (possibly into pavucontrol for Version 0.9.9 or later).
Kevin_the_Drummer wrote:I looked at the list of packages installed on my system. One of them is pulseaudio-module-jack-0.9.21-0.1mdv2010.0 which is advertised as "JACK support (sink and source modules) for the PulseAudio sound server."
That looks like the baby :D
That has not been available for Ubuntu, but I see it is now listed for "Ubuntu Lucid". I'll have to give it a go on my test box.

The most comprehensive source for information about PulseAudio is (surprisingly?) http://pulseaudio.org/
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Kevin_the_Drummer
Posts: 4
Joined: Mon Mar 29, 2010 10:31 pm
Operating System: Please select

Re: Crashing Audacity 1.3.9 & 1.3.10 on Mandriva 2010.0

Post by Kevin_the_Drummer » Thu Apr 01, 2010 1:45 am

The problem is solved.

I reenabled PulseAudio.

I changed my /etc/modprobe.conf from this

Code: Select all

alias sound-slot-0 snd_ice1712
alias sound-slot-1 snd_ice1712
alias sound-slot-2 snd_ens1371
to this

Code: Select all

alias sound-slot-0 snd_ens1371
alias sound-slot-1 snd_ice1712
alias sound-slot-2 snd_ice1712
Then I rebooted. After the machine was back up, Amarok worked with PulseAudio enabled. Audacity 1.3.11 shows only ALSA in its host type list. For playback I chose the ENS1371 card, which is now my default. For recording, I could only choose "default", so that's what I chose. Edits in that dialog do not cause crashing when okayed. Audacity records just fine now. What's more, when I do a mic check for of Audacity's input, I hear the output on my speakers. My ENS1371 card has never been that full duplex before. Maybe I should credit PulseAudio with that behavior?

Anyway, everything works and I believe the main cause of that was reordering my sound devices in /etc/modprobe.conf which now agrees with the order I had before I upgraded my distribution from Mandriva 2007.0 to Mandriva 2010.0.

I hope this info helps the next person to face a similar challenge.

Thanks!

steve
Site Admin
Posts: 80682
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Crashing Audacity 1.3.9 & 1.3.10 on Mandriva 2010.0

Post by steve » Thu Apr 01, 2010 11:16 am

Excellent Kevin, and thanks for the detailed feedback.

Purely as a matter of interest, I've now got Audacity 1.3.12 running on my test box which now has a Ubuntu 10.04 (alpha) based system on it. It is pure ALSA+Jack (no PulseAudio at all) and Audacity is running really sweetly with Jack. Of course it still has the issue that re-routing the Portaudio ins/outs can only be done in "Pause" mode and it has the one remaining bug that enabling the record meter in a new Audacity instance will cause Audacity to crash, but other than that it's launch and go.
Kevin_the_Drummer wrote:My ENS1371 card has never been that full duplex before. Maybe I should credit PulseAudio with that behavior?
Quite possibly. PulseAudio gives me the option for what Windows calls "Stereo Mix/What U Hear" on all my sound cards - an option which is not available without it.

There are some significant improvements in Ubuntu 10.04 for sound - one really nice thing was that installing Jack asked if I wanted to enable real-time access. I said yes, and it did it for me :) Linux has such huge potential for musicians - it's great to see these technologies maturing.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked