Posting to a new topic rather than extending this older related topic
To recap, my VST3 users are reporting crashes when exporting media in Adobe Premiere Pro (tested with 15.2.0 on Win, using JUCE 6.0.5). I tracked it down to the editor fetching meter values from a deleted processor. When I load a debug version and run in VS debugger, the export command hits the jassert in AudioProcessor::~AudioProcessor()
warning that the editor has not been deleted.
I built the GainPlugin demo from JUCE 6.0.8 and ran a debug version in Premiere and it too hits the same jassert when exporting.
I can work around the crash following the suggestions in the linked topic with this implementation of terminate()
in juce_VST3_Wrapper.cpp:
tresult PLUGIN_API terminate() override
{
if (auto* pluginInstance = getPluginInstance()) {
pluginInstance->removeListener(this);
// make sure editor is deleted
if (AudioProcessorEditor* editor = pluginInstance->getActiveEditor()) {
pluginInstance->editorBeingDeleted(editor);
delete editor;
}
}
audioProcessor = nullptr;
return EditController::terminate();
}
However, this does not clean up the other editor related objects in VST3 wrapper.