I’m using plugin directory scanner but I’m running into an issue. something that I found is also happening to the juce demos scanner. when running the “pluginDirectoryScanner”. The memory of the application slowly increases until the application crashes. When scanning small number of plugins this is ok. but if you scan a lot of plugins its not useable. I’m running the scanner in a separate process and the scanner is being triggered by a timer that calls “scanNextFile” so I can keep the scanner on the main thread as running the scanner on a separate thread cause it to crash. there must be a better way to simply scan for plugins… or at least reset something so I can break the scan down into multiple chunks. but I have no idea what is causing the memory usage. at the basic level its the “pluginDirectoryScanner” class itself causing it. No amount of deleting or resetting helps the memory issue. anyone else have a sure fire way to scan alot of plugins. would apreciate it alot if someone could help. Ive looked at the audio plugin host demo and the hostplugindemos and they all do the same.
The AudioPluginHost has an out-of-process scanning mode which sounds similar to what you’re building. You can switch on out-of-process mode using the dropdown in the plugin list window before starting a scan.
- When you try the out-of-process mode in the AudioPluginHost, do you see the same memory usage pattern there too? If not, this would suggest that the issue is specific to your program.
- Do you know for certain whether the crash you’re seeing is due to running out of memory? Sometimes plugins crash during scanning. If the scan always crashes on the same plugin(s), consider scanning those in isolation to see whether they still crash when total memory usage is lower.
- What plugin formats are you scanning, and on what platform? VST3 plugins are cached after loading, but other formats are not. If the scanner is loading hundreds of different VST3s, then perhaps this cache is growing too large. I’ve never seen this myself, but perhaps I don’t have enoughs VST3s installed for this to cause any problems…
I have created separate application for the scan. so its not the same as the AudioPluginHost that scans out of process. but it is a separate process technically. The crash definitely happens due to a large number plugins. I am indeed just scanning VST3 plugins. I have the entire waves set. all of the Plugin Alliance plugins and many more. probably over 2000 plugins. The scanner reaches about 2gb in memory and then stops. I think you may be on to something with the vst3 cache. is there any way to clear that ? would be a pretty simple fix if so…
