VSTSDK 3.6.12 (and 3.6.10)
VSTGUI4 4.7 (and 4.6)
DAWS: Tracktion Waveform 9 (and VSTHost and Mixcraft 8 Pro Studio x64)
OS: Win 8.1 (not tested on Win10)
Compiler: VS 2017 Community (SDK 3.6.12) and VS 2015 Community (SDK 3.6.10)
all x64
This issue was reported by a SW user with VSTSDK 3.6.10, but I have confirmed this is still an issue in 3.6.12. The AGain plugins were compiled directly from the SDK with no modifications.
The AGain sample plugin crashes Tracktion Waveform 9.3.2 (latest version) when you move the gain slider around rapidly. Smoother movements of the slider will eventually cause a crash, but it happens more quickly with rapid motion. I confirmed this myself with AGain/3.6.12 after a software user reported it; that user also reports that AGain crashes in the same manner in VSTHost and Mixcraft 8 Pro Studio x64 though I have not confirmed that personally.
For Tracktion Waveform 9, the crash may occur almost immediately after moving the slider, or it may take several seconds (~10-20 secs) but eventually it will crash.
The crash is related to the CVuMeter object update at the end of the process( ) method, and the CFrame::CollectInvalidRects related methods. It is unclear if this is truly a VST3 SDK or a VSTGUI4 problem.
The crash can be prevented in two ways:
- remove the line of code that calls addPoint( ):
paramQueue->addPoint(0, fVuPPM, index2);
In this case, the meters don’t get updated and are dead
- send a fixed value into the addPoint( ) method
paramQueue->addPoint(0, 0.5, index2);
In this case, the meters are frozen half-way
The user’s plugin made with my software also crashes identically and also has LED meter objects. One difference is that plugin uses a CAnimKnob object rather than the CSlider from AGain, but it crashes in an identical manner - rapid motion of the knob causes changes to the audio gain, which causes (other) changes to the LED meters, which then crashes - the crash and the call stack has the same fingerprint involving CollectInvalidRects.
The user reports that with AGain, Mixcraft 8 Pro Studio x64 crashes immediately upon opening the plugin’s editor with SDK 3.6.10 and eventually crashes with SDK 3.6.12.
I have observed multiple, different call stacks after the crash, however they all involve:
again.vst3!VSTGUI::CFrame::CollectInvalidRects
In most cases it is the CollectInvalidRects::addRect( ) function but on at least one occasion it was the destructor:
CollectInvalidRects::~CollectInvalidRects()
Several different call stacks after the crash are here:
----- Tracktion Waveform 9 Call Stacks after crashes: -----
(1) ----- Crash 1 -----
ucrtbased.dll!00007ffd2b75765c() Unknown Non-user code. Cannot find or open the PDB file.
ucrtbased.dll!00007ffd2b7575a7() Unknown Non-user code. Cannot find or open the PDB file.
again.vst3!std::_Vector_const_iterator<std::_Vector_val<std::_Simple_typesVSTGUI::CRect > >::_Compat(const std::_Vector_const_iterator<std::_Vector_val<std::_Simple_typesVSTGUI::CRect > > & _Right) Line 225 C++ Symbols loaded.
again.vst3!std::_Vector_const_iterator<std::_Vector_val<std::_Simple_typesVSTGUI::CRect > >::operator==(const std::_Vector_const_iterator<std::_Vector_val<std::_Simple_typesVSTGUI::CRect > > & _Right) Line 189 C++ Symbols loaded.
again.vst3!std::_Vector_const_iterator<std::_Vector_val<std::_Simple_typesVSTGUI::CRect > >::operator!=(const std::_Vector_const_iterator<std::_Vector_val<std::_Simple_typesVSTGUI::CRect > > & _Right) Line 194 C++ Symbols loaded.
again.vst3!VSTGUI::CFrame::CollectInvalidRects::addRect(const VSTGUI::CRect & rect) Line 1909 C++ Symbols loaded.
again.vst3!VSTGUI::CFrame::invalidRect(const VSTGUI::CRect & rect) Line 1411 C++ Symbols loaded.
again.vst3!VSTGUI::CViewContainer::invalidRect(const VSTGUI::CRect & rect) Line 753 C++ Symbols loaded.
again.vst3!VSTGUI::CView::invalidRect(const VSTGUI::CRect & rect) Line 560 C++ Symbols loaded.
again.vst3!VSTGUI::CView::invalid() Line 78 C++ Symbols loaded.
again.vst3!VSTGUI::ParameterChangeListener::updateControlValue(double value) Line 308 C++ Symbols loaded.
again.vst3!VSTGUI::ParameterChangeListener::update(Steinberg::FUnknown * changedUnknown, long message) Line 177 C++ Symbols loaded.
again.vst3!Steinberg::UpdateHandler::doTriggerUpdates(Steinberg::FUnknown * u, long message, bool suppressUpdateDone) Line 416 C++ Symbols loaded.
again.vst3!Steinberg::UpdateHandler::triggerUpdates(Steinberg::FUnknown * u, long message) Line 441 C++ Symbols loaded.
again.vst3!Steinberg::FObject::changed(long msg) Line 110 C++ Symbols loaded.
again.vst3!Steinberg::Vst::Parameter::setNormalized(double normValue) Line 101 C++ Symbols loaded.
again.vst3!Steinberg::Vst::EditController::setParamNormalized(unsigned long tag, double value) Line 186 C++ Symbols loaded.
again.vst3!Steinberg::Vst::AGainController::setParamNormalized(unsigned long tag, double value) Line 308 C++ Symbols loaded.
Waveform 9 (64-bit).exe!0000000140affbfd() Unknown No symbols loaded.
Waveform 9 (64-bit).exe!0000000140af1021() Unknown No symbols loaded.
[External Code] Annotated Frame
(2) ----- Crash 2 -----
again.vst3!VSTGUI::CRect::CRect(const VSTGUI::CRect & r) Line 85 C++ Symbols loaded.
again.vst3!std::_Default_allocator_traits<std::allocatorVSTGUI::CRect >::construct<VSTGUI::CRect,VSTGUI::CRect & __ptr64>(std::allocatorVSTGUI::CRect & __formal, VSTGUI::CRect * const _Ptr, VSTGUI::CRect & <_Args_0>) Line 855 C++ Symbols loaded.
again.vst3!std::_Uninitialized_copy_al_unchecked<VSTGUI::CRect * __ptr64,VSTGUI::CRect * __ptr64,std::allocatorVSTGUI::CRect >(VSTGUI::CRect * _First, VSTGUI::CRect * _Last, VSTGUI::CRect * _Dest, std::allocatorVSTGUI::CRect & _Al, std::_General_ptr_iterator_tag __formal, std::_Unused_parameter __formal) Line 93 C++ Symbols loaded.
again.vst3!std::_Uninitialized_copy<VSTGUI::CRect * __ptr64,VSTGUI::CRect * __ptr64,std::allocatorVSTGUI::CRect >(VSTGUI::CRect * _First, VSTGUI::CRect * _Last, VSTGUI::CRect * _Dest, std::allocatorVSTGUI::CRect & _Al) Line 122 C++ Symbols loaded.
again.vst3!std::vector<VSTGUI::CRect,std::allocatorVSTGUI::CRect >::_Umove_if_noexcept1(VSTGUI::CRect * _First, VSTGUI::CRect * _Last, VSTGUI::CRect * _Dest, std::integral_constant<bool,0> __formal) Line 1930 C++ Symbols loaded.
again.vst3!std::vector<VSTGUI::CRect,std::allocatorVSTGUI::CRect >::_Umove_if_noexcept(VSTGUI::CRect * _First, VSTGUI::CRect * _Last, VSTGUI::CRect * _Dest) Line 1936 C++ Symbols loaded.
again.vst3!std::vector<VSTGUI::CRect,std::allocatorVSTGUI::CRect >::emplace_back<VSTGUI::CRect const & __ptr64>(const VSTGUI::CRect & <_Val_0>) Line 960 C++ Symbols loaded.
again.vst3!VSTGUI::CFrame::CollectInvalidRects::addRect(const VSTGUI::CRect & rect) Line 1926 C++ Symbols loaded.
again.vst3!VSTGUI::CFrame::invalidRect(const VSTGUI::CRect & rect) Line 1411 C++ Symbols loaded.
again.vst3!VSTGUI::CViewContainer::invalidRect(const VSTGUI::CRect & rect) Line 753 C++ Symbols loaded.
again.vst3!VSTGUI::CView::invalidRect(const VSTGUI::CRect & rect) Line 560 C++ Symbols loaded.
again.vst3!VSTGUI::CView::invalid() Line 78 C++ Symbols loaded.
again.vst3!VSTGUI::ParameterChangeListener::updateControlValue(double value) Line 308 C++ Symbols loaded.
again.vst3!VSTGUI::ParameterChangeListener::update(Steinberg::FUnknown * changedUnknown, long message) Line 177 C++ Symbols loaded.
again.vst3!Steinberg::UpdateHandler::doTriggerUpdates(Steinberg::FUnknown * u, long message, bool suppressUpdateDone) Line 416 C++ Symbols loaded.
again.vst3!Steinberg::UpdateHandler::triggerUpdates(Steinberg::FUnknown * u, long message) Line 441 C++ Symbols loaded.
again.vst3!Steinberg::FObject::changed(long msg) Line 110 C++ Symbols loaded.
again.vst3!Steinberg::Vst::Parameter::setNormalized(double normValue) Line 101 C++ Symbols loaded.
again.vst3!Steinberg::Vst::EditController::setParamNormalized(unsigned long tag, double value) Line 186 C++ Symbols loaded.
again.vst3!Steinberg::Vst::AGainController::setParamNormalized(unsigned long tag, double value) Line 308 C++ Symbols loaded.
Waveform 9 (64-bit).exe!0000000140affbfd() Unknown No symbols loaded.
Waveform 9 (64-bit).exe!0000000140af1021() Unknown No symbols loaded.
[External Code] Annotated Frame
(3) ----- Crash 3 -----
ntdll.dll!00007ffd4bd4aa15() Unknown Non-user code. Cannot find or open the PDB file.
ntdll.dll!00007ffd4bd0eb7a() Unknown Non-user code. Cannot find or open the PDB file.
ntdll.dll!00007ffd4bcb6be1() Unknown Non-user code. Cannot find or open the PDB file.
KernelBase.dll!00007ffd490a656a() Unknown Non-user code. Cannot find or open the PDB file.
ucrtbased.dll!00007ffd31bf1501() Unknown Non-user code. Cannot find or open the PDB file.
ucrtbased.dll!00007ffd31bef905() Unknown Non-user code. Cannot find or open the PDB file.
ucrtbased.dll!00007ffd31bf2ef5() Unknown Non-user code. Cannot find or open the PDB file.
again.vst3!operator delete(void * block) Line 21 C++ Non-user code. Symbols loaded.
again.vst3!std::_Deallocate(void * _Ptr, unsigned __int64 _Count, unsigned __int64 _Sz) Line 152 C++ Symbols loaded.
again.vst3!std::allocatorVSTGUI::CRect::deallocate(VSTGUI::CRect * const _Ptr, const unsigned __int64 Count) Line 942 C++ Symbols loaded.
again.vst3!std::vector<VSTGUI::CRect,std::allocatorVSTGUI::CRect >::Tidy() Line 2009 C++ Symbols loaded.
again.vst3!std::vector<VSTGUI::CRect,std::allocatorVSTGUI::CRect >::~vector<VSTGUI::CRect,std::allocatorVSTGUI::CRect >() Line 921 C++ Symbols loaded.
again.vst3!VSTGUI::CFrame::CollectInvalidRects::~CollectInvalidRects() Line 1882 C++ Symbols loaded.
again.vst3!VSTGUI::CFrame::platformOnMouseMoved(VSTGUI::CPoint & where, const VSTGUI::CButtonState & buttons) Line 1603 C++ Symbols loaded.
again.vst3!VSTGUI::Win32Frame::proc(HWND * hwnd, unsigned int message, unsigned __int64 wParam, int64 lParam) Line 830 C++ Symbols loaded.
again.vst3!VSTGUI::Win32Frame::WindowProc(HWND * hwnd, unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 961 C++ Symbols loaded.
[External Code] Annotated Frame
Waveform 9 (64-bit).exe!000000014100d4e6() Unknown No symbols loaded.
Waveform 9 (64-bit).exe!000000014100f683() Unknown No symbols loaded.
Waveform 9 (64-bit).exe!0000000141011a4e() Unknown No symbols loaded.
Waveform 9 (64-bit).exe!0000000140cb6b92() Unknown No symbols loaded.
[External Code] Annotated Frame
(4) ----- Crash 4 -----
ucrtbased.dll!00007ffd31c0765c() Unknown Non-user code. Cannot find or open the PDB file.
ucrtbased.dll!00007ffd31c075a7() Unknown Non-user code. Cannot find or open the PDB file.
again.vst3!std::_Vector_const_iterator<std::_Vector_val<std::_Simple_typesVSTGUI::CRect > >::operator*() Line 64 C++ Symbols loaded.
again.vst3!std::_Vector_iterator<std::_Vector_val<std::_Simple_typesVSTGUI::CRect > >::operator*() Line 293 C++ Symbols loaded.
again.vst3!VSTGUI::CFrame::CollectInvalidRects::addRect(const VSTGUI::CRect & rect) Line 1912 C++ Symbols loaded.
again.vst3!VSTGUI::CFrame::invalidRect(const VSTGUI::CRect & rect) Line 1411 C++ Symbols loaded.
again.vst3!VSTGUI::CViewContainer::invalidRect(const VSTGUI::CRect & rect) Line 753 C++ Symbols loaded.
again.vst3!VSTGUI::CView::invalidRect(const VSTGUI::CRect & rect) Line 560 C++ Symbols loaded.
again.vst3!VSTGUI::CView::invalid() Line 78 C++ Symbols loaded.
again.vst3!VSTGUI::ParameterChangeListener::updateControlValue(double value) Line 308 C++ Symbols loaded.
again.vst3!VSTGUI::ParameterChangeListener::update(Steinberg::FUnknown * changedUnknown, long message) Line 177 C++ Symbols loaded.
again.vst3!Steinberg::UpdateHandler::doTriggerUpdates(Steinberg::FUnknown * u, long message, bool suppressUpdateDone) Line 416 C++ Symbols loaded.
again.vst3!Steinberg::UpdateHandler::triggerUpdates(Steinberg::FUnknown * u, long message) Line 441 C++ Symbols loaded.
again.vst3!Steinberg::FObject::changed(long msg) Line 110 C++ Symbols loaded.
again.vst3!Steinberg::Vst::Parameter::setNormalized(double normValue) Line 101 C++ Symbols loaded.
again.vst3!Steinberg::Vst::EditController::setParamNormalized(unsigned long tag, double value) Line 186 C++ Symbols loaded.
again.vst3!Steinberg::Vst::AGainController::setParamNormalized(unsigned long tag, double value) Line 308 C++ Symbols loaded.
Waveform 9 (64-bit).exe!0000000140affbfd() Unknown No symbols loaded.
Waveform 9 (64-bit).exe!0000000140af1021() Unknown No symbols loaded.
[External Code] Annotated Frame
Thanks,
Will Pirkle