Jassertfalse/crash with JUCE 7, VBlankDispatcher, VST3, Ableton Live

We’ve found a consistent jassertfalse failure and ensuing crash. We first encountered it with our current product in progress but I’ve reproduced it with the example SamplerPlugin built with the release version of JUCE 7. I don’t see anything in the github development branch which suggests it’s been reported previously. I’m using Windows 11; I haven’t had an opportunity to test on macOS yet.

To reproduce:
Add the VST3 plugin to a MIDI track in Ableton Live 11.
Delete the plugin.
Add the plugin again.

Here’s the stack trace:

>	SamplerPlugin.vst3!juce::SingletonHolder<juce::VBlankDispatcher,juce::DummyCriticalSection,1>::get() Line 74	C++
 	SamplerPlugin.vst3!juce::VBlankDispatcher::getInstance() Line 1576	C++
 	SamplerPlugin.vst3!juce::HWNDComponentPeer::HWNDComponentPeer(juce::Component & comp, int windowStyleFlags, HWND__ * parent, bool nonRepainting) Line 1660	C++
 	SamplerPlugin.vst3!juce::Component::createNewPeer(int styleFlags, void * parentHWND) Line 4611	C++
 	SamplerPlugin.vst3!juce::Component::addToDesktop(int styleWanted, void * nativeWindowToAttachTo) Line 721	C++
 	SamplerPlugin.vst3!juce::JuceVST3EditController::JuceVST3Editor::attached(void * parent, const char * type) Line 1752	C++
 	[External Code]	

And here’s the source code fragment containing the failure:

       if (once)
            static bool createdOnceAlready = false;

            if (createdOnceAlready)
                // This means that the doNotRecreateAfterDeletion flag was set
                // and you tried to create the singleton more than once.
                return nullptr;

            createdOnceAlready = true;

It’s worth mentioning that there’s something slightly odd with Live’s hosting of VST3s in that it seemingly keeps the plugin’s file open after the plugin has been deleted. This happens normally, not just in the case of this issue. I’m entirely too familiar with it because it prevents a rebuild of the plugin while Live is running.

1 Like

This should be fixed by the following commit:

1 Like

Aha! Thank you. Sorry I missed that.

When do we see this fix in the master branch?

We’re planning to do a 7.0.1 release late this week, or early next week.

1 Like