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

Audacity Bugzilla



Bug 1488 - Crash closing Run Benchmark after opening it by command-line argument
Crash closing Run Benchmark after opening it by command-line argument
Status: RESOLVED QUICKFIXED
Product: Audacity
Classification: Unclassified
Component: User Interface
2.1.3
Per OS All
: P3 Repeatable
Assigned To: Paul L
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-08-20 11:32 UTC by Gale Andrews
Modified: 2018-08-20 11:45 UTC (History)
5 users (show)

See Also:
Steps To Reproduce:
1 Launch Audacity from the terminal with the --test argument. This launches Audacity with "Run Benchmark" open, even if this is missing from the Help Menu, which it is if IS_ALPHA = 0. 2 Press the Close button, or run the Benchmark then Close. You may use the OS window close button instead. Audacity crashes. I can't get a stack trace from gdb because it says the stack is corrupted but it's a segfault "1 threads were not terminated by the application". 3 No crash if you use Run Benchmark from the Help menu.
Release Note:
GROUP: Interface * '''If you launch Audacity from the command-line with the --test argument to run a benchmark test, Audacity will crash on closing Run Benchmark.'''
First Git SHA:
Group: ---
Workaround:
Closed: 2018-08-20 00:00:00
gale: Regression+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gale Andrews 2016-08-20 11:32:14 UTC
Regression on 2.1.1.

Cannot test on Mac because you have to use the open -a command AFAIK and it rejects the /t or --test argument.
Comment 1 Paul L 2016-08-20 12:48:45 UTC
I can reproduce it on Mac, and also at commit e412c13e78959ac5d10f87396ddefdc6297bc38e, meaning my latest change to Benchmark.cpp, which was later, was not the cause.
Comment 2 Paul L 2016-08-20 13:16:41 UTC
git bisect narrows it to cfd7648fce2388ec8ae35b38004f2ae111c484af which was mine
Comment 3 Gale Andrews 2016-08-20 13:51:06 UTC
(In reply to Paul L from comment #1)
What syntax do you use on Mac, Paul, to attach an option like "test" to the command to launch Audacity? It should probably be documented, and we need to know to test the fix (I think I should have said "option", not "argument").
Comment 5 Paul L 2016-08-20 14:04:19 UTC
(In reply to Gale Andrews from comment #3)

If you type the path to Audacity.app into Terminal, append /Contents/MacOs/Audacity to it.  Then add the command-line arguments.
Comment 6 Gale Andrews 2016-08-23 18:20:38 UTC
Hi Paul,

So I did not use open -a on Mac and just did     

/Users/gale/Library/Developer/Xcode/DerivedData/Audacity-exmjrrrrzwdekwgmwfkgibbrzcop/Build/Products/Release/Audacity.app/Contents/MacOS/Audacity --test

The splash screen does not appear, which is odd. Clicking the Close button in Run Benchmark causes the crash trace given below. 

Audacity quits on Windows and Ubuntu too, on the latter with the same "1 threads were not terminated by the application" message. All builds are release configuration, all built today.

Run Benchmark from the Help menu is still OK (no crash on Close).

     
VM Regions Near 0x80331b18:
    mapped file            000000000d024000-000000000d071000 [  308K] r--/rwx SM=COW  /System/Library/Fonts/SFNSDisplay-Bold.otf
--> 
    __TEXT                 000000008febe000-000000008fef3000 [  212K] r-x/rwx SM=COW  /usr/lib/dyld

Application Specific Information:
abort() called

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x9a92b572 __pthread_kill + 10
1   libsystem_pthread.dylib       	0x90ae9654 pthread_kill + 101
2   libsystem_c.dylib             	0x91770c38 abort + 156
3   libwx_baseu_release-3.0.0.2.0.dylib	0x01bc4585 wxFatalSignalHandler + 37
4   libsystem_platform.dylib      	0x9367a79b _sigtramp + 43
5   ???                           	0xffffffff 0 + 4294967295
6   libwx_baseu_release-3.0.0.2.0.dylib	0x01bc4560 wxDoSetEnv(wxString const&, char const*) + 400
7   net.sourceforge.audacity      	0x00279218 std::tr1::_Sp_counted_base_impl<AudacityProject*, Destroyer<AudacityProject>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() + 24 (boost_shared_ptr.h:246)
8   net.sourceforge.audacity      	0x00277f40 std::vector<std::tr1::shared_ptr<AudacityProject> std::allocator<std::tr1::shared_ptr<AudacityProject> > >::~vector() + 64 (boost_shared_ptr.h:147)
9   libsystem_c.dylib             	0x9177197d __cxa_finalize_ranges + 318
10  libsystem_c.dylib             	0x91771a05 __cxa_finalize + 59
11  libsystem_c.dylib             	0x91771cfa exit + 62
12  net.sourceforge.audacity      	0x0000303d start + 61
Comment 7 Gale Andrews 2016-12-26 13:10:15 UTC
Paul believes that his fix for bug 1561 has removed the crash, which on testing on Windows 10, Sierra and Ubuntu 14.04, I agree to be the case. 

Audacity remains open and under full control after closing the Benchmark. Paul feels the correct behaviour is to exit Audacity, but that is not this bug.