[Newb] Instant plugin crash, segfault in Invoke Process Function, Windows Visual Studio 2017

Howdy all,

I’ve been having a really strange problem with my test compressor plugin. As soon as I load it into the host, it immediately crashes, due to what appears to be a segfault, without reaching any of the source files I’ve written. Visual Studio appears to claim the error is in juce_VSTPluginFormat.cpp, but I’m very new to all of this and my previous test plugins (as well as example plugins) work(ed) fine. Unfortunately to confound things further, I just updated to Projucer v5.1.2, so that might be an issue as well.

The particular bit from the call stack says:

Plugin Host.exe!juce::VSTPluginInstance::invokeProcessFunction(juce::AudioBuffer & buffer, int sampleFrames) Line 1790 C++ Symbols loaded.

And the exception helper / output says the following:

Exception thrown at 0x00007FFE866E7141 (MyTestProject.dll) in Plugin Host.exe: 0xC0000005: Access violation writing location 0x00000206772DA14C.

Anybody have any idea of where to go from here, or what information I should look for to figure my next steps out?

EDIT: Accidental bump from changing thread title and moved self from Audio Plugins to Getting Started, since this is almost certainly a user error in some way.

Can you tell us the exact line number of where it crashes in juce_VSTPluginFormat.cpp?

Hi fabian, the line where it appears to crash in juce_VSTPluginFormat.cpp is line 1790, at an else statement within the inline function invokeProcessFunction. My previous plugins compiled and ran fine though, so I’m sure the issue is something I changed or did wrong.

Yeah, that’s where it’s calling your plugin code. It’s not a crash in JUCE, it’s in your own code. You’d better get debugging!

1 Like