Memory leak when exporting in MP3 format

• Oct 17, 2018 - 00:28
Reported version
2.3
Type
Functional
Severity
S4 - Minor
Status
duplicate
Regression
No
Workaround
No
Project

When repeatedly exporting an MP3s of several different MuseScore files. I noticed that the memory used by MuseScore increased with each export. The memory used increased while the export was active but failed to return to the previous value after each export.

This came to my attention when MuseScore crashed twice as I was performing the exports. There were several exports between crashes. The Windows Task Manager shows an increase of around 200,000 K after each export completes. The size of the MuseScore file didn't seem to have a significant effect on the amount of memory leaked. It was about the same for a large 90 kB MuseScore file with 205 measures in 6 staffs and with a small 26 kB MSCZ file with 4 staffs and 52 measures.


Comments

It certainly looks similar to #276356. I first noticed that memory was leaking when I experienced two crashes in the course of my performing MP3 exports. I continued my exporting but watched the amount of available memory on my computer and restarted MuseScore when memory got low. I had no more MuseScore crashes even though I continued performing exports.

I tried exporting as OGG and got roughly the same amount of private memory that wasn't restored on completion of the export -- 200kB. Certainly the title on this (#277225) issue should be changed to include OGG. I suspect that it should be merged with #276356. I leave the merging/re-titling up to the experts.

in master I see an increase by about 200k during export, but only less than 10k of that is left after, less than 40k after 6 exports and growing even slower after that. So yes, there seems to still be a memory leak, but much smaller that reported for 2.3.2.