Bugzilla – Bug 822
Memory leak and orphan block files when paste causes cutlines to disappear
Last modified: 2018-08-20 11:45:30 UTC
Created attachment 545 [details] Fixes bug 822, a memory leak when pasting into a wave track
Not sure of a rating. Reading from "a leak can happen" and "determine whether there is a leak", should this be called Moonphase? Do we mean a cut line (as turned on in Tracks Preferences) or split line or both? Are the orphan block files also moonphase?
We have lots of memory leaks. They are embarrassing. They don't need release noting, so I'm setting this one to a P4. The orphan block file can cause further problems, but the fact orphans can cause serious problems is not this bug and is reported elsewhere.
"Moonphase" means a bug that is intermittent? But I think this bug would happen consistently following the steps.
Testing on Linux (Debian). Following the steps to reproduce, I don't get "an orphan blocks warning".
(In reply to comment #5) Steve wrote: > Testing on Linux (Debian). > > Following the steps to reproduce, I don't get "an orphan blocks warning". Testing on Windows XP (virtual machine) I don't get orphan blocks warning.
Sorry, I amended steps to reproduce. Do save before exiting. Then restart and reopen the file. Saving was not necessary to see the evidence of memory leak in the debugger, as I originally described this bug.
(In reply to comment #7) Following the amended steps I get one orphan blockfile, using 2.1.0-alpha Jan 13 2105 on Mac OS X 10.9.4.
(In reply to comment #7) I see the error with the updated steps. Could it be fixed by adding: WX_CLEAR_ARRAY(cuts) at line 736 in WaveTrack.cpp?
Yes, that, or the patch I supplied. I did not know that macro and instead wrote the obvious delete loop.
Fixing the memory leak is easy. But consider this. Would it make sense to allow zero-length wave clips? Then it would not be necessary to delete any cutlines. New clips could be created so that cutlines, falling in the gap left by a paste shorter than selection, would not have to be orphaned. More trouble than it is worth perhaps.
Fixed by: https://github.com/audacity/audacity/commit/d37a730f56b94ae4022357de166b0cdf96acb4af
(In reply to Paul L from comment #12) Tested on 2.2.1 alpha Audacity2.2.1JC5Nov2017 and on the released 2.2.0 I neither case did I get orphans Checked too on Mac with latest alpha and 2.2.0 - mo orphans there either. So I will close this bug as RESOLVED