Scanning plugins timer re-entrancy


#1

I’ve been investigating a heap corruption when scanning certain plugins and it looks like what is happening is that during the initialisation (e.g. VSTPluginInstance::constructEffect), they’re doing something to dispatch the message loop.

This means that the PluginListComponent::timerCallback gets called again even though it is already sitting in it which leads to starting a new scan during construction of the old one and hence the world implodes…

I think a simple re-entrancy check could help here and I don’t think this would affect things if the scan is happening on multiple threads…
juce_scanning.patch (970 Bytes)

Is this a logical addition?