Page 1 of 1

Return empty array from Nyquist prompt: infinite loop

Posted: Sun Apr 21, 2013 5:09 pm
by Paul L
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.

Re: Return empty array from Nyquist prompt: infinite loop

Posted: Mon Apr 22, 2013 4:51 pm
by steve
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).