1.3.12 hangs after reducing playback rate to minimum

Bug #608948 reported by jimav
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Audacity
Fix Released
Unknown
audacity (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: audacity

The terminal says:
  Libsamplerate only supports resampling factors
  between 1/12 and 12

and audacity hangs after moving the playback-speed slider to the far left (0.04) and clicking the green arrow.
Reproducible every time.

Audacity does not seem to crash (unlike an older bug at https://bugs.launchpad.net/ubuntu/+source/audacity/+bug/465899).
The window goes dim because the process apparently no longer responds to X events.

Note: At start-up (before provoking the bug), the terminal said:
Expression 'stream->capture.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3653

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: audacity 1.3.12-2
ProcVersionSignature: Ubuntu 2.6.32-23.37-generic 2.6.32.15+drm33.5
Uname: Linux 2.6.32-23-generic x86_64
AlsaCards:
 0 [Intel ]: HDA-Intel - HDA Intel
                       HDA Intel at 0xfbaf8000 irq 22
  1 [HDMI ]: HDA-Intel - HDA ATI HDMI
                       HDA ATI HDMI at 0xfbbfc000 irq 34
Architecture: amd64
Date: Thu Jul 22 15:27:43 2010
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: audacity

Related branches

Revision history for this message
jimav (james-avera) wrote :
Revision history for this message
Benjamin Drung (bdrung) wrote :

Can you reproduces this behaviour with audacity from the daily PPA [1]?

[1] https://launchpad.net/~audacity-team/+archive/daily

Revision history for this message
jimav (james-avera) wrote :

Yes, it hangs just the same in the daily build (I tried version 1.3.13-alpha-Jul 22 2010).

Benjamin Drung (bdrung)
Changed in audacity (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
In , Benjamin Drung (bdrung) wrote :

The terminal says:
  Libsamplerate only supports resampling factors
  between 1/12 and 12

and audacity hangs after moving the playback-speed slider to the far left
(0.04) and clicking the green arrow.
Reproducible every time.

Audacity does not seem to crash (unlike an older bug at
https://bugs.launchpad.net/ubuntu/+source/audacity/+bug/465899).
The window goes dim because the process apparently no longer responds to X
events.

Note: At start-up (before provoking the bug), the terminal said:
Expression 'stream->capture.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c',
line: 3653

The bug was initial reported on Launchpad and confirmed by me:
https://launchpad.net/bugs/608948

Revision history for this message
In , Gale (gale) wrote :

In SVN HEAD on Ubuntu 10.04 configuring --with-libsamplerate and playing at
0.08 or below I can reproduce the "Libsamplerate only supports resampling
factors between 1/12 and 12" message. This is then always followed for me by a
segmentation fault and Audacity disappears. My libsamplerate is v0.1.7-3 as
already installed on the system. Disabling/enabling Pulse doesn't stop the
crash.

Another user recently reported the same issue (but a freeze not a crash) in
"1.3.12-beta (Unicode) Packaged for Debian Squeeze amd64 / x86_64, Kernel
2.6.33.2".

As there are no reports of this elsewhere than in Audacity, and libsamplerate
is supposed to support resampling between 1/256 and 256 x, I assume it is an
Audacity problem. Assumed a P3 would cover it given libresample is optional
(even though I understand Debian/Ubuntu now use libresample in packages).

Revision history for this message
In , Gale (gale) wrote :

(In reply to comment #1)
> Assumed a P3 would cover it given libresample is optional
>(even though I understand Debian/Ubuntu now use libresample in packages).
Sorry for confusion, but as (most of) the report stated, the problem is in the
optional libsamplerate library (which Ubuntu chooses to use). The libresample
library which is the Audacity default does not have this issue. Now clarified.

Revision history for this message
In , Ashton Kemerling (ashtonkemerling) wrote :

Ubuntu is talking about moving to libresample currently. Maybe it would be
appropriate to move this down to P4, since we libresample is preferred (and
default) over libsamplerate due to licensing issues.

That and Steve has suggested on -devel that a work around would be limiting
transcription speeds to within the range that libsamplerate uses to ensure
stability, if libsamplerate is present.

Revision history for this message
In , Ashton Kemerling (ashtonkemerling) wrote :

Created an attachment (id=75)
Erik de Catro Lopo's patch

Patch submitted by Erik de Castro Lopo to -devel to solve libsamplerate
crashing at lower transcription rates.

I have not had a chance to test this yet.

Revision history for this message
In , Mchinen (mchinen) wrote :

Note: I haven't tested anything, but I saw something to lookout for with the
patch.
The patch doesn't address the crash issue directly, but will presumably let the
playbackspeed get even lower. As Erik says in his post the crash is caused by
us - his patch just gets the ratio boundaries using the correct lib functions.
It should fix most cases since the minimum slider value is 0.01, and the patch
allows down to 1/256.
But if you have a track at a high sample rate with a project audio rate at a
lower sample rate and have the playback speed at a low value it may trigger
this crash depending on how we use the concatenate ratios.

Revision history for this message
In , Gale (gale) wrote :

(In reply to comment #3)
> Ubuntu is talking about moving to libresample currently. Maybe it would be
> appropriate to move this down to P4, since we libresample is preferred (and
> default) over libsamplerate due to licensing issues.
>
> Steve has suggested on -devel that a work around would be limiting
> transcription speeds to within the range that libsamplerate uses to
> ensure stability, if libsamplerate is present.
I'm -1 on demoting and -1 on limiting the slider. There are circa 5 reports a
month of this from users of distro-packaged versions of Audacity, so I assume
speeds of 0.08 or lower are used. As Erik has confirmed, libsamplerate supports
between 1/256 and 256 x, the limitation is in Audacity with libsamplerate.

Thx for adding the patch (don't forget to add the "patch" keyword - I've done
that).

Revision history for this message
In , Benjamin Drung (bdrung) wrote :

Created an attachment (id=80)
libsamplerate.diff

I have tested Erik's patch and found out that his condition needs to be
inverted. With the corrected condition (patch attached), Audacity will newer
run into this if-branch (tested with pulling the slider to the minimum and
maximum) with libsamplerate. Please apply this patch. It will use the correct
library function and work around the bug. The patch adds a FIXME comment for
finding the cause of the hang.

Revision history for this message
In , Gale (gale) wrote :

(In reply to comment #7)
I tested the patch on Ubuntu 10.10 and it fixes another problem Steve mentioned
in bug 287 - there is a crash resampling or mixing a 192000 Hz tone to 8000 Hz
because this requires a resampling below 1/12. If the patch is correct I'm +1
on applying it. This would have been a P2 but for the fact that libsamplerate
is not default.

Changed in audacity:
status: Unknown → Confirmed
Revision history for this message
In , Vaughan-audacityteam (vaughan-audacityteam) wrote :

(In reply to comment #8)

Went ahead and committed Benjamin's latest patch. Looks correct, although
partial, per the FIXME comment.

Gale's comment #8 seems it does fix the crash, so changing status. Please
re-open if I misunderstood.

Revision history for this message
In , Gale (gale) wrote :

> Gale's comment #8 seems it does fix the crash
Yes it still works in HEAD, so changed to RESOLVED-FIXED.

The hang/crash if you exceed libsamplerate's limits is now at bug 333.

Changed in audacity:
status: Confirmed → Fix Released
Revision history for this message
Benjamin Drung (bdrung) wrote :

This bug will be fixed in audacity 1.3.13.

Changed in audacity (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package audacity - 1.3.13-1ubuntu1

---------------
audacity (1.3.13-1ubuntu1) natty; urgency=low

  * Merge from Debian unstable (LP: #759314). Remaining changes:
    - Build against libmp3lame.

audacity (1.3.13-1) unstable; urgency=low

  * New upstream release (LP: #608948, #690226, #694778, #713584, #753323).
  * Drop 13 upstream applied patches.
  * Refresh disable dynamic loading patches.
  * Drop configure.patch and run ./autogen.sh on build time instead.
  * Use local sbsms due to an API change.
 -- Benjamin Drung <email address hidden> Wed, 13 Apr 2011 02:00:19 +0200

Changed in audacity (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.