I have a vst/vst3 host application based on juce framework of course which crashes with certain plug-ins. Specifically, 2 plug-ins of “Ocean Swift” OSS Enterprise and Polyphenom 2. You may download a demo from https://oceanswift.net/enterprise/. The crash happens the moment you send some midi events in the processBlock. It is inside the dll and the callstack is corrupted so there is no hint of what is going wrong. I have tried to do the same on the AudioPluginHost juce example and the same crash happens there.
I can test this out, but it’s unlikely I’ll be able to get far given that the bug is happening somewhere inside the VST. Have you tried contacting the developers of the plugins? Given that they’ll have access to both the hosting and client code, they’ll probably be able to track down the issue much more easily than we can.
I’ve had another look at this and can reproduce the issue. However, I’m not able to diagnose the problem due to the stack getting obliterated (as you noted).
Interestingly the plugin also crashes when attempting to play notes with the built-in keyboard, so I don’t think JUCE’s midi code is to blame. I think the best course of action is probably to report the issue to the developers.
I thank you so much for taking the time to reproduce and taking a step forward to contact the developers. If they do not want to support Juce then I wouldn’t stand a chance. I have noticed myself that it crashes with the build-in keyboard and there is no hint at all on where the problem is. The only solution now I see is to “blacklist” the company in my app to at least avoid crashing my VST host.