Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 182 - Crash playing/freeze removing large number of tracks
Crash playing/freeze removing large number of tracks
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: Audio IO
1.3.12
PC Windows and Linux
: P4 Repeatable
Assigned To: Default Assignee for New Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-21 17:38 UTC by Steve Daulton
Modified: 2018-08-20 11:51 UTC (History)
3 users (show)

See Also:
Steps To Reproduce:
Create a project with over 50 stereo tracks, Press Play, Audacity closes.
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed: 2018-08-20 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Daulton 2010-07-21 17:38:32 UTC
Tested on Ubuntu 9.04 with Audacity 1.3.12 and 1.3.13 SVN.

Projects with too many tracks (over 50 stereo tracks or 100 mono tracks) will crash on pressing play.

From Terminal window:
On Launching Audacity;

Expression 'stream->capture.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3653


When Audacity crashes;

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted
Comment 1 Gale Andrews 2010-07-22 06:31:09 UTC
Confirmed on Ubuntu 10.04 playing 128 mono tracks, each 10 seconds long. 64 mono tracks of 10 seconds long sometimes does the same. Also selecting 100 of the tracks then Tracks > Remove Tracks causes a replicable freeze.   

On Windows 7, playing 64 mono tracks 10 seconds long doesn't seem to cause a problem. Playing 128 mono tracks causes an exception error dialogue, then pressing "Retry" causes a crash [1]. Pressing "Ignore" means that Play button then does nothing and does not stay depressed, though the app remains responsive. Removing 100 tracks via "Remove Tracks" causes no problem. 

Changing playback device doesn't change anything for me on either OS.

Anyone want to test on Mac? 

I'm thinking of P4 at the moment - how many people want or should expect to work with this many tracks? Do people need it for piecing together .au files from broken projects? 

Note that just "opening" projects with large numbers of tracks was addressed by Al in http://code.google.com/p/audacity/source/detail?r=10413 

but I have not tested that extensively. 

[1]
  Problem Event Name:	APPCRASH
  Application Name:	audacity.exe
  Application Version:	1.3.13.0
  Application Timestamp:	4c45340f
  Fault Module Name:	wxbase28u_vc_custom.dll
  Fault Module Version:	2.8.11.0
  Fault Module Timestamp:	4bf987ff
  Exception Code:	c0000005
  Exception Offset:	0001bf63
  OS Version:	6.1.7600.2.0.0.256.1
  Locale ID:	2057
  Additional Information 1:	0a9e
  Additional Information 2:	0a9e372d3b4ad19135b953a78882e789
  Additional Information 3:	0a9e
  Additional Information 4:	0a9e372d3b4ad19135b953a78882e789
 

NB:
[Expression 'stream->capture.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c',
line: 3653] on opening is normal. Most Linux apps I have launched from the command line on Ubuntu give some such error on launch.]
Comment 2 Steve Daulton 2010-07-22 12:53:06 UTC
(In reply to comment #1)
The problem also occurs on Windows XP. Swap file usage rises to 100% and then Audacity (not surprisingly) crashes. Is there a more elegant way that Audacity could stop when it runs out of memory?
Comment 3 Ashton Kemerling 2010-08-02 15:48:51 UTC
I have a report here in feedback indicating that a user is having an unhandled exception when trying to *record* too many tracks, around 30 or so. I sent an email back to verify that the exception happens during recording, and not during playback. 

Stats were:

Audacity 1.3.12 (Beta)
Windows 7 Professional, 64-bit

Steps to reproduce:
1. Open audacity
2. Keep recording additional tracks
3. Audacity eventually generates unhandled exception
Comment 4 Gale Andrews 2010-08-02 17:50:52 UTC
I assume once the limit is reached for the number of tracks that can exist if playing or recording any track, this exception will occur. This limit isn't prescriptive though - on a similar system to the user in Comment 3 but only 1 GB RAM, I can play 64 tracks (or have 63 open and record another one). My limit seems to come with about 80 tracks.
Comment 5 Michael Chinen 2010-12-24 08:26:00 UTC
Patch by Rick Yorgason fixes this.  I modified it to use linear playback buffer size.  Commited in r10826
Comment 6 Gale Andrews 2011-06-10 23:25:06 UTC
Finally tested this with 64 stereo tracks in Win 7 x64 and Ubuntu 10.10. Tried playing all tracks, playing two tracks soloed, then recording overdub with those two tracks. No exception error or crash. 

Slow response seen to Play, Stop and Record commands and in meter drawing. Understood from previous discussions that this could be tweakable so added at 
bug 413.