Return empty array from Nyquist prompt: infinite loop

Help for Audacity on Windows.
Forum rules
ImageThis forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Post Reply
Paul L
Posts: 1782
Joined: Mon Mar 11, 2013 7:37 pm
Operating System: Please select

Return empty array from Nyquist prompt: infinite loop

Post by Paul L » Sun Apr 21, 2013 5:09 pm

Go to Nyquist prompt. Type

Code: Select all

(vector)
Audacity.exe spins without consuming more memory. I have to kill it.

Does not happen if I type

Code: Select all

(vector 1)
Version 2.0.3 on Windows 7.

steve
Site Admin
Posts: 80751
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Return empty array from Nyquist prompt: infinite loop

Post by steve » Mon Apr 22, 2013 4:51 pm

It would probably be better if Audacity did not get caught in a loop, but the real "bug" here is in "your" code. As a Nyquist programmer you should avoid writing code that crashes or freezes.

The problem is that Audacity does not sanitize data returned from Nyquist plug-ins - it is assumed that the Nyquist programmer will not write plug-ins that return nonsensical data (such as empty arrays or negative sample rates).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply