Memory leaks in Nyquist or the Lisp environment?
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Re: Memory leaks in Nyquist or the Lisp environment?
Perhaps a different pronlem. You add many one samples sounds but they have the same time extent, not disjoint.
Re: Memory leaks in Nyquist or the Lisp environment?
Hi Paul. Did you get any further isolating this memory leak or working round it?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
Re: Memory leaks in Nyquist or the Lisp environment?
I found ways to work around it. Roger agreed there was a bug to fix there, in case of adding of sounds with domains that touch without overlapping, but I haven't heard more from him.
Now I concatenate a sequence of sounds by using snd-fromobject and an object that calls snd-fetch repeatedly on each. Sounds like doing more work in Lisp than I should, but it works.
But I am not using this technique on my current project of interest, that de-clicker which shows a lot of promise without relying on my other speech segmentation experiments.
Now I concatenate a sequence of sounds by using snd-fromobject and an object that calls snd-fetch repeatedly on each. Sounds like doing more work in Lisp than I should, but it works.
But I am not using this technique on my current project of interest, that de-clicker which shows a lot of promise without relying on my other speech segmentation experiments.
Re: Memory leaks in Nyquist or the Lisp environment?
Does this demonstrate the same problem that you had:
Code: Select all
;; Generate 10 minutes of silence
;; Memory usage goes up and stays up after completion.
(let ((mysound (abs-env (s-rest 0.1)))
(output (s-rest 0)))
(dotimes (i 6000 output)
(setf output
(sim output
(at-abs (* 0.1 i) (cue mysound))))))
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
Re: Memory leaks in Nyquist or the Lisp environment?
I take your word that you observed great memory usage. Yes, it seems a similar problem.
I was also using tiny "sounds" of one sample only as summands, which may or may not be essential to the problem. Perhaps not, if this demonstrates the same problem.
I was also using tiny "sounds" of one sample only as summands, which may or may not be essential to the problem. Perhaps not, if this demonstrates the same problem.
Re: Memory leaks in Nyquist or the Lisp environment?
Memory usage with that code is not massive, but much bigger than it should be, and importantly it is not released when the code completes.Paul L wrote:I take your word that you observed great memory usage.
A simple workaround for this example is to add an initial silence starting at t0, with a duration equal or greater than the expected output. All subsequent additions will then overlap this "dummy" silence in the time domain and the memory leak does not occur.
I'd like to get this bug on the Audacity bug tracking system so that it is tracked and not forgotten about. Is there anything that you'd like to add or clarify before I do?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
Re: Memory leaks in Nyquist or the Lisp environment?
I think we have described the essentials of the problem. I have nothing to add.
Re: Memory leaks in Nyquist or the Lisp environment?
I had a hypothesis about the cause of this memory leak, but it's not correct. I never hit the relevant code in the debugger with your example.
Re: Memory leaks in Nyquist or the Lisp environment?
That's a stack overflow. Different problem.steve wrote:Thanks for the update Paul.
Probably related, I found that the following code causes a crash:Code: Select all
(do ((i 0 (1+ i))) ((= i 100000) s) (setf s (sum s (snd-const 0 0 *sound-srate* 1))))