Bugzilla – Bug 497
Audacity crashes if Nyquist returns an array of one sound
Last modified: 2018-08-20 11:51:35 UTC
If Nyquist returns an array with one element that is a sound, Audacity crashes (segmentation fault). Example: The one line code below creates an array (vector) containing a sine wave at MIDI pitch 60 (osc 60): (vector (osc 60)) Only tested on Linux but probably applies to all platforms.
Yes, crashes Win and Mac too.
Created attachment 252 [details] throws error on single audio channel in vector
Patch only tested on Linux but I think it should be OK for other platforms.
Confirmed on Win 7 I get the message box instead of crash when running (vector (osc 60)) from the OK or Debug buttons. Though it should probably be "wxCENTER" per US English policy.
(In reply to comment #4) > Though it should probably be "wxCENTER" per US English policy. In the wxWidgets documentation it is "wcxCENTRE" though I see that both this and "wxCENTER" are used throughout the Audacity code. http://docs.wxwidgets.org/trunk/classwx_multi_choice_dialog.html As for which is correct I'm not qualified to say, but if in doubt it seems safest to go with the documentation.
(In reply to comment #5) >> Though it should probably be "wxCENTER" per US English policy. > > In the wxWidgets documentation it is "wcxCENTRE" though I see that both this > and "wxCENTER" are used throughout the Audacity code. > http://docs.wxwidgets.org/trunk/classwx_multi_choice_dialog.html > > As for which is correct I'm not qualified to say, but if in doubt it seems > safest to go with the documentation. > They are functionally identical, so neither is safer. It's important to be consistently US English only in stuff we present to users, i.e., GUI, website, manual, etc. The source code itself has been mixed for a long time, depending on who wrote it.
(In reply to comment #6) The patch has been ready for 5 weeks. Any problems with it?
The current patch reports: $ patch -p 0 < bug497.patch patching file src/effects/nyquist/Nyquist.cpp Hunk #1 succeeded at 917 (offset 77 lines). patching file lib-src/libnyquist/nyx.c Hunk #1 succeeded at 881 (offset 6 lines). It still works on Linux but if it fails on other platforms the patch may need to be applied manually to work around the line offsets.
Committed with some cleanup to the error message in revision 11786.
RESOLVED - FIXED. Error message occurs on all three platforms.