Help needed with VSTTestHost crash

Hi.
I am in the process of migrating from VST SDK version 3.7.4. Build 25 to Version 3.7.8 Build 34.

I have recompiled a previous working version of my program, When loading it into the test host, the program seem to be working properly, however, when closing the plugin window, and thereafter the host, the vst host crashes with the following debug trace information. I can’t trace the origin to my program and need some assistance please.
The trace follows below:

ucrtbased.dll!common_assert_to_message_box<wchar_t>(const wchar_t * const expression, const wchar_t * const file_name, const unsigned int line_number, void * const return_address) Line 388 C++
ucrtbased.dll!common_assert<wchar_t>(const wchar_t * const expression, const wchar_t * const file_name, const unsigned int line_number, void * const return_address) Line 424 C++
ucrtbased.dll!_wassert(const wchar_t * expression, const wchar_t * file_name, unsigned int line_number) Line 444 C++
Kromatique.vst3!VSTGUI::doAssert(const char * filename, const char * line, const char * condition, const char * desc) Line 124 C++
Kromatique.vst3!VSTGUI::DirectComposition::factory::~Factory() Line 648 C++
Kromatique.vst3!VSTGUI::DirectComposition::factory::`scalar deleting destructor’(unsigned int) C++
Kromatique.vst3!std::default_deleteVSTGUI::DirectComposition::Factory::operator()(VSTGUI::DirectComposition::Factory * _Ptr) Line 3129 C++
Kromatique.vst3!std::unique_ptr<VSTGUI::DirectComposition::Factory,std::default_deleteVSTGUI::DirectComposition::Factory>::~unique_ptr<VSTGUI::DirectComposition::Factory,std::default_deleteVSTGUI::DirectComposition::Factory>() Line 3241 C++
Kromatique.vst3!VSTGUI::Win32Factory::Impl::~Impl() C++
Kromatique.vst3!VSTGUI::Win32Factory::Impl::`scalar deleting destructor’(unsigned int) C++
Kromatique.vst3!std::default_deleteVSTGUI::Win32Factory::Impl::operator()(VSTGUI::Win32Factory::Impl * _Ptr) Line 3129 C++
Kromatique.vst3!std::unique_ptr<VSTGUI::Win32Factory::Impl,std::default_deleteVSTGUI::Win32Factory::Impl>::~unique_ptr<VSTGUI::Win32Factory::Impl,std::default_deleteVSTGUI::Win32Factory::Impl>() Line 3241 C++
Kromatique.vst3!VSTGUI::Win32Factory::~Win32Factory() Line 122 C++
Kromatique.vst3!VSTGUI::Win32Factory::`scalar deleting destructor’(unsigned int) C++
Kromatique.vst3!std::default_deleteVSTGUI::IPlatformFactory::operator()(VSTGUI::IPlatformFactory * _Ptr) Line 3129 C++
Kromatique.vst3!std::unique_ptr<VSTGUI::IPlatformFactory,std::default_deleteVSTGUI::IPlatformFactory>::reset(VSTGUI::IPlatformFactory * _Ptr) Line 3276 C++
Kromatique.vst3!std::unique_ptr<VSTGUI::IPlatformFactory,std::default_deleteVSTGUI::IPlatformFactory>::operator=<std::default_deleteVSTGUI::IPlatformFactory,0>(std::unique_ptr<VSTGUI::IPlatformFactory,std::default_deleteVSTGUI::IPlatformFactory> && _Right) Line 3227 C++
Kromatique.vst3!VSTGUI::setPlatformFactory(std::unique_ptr<VSTGUI::IPlatformFactory,std::default_deleteVSTGUI::IPlatformFactory> && f) Line 27 C++
Kromatique.vst3!VSTGUI::exitPlatform() Line 40 C++
Kromatique.vst3!VSTGUI::exit() Line 22 C++
Kromatique.vst3!() Line 67 C++
Kromatique.vst3!std::invoke<void (void) &>(void (void) & _Obj) Line 1479 C++
Kromatique.vst3!std::_Invoker_ret<void,1>::_Call<void (void) &>(void (void) & _Func) Line 665 C++
Kromatique.vst3!std::_Func_impl_no_alloc<void (void),void>::_Do_call() Line 834 C++
Kromatique.vst3!std::_Func_class::operator()() Line 881 C++
Kromatique.vst3!Steinberg::`anonymous namespace’::sortAndRunFunctions(std::vector<std::pair<unsigned int,std::function<void __cdecl(void)>>,std::allocator<std::pair<unsigned int,std::function<void __cdecl(void)>>>> & array) Line 84 C++
Kromatique.vst3!DeinitModule() Line 122 C++
> Kromatique.vst3!ExitDll() Line 82 C++
VST3PluginTestHost.exe!0000000140317f1f() Unknown
VST3PluginTestHost.exe!0000000140268ac4() Unknown
VST3PluginTestHost.exe!000000014030760e() Unknown
VST3PluginTestHost.exe!00000001404ae8b4() Unknown
VST3PluginTestHost.exe!000000014009e9d1() Unknown
VST3PluginTestHost.exe!0000000140320637() Unknown
VST3PluginTestHost.exe!00000001404aee97() Unknown
VST3PluginTestHost.exe!0000000140199974() Unknown
VST3PluginTestHost.exe!0000000140268ac4() Unknown
VST3PluginTestHost.exe!0000000140198bb5() Unknown
VST3PluginTestHost.exe!000000014019062e() Unknown
VST3PluginTestHost.exe!00000001401e43c6() Unknown
VST3PluginTestHost.exe!0000000140784c2e() Unknown
kernel32.dll!BaseThreadInitThunk() Unknown
ntdll.dll!RtlUserThreadStart() Unknown

the assertion is thrown when direct composition surfaces are leaking. A direct composition surface is used either by the CFrame instance or by a CLayeredViewContainer instance. Make sure that they are correctly released before your plug-in is unloaded.

Thanks Arne, I will have a look at it and see what may be wrong. Thanks for your quick response. I will keep you updated.
Anton

Hi Arne,
I have investigated and resolved the problem. Thanks for the assistance. Anton

1 Like