Why is this assertion failing when trying to attach to process in Visual Studio?

I am trying to get some basic communication flowing between my classes for this synth prototype I’m building. I’m just trying to log note frequencies to console on MIDI startNote, but for some reason an assertion fails exactly when I attach to the process with Visual Studio.

I am running the plugin in a demo Ableton session, and it runs fine with a 1 bar MIDI clip playing some notes, but fails as soon as I try to look at the console. I am sure there is a fix for this or that I am doing something wrong in setting up the synthesiser.

Here is the assertion that is failing, inside of the juce_Synthesiser.cpp file.

// We've only got "protected" voices now: lowest note takes priority
jassert (low != nullptr);

I am initializing the Synthesiser synth in my processor’s constructor.

synth.addVoice(new SynthVoice());

synth.addSound(new SynthSound());

It’s also worth noting that my startNote function currently just has this one call in it.

void SynthOscillator::setPhaseDelta(float frequency, float sampleRate)

Thanks for the help!