Audacity crashes at startup when jack is running

Bug #159671 reported by Matthew Koyle on 2007-11-03
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
audacity (Ubuntu)
Low
Unassigned

Bug Description

Binary package hint: audacity

In AMD64 up-to-date gutsy, audacity crashes at startup when qjackctl / jackd is running (it executes normally if jack is not running).

It goes off with an error:

***MEMORY-ERROR***: audacity[6644]: GSlice: failed to allocate 496 bytes (alignment: 512): Cannot allocate memory

Program received signal SIGABRT, Aborted.

Matthew Koyle (mgkoyle) wrote :
description: updated
description: updated
Emmet Hikory (persia) wrote :

In which locale are you running Audacity? It looks like this is an error when trying to draw the menu item, and the apparent relation to JACK vs. not JACK is coincidental.

Changed in audacity:
status: New → Incomplete
Matthew Koyle (mgkoyle) wrote :

I just can't believe that the failure to load when jack is running 100% of the time and success after closing jack just a few seconds later is a coincidence. I happen to have installed the ubuntustudio packages and as for locale:

matthew@Abish:~$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Emmet Hikory (persia) wrote :

Thanks for the additional testing. Based on your experience, I'll simply say that I can't replicate the issue locally, even with en_US.UTF-8 on AMD64. On the other hand, I've not enabled the ubuntustudio repository, which may or may not be related.

Changed in audacity:
status: Incomplete → New
Matthew Koyle (mgkoyle) wrote :

I appreciate any help... I know that audacity did not interface with jack at all before; it is nice to see these things shaping together.

--Matthew

Matthew Koyle (mgkoyle) wrote :

It executes normally with qjackctl open (but stopped). If I close audacity, start jack, and run audacity again from a terminal I get:

JACK tmpdir identified as [/dev/shm]
Enhanced3DNow! detected
SSE2 detected

(audacity:6763): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: failed to map segment from shared object: Resource temporarily unavailable

(audacity:6763): Pango-WARNING **: Failed to load Pango module '/usr/lib/pango/1.6.0/modules/pango-basic-fc.so' for id 'BasicScriptEngineFc'

(audacity:6763): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: failed to map segment from shared object: Resource temporarily unavailable

(audacity:6763): Pango-WARNING **: pango_shape called with bad font, expect ugly output

(audacity:6763): Pango-WARNING **: pango_font_get_glyph_extents called with null font argument, expect ugly output

theluddite (matt-aggus) wrote :

Exact same problem here. When I run audacity with the jack server run, audacity crashes on startup and crashes jack. I get this:

JACK tmpdir identified as [/dev/shm]
SSE2 detected
Expression 'ioctl( component->fd, SNDCTL_DSP_SETFRAGMENT, &frgmt )' failed in 'src/hostapi/oss/pa_unix_oss.c', line: 1021
Expression 'PaOssStreamComponent_Configure( component, sampleRate, framesPerBuffer, StreamMode_Out, master )' failed in 'src/hostapi/oss/pa_unix_oss.c', line: 1131
Expression 'PaOssStream_Configure( stream, sampleRate, framesPerBuffer, &inLatency, &outLatency )' failed in 'src/hostapi/oss/pa_unix_oss.c', line: 1228

(audacity:6517): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: failed to map segment from shared object: Resource temporarily unavailable

(audacity:6517): Pango-WARNING **: Failed to load Pango module '/usr/lib/pango/1.6.0/modules/pango-basic-fc.so' for id 'BasicScriptEngineFc'

(audacity:6517): Pango-WARNING **: /usr/lib/pango/1.6.0/modules/pango-basic-fc.so: failed to map segment from shared object: Resource temporarily unavailable

(audacity:6517): Pango-WARNING **: pango_shape called with bad font, expect ugly output

(audacity:6517): Pango-WARNING **: pango_font_get_glyph_extents called with null font argument, expect ugly output
Segmentation fault (core dumped)

Any solutions? I'd like to be able to use audacity with jack.

Daniel T Chen (crimsun) wrote :

Targeted for 9.04.

Changed in audacity:
importance: Undecided → Low
status: New → Confirmed
Petr Gladkikh (petrglad) wrote :

This problem affects me too.
My reproduction: 1. start jackctl (that starts jack server); 2. Start audacity; 3. Audacity and jackd crash
Environment: Ubuntu - 9.04 32bit, Audacity - 1.3.7-2ubuntu1, jackd - 0.1160.116.1-3ubuntu3
Console output:

