View Issue Details
|ID||Category||Date Submitted||Last Update|
|0007061||bugs||2016-10-05 04:57||2020-04-19 20:18|
|Reproducibility||have not tried|
|Product Version||5.X git (version in description)|
|Fixed in Version|
|Summary||0007061: memory leak in TempoTrack::findMeter|
|Description||int TempoTrack::findMeter() leaks dbf array|
|Additional Information||Found this with cppcheck. Appears to be a simple leak, but I'm not sure if this code is still used. I couldn't immediately figure out how to exercise it. There is also a TempoTrackV2 class, and now that vamp support is here - I was unsure if we should have three versions of this QM plugin laying around.|
|Tags||No tags attached.|
Do you have more information from cppcheck where the leak is?
The qm-dsp library in Ardour's source is out-dated. Ideally it should be updated to new upstream https://code.soundsoftware.ac.uk/projects/qm-dsp which hopefully does not have this issue anymore.
The good news is that the code in question is indeed not currently used. The only code still using qm-dsp in Ardour itself is qm-onsetdetector (also an ancient copy of http://vamp-plugins.org/plugin-doc/qm-vamp-plugins.html) which does not track tempo.
Then again, since it's now possible to run VAMP plugins from a Lua-script, bundling updated vamp-plugins cross-platform has higher priority..
I left it out because cppcheck simply says where it goes out of scope, (like 548). In this case the fix is trivial:
diff --git a/libs/qm-dsp/dsp/tempotracking/TempoTrack.cpp b/libs/qm-dsp/dsp/tempotracking/TempoTrack.cpp
index c36385f..766522f 100644
@@ -545,6 +545,7 @@ int TempoTrack::findMeter(double *ACF, unsigned int len, double period)
+ delete dbf;
However I suspect the code could probably be removed entirely.
It looks like the code is unchanged upstream:
Better to fix it there if necessary first IMO.
||applied patch sent out-of-band via email.|
Issue has been closed automatically, by Trigger Close Plugin.
Feel free to re-open with additional information if you think the issue is not resolved.
|2016-10-05 04:57||nstewart||New Issue|
|2016-10-05 09:50||x42||Note Added: 0018771|
|2016-10-05 11:19||nstewart||Note Added: 0018772|
|2016-10-05 12:39||timbyr||Note Added: 0018773|
|2016-10-12 21:45||paul||Note Added: 0018794|
|2016-10-12 21:45||paul||Status||new => resolved|
|2016-10-12 21:45||paul||Resolution||open => fixed|
|2016-10-12 21:45||paul||Assigned To||=> paul|
|2020-04-19 20:18||system||Note Added: 0023659|
|2020-04-19 20:18||system||Status||resolved => closed|