Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 302990 - media-sound/audacity-1.3.10/1.3.11 crashes when starting with error audacity: pcm_plug.c:388: snd_pcm_plug_change_channels: Assertion `snd_pcm_format_linear(slv->format)' failed
Summary: media-sound/audacity-1.3.10/1.3.11 crashes when starting with error audacity:...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Professional Audio Applications Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-31 14:23 UTC by Etienne Hilson
Modified: 2012-05-30 11:53 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Etienne Hilson 2010-01-31 14:23:04 UTC
media-sound/audacity-1.3.10 and 1.3.11 crashes when starting with the following error :

audacity: pcm_plug.c:388: snd_pcm_plug_change_channels: Assertion `snd_pcm_format_linear(slv->format)' failed
Aborted

workaround is to downgrade to 1.3.09 which is running fine
as root :
echo ">=media-sound/audacity-1.3.10" >> /etc/portage/package.mask
emerge audacity

Reproducible: Always

Steps to Reproduce:
Launch audacity

Actual Results:  
audacity: pcm_plug.c:388: snd_pcm_plug_change_channels: Assertion `snd_pcm_format_linear(slv->format)' failed.
Aborted                                                                                                       

Expected Results:  
audacity launches and runs

Portage 2.1.7.16 (default/linux/x86/10.0/desktop, gcc-4.4.2, glibc-2.11-r1, 2.6.30-gentoo-r7 i686)
=================================================================
System uname: Linux-2.6.30-gentoo-r7-i686-Intel-R-_Core-TM-2_Duo_CPU_P8400_@_2.26GHz-with-gentoo-2.0.1
Timestamp of tree: Thu, 28 Jan 2010 20:45:01 +0000
distcc 3.1 i686-pc-linux-gnu [disabled]
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4-r1, 3.1.1-r1
dev-util/cmake:      2.8.0-r1
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.0-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.7.9-r1, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -pipe -fomit-frame-pointer -msse -msse2 -msse3 -mmmx"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=core2 -pipe -fomit-frame-pointer -msse -msse2 -msse3 -mmmx"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ "
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa avahi bash-completion bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo fam firefox flac fortran gdbm gif gnome gpm gstreamer gtk hal iconv jpeg kde lame laptop ldap libnotify lm_sensors mad mikmod mmx mng modules mp3 mp4 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl phonon png ppds pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 sse3 ssl svg sysfs tcpd threads thunar tiff truetype unicode usb vorbis wifi win32codecs x264 x86 xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel vesa vmware"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Audiodef 2010-02-03 20:10:30 UTC
I have the same problem. Downgrading Audacity doesn't solve it for me. 
Comment 2 Simeon Maryasin 2010-02-19 23:38:44 UTC
I had same problem when used JACK and had following in .asoundrc:

pcm.!default {
    type plug
    slave { pcm "jack" }
}
[...]

A fix was to rename plug (!default -> plugjack or so), start audacity, configure audio-in and audio-out to JACK. After that I returned asoundrc to previous state, and audacity started without a problem.
Although this was nearly 6 months ago, so I don't know can it help or not.
Comment 3 Richard Ash 2010-04-02 16:34:17 UTC
The message
audacity: pcm_plug.c:388: snd_pcm_plug_change_channels: Assertion `snd_pcm_format_linear(slv->format)' failed.
is not the cause of the crash, as this message is encountered even when Audacity is working. If this is still a problem in 1.3.12 (#312837), can reporters confirm that they are
1) using Jack
2) building Audacity with the jack use-flag
3) have set their .asoundrc to divert ALSA default output to Jack?
Comment 4 Etienne Hilson 2010-04-02 17:11:02 UTC
Sorry, no more on gentoo :-( impossible to redo the test.
You can close the bug.
Comment 5 Thomas Orgis 2010-04-10 15:14:18 UTC
Well, I'm not on gentoo (ubuntu lucid, with audacity 1.3.12 from a ppa) but I can confirm that

1. I try to route stuff to jack via .asoundrc
2. audacity 1.3.12 still crashes:

audacity: pcm_plug.c:388: snd_pcm_plug_change_channels: Assertion `snd_pcm_format_linear(slv->format)' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff2779a75 in raise () from /lib/libc.so.6
(gdb) where
#0  0x00007ffff2779a75 in raise () from /lib/libc.so.6
#1  0x00007ffff277d5c0 in abort () from /lib/libc.so.6
#2  0x00007ffff2772941 in __assert_fail () from /lib/libc.so.6
#3  0x00007ffff371b86a in ?? () from /usr/lib/libasound.so.2
#4  0x00007ffff371c423 in ?? () from /usr/lib/libasound.so.2
#5  0x00007ffff3704f6a in ?? () from /usr/lib/libasound.so.2
#6  0x00007ffff3700b93 in snd_pcm_hw_params () from /usr/lib/libasound.so.2
#7  0x000000000084ef3d in ?? ()
#8  0x000000000084a588 in Pa_IsFormatSupported ()
#9  0x000000000051b1ae in AudioIO::GetSupportedPlaybackRates(int, double) ()
#10 0x000000000051d0ea in AudioIO::HandleDeviceChange() ()
#11 0x000000000051d8b4 in AudioIO::AudioIO() ()
#12 0x000000000051d9b4 in InitAudioIO() ()
#13 0x0000000000517452 in AudacityApp::OnInit() ()
#14 0x00007ffff6d37422 in wxEntry(int&, wchar_t**) ()
   from /usr/lib/libwx_baseu-2.8.so.0
#15 0x0000000000513002 in main ()

3. Somehow I managed to kill jackd while running audacity in gdb.
Might be concidence (I have some background computing going on, network transfer, ardour2 open) -- at least it is another sign that I probably never will get a stable setup with my firewire device. Even had to power cycle it to make it talk to jackd again.

I wonder if someone reported this to audacity folks yet? Or rather portaudio?
Comment 6 Thomas Orgis 2010-04-10 15:15:49 UTC
Eh, wait... the assert fails in ALSA ... so it's a but in libasound?
It should rather gracefully handle any question that audacity / portaudio pose.
Comment 7 Jaakko Perttilä 2010-04-30 12:53:05 UTC
I can confirm this on gentoo.

(In reply to comment #3)
> If this is still a problem in 1.3.12 (#312837), can reporters confirm that they are
> 1) using Jack
Yes. 0.118.0: 3dnow alsa mmx sse
> 2) building Audacity with the jack use-flag
Yes. 1.3.12: alsa ffmpeg flac jack ladspa mp3 vorbis
> 3) have set their .asoundrc to divert ALSA default output to Jack?
Yes.

To get Audacity start, I had to start it without the default divert in .asoundrc (3).
After that, I could configure Audacity and restore the .asoundrc.
Here are some of the differences to audacity.cfg after that:
-Version=1.3.7
+Version=1.3.12-beta
 [AudioIO]
 PlaybackDevice=JACK Audio Connection Kit: system
-RecordingDevice=ALSA: Aureal Vortex au8820: adb (hw:1,0)
+RecordingDevice=JACK Audio Connection Kit: JackMix
+Host=JACK Audio Connection Kit

If I delete the audacity.cfg I just fixed, I get back to the same
"audacity: pcm_plug.c:388:" -assert error.
Without the .asoundrc, audacity starts with message:
Expression 'stream->capture.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3653
That detects and saves the default config.
Here is the diff to get back to working jack setup:
[AudioIO]
-RecordingDevice=ALSA: default
+RecordingDevice=JACK Audio Connection Kit: JackMix
-PlaybackDevice=ALSA: Intel ICH5: Intel ICH5 (hw:2,0)
+PlaybackDevice=JACK Audio Connection Kit: system
-Host=ALSA
+Host=JACK Audio Connection Kit
Comment 8 David 2010-06-14 01:54:57 UTC
I get the same error (in Gentoo) with Audacity versions 1.3.8 and 1.3.12.

Audacity would die either immediately after the first-run "Select Language" screen, or immediately.

Ubuntu users seem to also have reported this issue [1].
     And as mentioned in the comments for this bug above, they related it to the issue with using "Jack".
     However, re-emerging Audacity without the "jack" USE flag did not help.


The only thing that allows Audacity to run successfully (for me, at least) is to rename ~/.asoundrc   (like:  'mv .asoundrc .asoundrc2')

     Then, after Audacity runs, I can rename that file back to its original name.

     Or, from within Audacity, I can go Edit->Preferences->Devices->Recording and then move the selection off of "Default."   Now Audacity will run even with ~/.asoundrc


I noticed that Comment #2 (from Simeon) looks helpful, but I don't have anything related to "jack" in my .asoundrc file.  My hunch is that Audacity can't handle certain types of items in .asoundrc.  I'll copy/paste my .asoundrc file [2].


[1] https://bugs.launchpad.net/ubuntu/+source/audacity/+bug/159671

[2] My .asoundrc file:

# Taken from:  http://www.thedigitalmachine.net/alsaequal.html

ctl.equal {
  type equal;
}

pcm.plugequal {
  type equal;
  # Modify the line below if you don't
  # want to use sound card 0.
  slave.pcm "plughw:0,0";
}

#pcm.equal {
  # Or if you want the equalizer to be your
  # default soundcard uncomment the following
  # line and comment the above line.
 pcm.!default {
  type plug;
  slave.pcm plugequal;
}
Comment 9 Eric F. GARIOUD 2010-07-31 16:16:59 UTC
(In reply to comment #3)
If this is still a problem in 1.3.12 (#312837), can
> reporters confirm that they are
> 1) using Jack
> 2) building Audacity with the jack use-flag
> 3) have set their .asoundrc to divert ALSA default output to Jack?

I confirm the systematic occurrence of this problem with 1.3.12
1/ Using Jack
And 2/ Building Audacity with the jack use-flag
And 3/ Diverting ALSA default output to Jack via /etc/asound.conf

Following my asound.conf :

pcm.!default {
    type plug
    slave { pcm "jack" }}
pcm.jackplug {
    type plug
    slave { pcm "jack" }}
pcm.jack {
    type jack
    playback_ports {
        0 alsa_pcm:playback_1
        1 alsa_pcm:playback_2 }
    capture_ports {
        0 alsa_pcm:capture_1
        1 alsa_pcm:capture_2}}
Comment 10 Tim Harder gentoo-dev 2011-08-23 19:04:51 UTC
Is this still an issue in 1.3.13?
Comment 11 Agostino Sarubbo gentoo-dev 2012-05-25 14:05:36 UTC
Audacity-1.3-14 will be removed ASAP, can you reproduce this bug with latest stable 2.0.0?
Comment 12 Agostino Sarubbo gentoo-dev 2012-05-30 11:53:24 UTC
No response since 2011-08-23 after Tim comment, close for now.