Hi,
I’m experiencing a crash during the destruction of my plugin UI which uses a juce::VideoComponent. The crash seems to only happen on Windows, and only in debug mode.
When the plugin UI is destructed the crash occurs at this line. It appears that currentPeer is dangling (it’s already been destroyed, but the currentPeer != nullptr check still passes).
This crash doesn’t occur if I run my plugin as a standalone, or if I run the plugin in release mode. So it seems to be some type of race condition.
I believe this commit introduced the issue. Previously there would be no valid ComponentPeers when the VideoComponent::Pimpl destructor was run, but now a pointer is used to track the ComponentPeer instead.
The crash doesn’t occur if I make the following modification:
if (currentPeer != nullptr && ComponentPeer::isValidPeer(currentPeer))
currentPeer->removeScaleFactorListener (this);
Would it be possible to get the above change made?