...$ audacity
Expression 'ioctl( devHandle, SNDCTL_DSP_CHANNELS, &temp )' failed in 'src/hostapi/oss/pa_unix_oss.c', line: 405
Expression 'err != ETIMEDOUT' failed in 'src/hostapi/jack/pa_jack.c', line: 1009
Expression 'result' failed in 'src/hostapi/jack/pa_jack.c', line: 1029
Expression 'AddStream( stream )' failed in 'src/hostapi/jack/pa_jack.c', line: 1305
Expression 'err != ETIMEDOUT' failed in 'src/hostapi/jack/pa_jack.c', line: 1009
Expression 'result' failed in 'src/hostapi/jack/pa_jack.c', line: 1029
Expression 'AddStream( stream )' failed in 'src/hostapi/jack/pa_jack.c', line: 1305
Segmentation fault

Petr Gladkikh (petrglad) wrote :

Correction: my jackd version is 0.116.1-3ubuntu

I also have installed aduacity-dbg package and there is now additional message about failed assertion in console output:

..$ audacity
Expression 'ioctl( devHandle, SNDCTL_DSP_CHANNELS, &temp )' failed in 'src/hostapi/oss/pa_unix_oss.c', line: 405
Expression 'err != ETIMEDOUT' failed in 'src/hostapi/jack/pa_jack.c', line: 1009
Expression 'result' failed in 'src/hostapi/jack/pa_jack.c', line: 1029
Expression 'AddStream( stream )' failed in 'src/hostapi/jack/pa_jack.c', line: 1305
Expression 'err != ETIMEDOUT' failed in 'src/hostapi/jack/pa_jack.c', line: 1009
Expression 'result' failed in 'src/hostapi/jack/pa_jack.c', line: 1029
Expression 'AddStream( stream )' failed in 'src/hostapi/jack/pa_jack.c', line: 1305
audacity: src/hostapi/jack/pa_jack.c:1532: JackCallback: Assertion `err == 16' failed.
Aborted

Petr Gladkikh (petrglad) wrote :

Seems that pa_jack.c file is from portaudio library. So here are versions of my portaudio library:

libportaudio0 18.1-7.1 Portable audio I/O - shared library
libportaudio2 19+svn20071207-0ubuntu7 Portable audio I/O - shared library

Benjamin Drung (bdrung) wrote :

audacity uses it's own patches copy of portaudio.

Can you reproduce the bug with audacity 1.3.9? You can either try Ubuntu 9.10 (karmic) or you grab the package from my backports PPA: https://launchpad.net/~bdrung/+archive/backports

On Sat, Oct 10, 2009 at 11:00 PM, Benjamin Drung
<email address hidden> wrote:
> audacity uses it's own patches copy of portaudio.
>
> Can you reproduce the bug with audacity 1.3.9? You can either try Ubuntu
> 9.10 (karmic) or you grab the package from my backports PPA:
> https://launchpad.net/~bdrung/+archive/backports
>

I have nstalled audacity from your PPA. 2 scenarios:

1. First start audacity then start jackd.
Audacity and jackd are running. During recording in audacity audio
cursor jerks at the beginning of audio snippet and then (sometimes)
following message is shown:
"""Latency Correction setting has caused the recorded audio to be
hidden before zero. Audacity has brought it back to start at zero. You
may have to use the Time Shift Tool (<---> or F5) to drag the track to
the right place."""
So I can not record any sound (without started jackd it works)

2. First start jackd then start audacity.
Jackd dies right after audacity is started audacity is still running.
After audacity is closed assertion failed is reported. Console output
is

$ audacity
Expression 'ioctl( devHandle, SNDCTL_DSP_CHANNELS, &temp )' failed in
'src/hostapi/oss/pa_unix_oss.c', line: 405
audacity: src/hostapi/jack/pa_jack.c:813: Terminate: Assertion `aErr_
== 0' failed.
Aborted

--
Petr Gladkikh

Petr Gladkikh (petrglad) wrote :

I tried to start jackd from command line and it turns out that jackd is still running for a while after audacity is started but continuously reports xruns and then gets killed: "jackd watchdog: timeout - killing jackd".

Console output
$ jackd --verbose --realtime -d alsa >jack-output.txt
no message buffer overruns
server `default' registered
jackd watchdog: timeout - killing jackd

Jackd's output is in attachement.

gilzad (gilli4) wrote :

On Ubuntu Studio 9.04 (32Bit) on an Intel 2x2GHz machine I'm having similar problems (lots of xruns, audacity not coming up), if I start jackd in realtime mode. (As a side note: pulseaudio with module-jack also can't use jack, if jackd is started with the "--realtime" parameter.)

If I start jack like this...

jackd -Z -P89 -dalsa -n4
(nozombies, priority:89, periods:4)

..then Audacity will start and successfully playback through jack.
My parameters don't mean much to this issue here, except that I'm using "-P89" instead of "--realtime".

Another program that I use (Renoise) can connect and playback through jack, even if jackd is started with "--realtime".

raketenman (sesselastronaut) wrote :

starting audacity with jack already running audacity fails with this message:
audacity: pcm_plug.c:388: snd_pcm_plug_change_channels: Assertion `snd_pcm_format_linear(slv->format)' failed.
Aborted

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers