Audiohost ERROR: malloc: Incorrect checksum for freed object?

I was wondering if anyone else had got this error when trying to run the audiohost example?

Press <enter> to continue . . .
audiohost(3699,0x113393dc0) malloc: Incorrect checksum for freed object 0x7fac41965400: probably modified after being freed.
Corrupt value: 0x7fac40c640d0
audiohost(3699,0x113393dc0) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort       "/Library/Audio/Plug-Ins/VST3/Rysy.vst3"

I haven’t modified the source code at all. only the cmake file to build the project without being in the public.sdk folder

Do you get the same error when running any of the SDK example plug-ins? For me it looks more of an issue of the Rysy plug-in. As you’re on macOS, I would suggest to build the audio host with the AddressSanitizer enabled and then run it in the debugger to see who is incorrectly handling memory.

i did not but i will try that! i have tried another vst plugin but got the same result (to further clarify they are both audio FX plugins)

this is my current cmake for the audiohost example:

cmake_minimum_required(VERSION 3.15.0)

project(MyHost VERSION 1.0.0)

set(vst3sdk_SOURCE_DIR "/Users/jaketyler/Documents/CXX Development/Frameworks/VSTSDK/vst3sdk")
add_subdirectory(${vst3sdk_SOURCE_DIR} "${PROJECT_BINARY_DIR}/vst3sdk")
smtg_enable_vst3_sdk()

if(SMTG_MAC)
  set(platform_source 
    ${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/hosting/module_mac.mm)
  set_source_files_properties(
    "${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/hosting/module_mac.mm"
    PROPERTIES COMPILE_FLAGS "-fobjc-arc")

  set(platform_libs "-framework Cocoa")
  get_filename_component(InfoPlistFile "resource/Info.plist" ABSOLUTE)
  set(MAC_APP_PROPERTIES
    MACOSX_BUNDLE TRUE
    MACOSX_BUNDLE_INFO_PLIST ${InfoPlistFile})
endif(SMTG_MAC)

set(public_sdk_source
  ${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/hosting/connectionproxy.cpp
  ${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/hosting/connectionproxy.h
  ${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/hosting/eventlist.cpp
  ${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/hosting/eventlist.h
  ${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/hosting/hostclasses.cpp
  ${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/hosting/hostclasses.h
  ${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/hosting/module.cpp
  ${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/hosting/module.h
  ${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/hosting/parameterchanges.cpp
  ${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/hosting/parameterchanges.h 
  ${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/hosting/pluginterfacesupport.cpp
  ${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/hosting/pluginterfacesupport.h
  ${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/hosting/plugprovider.cpp
  ${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/hosting/plugprovider.h
  ${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/hosting/processdata.cpp
  ${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/hosting/processdata.h
  ${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/utility/optional.h
  ${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/utility/stringconvert.cpp
  ${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/utility/stringconvert.h
  ${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/utility/uid.h
  ${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/vstinitiids.cpp)


set(target audiohost)

set(project_source
  source/audiohost.cpp
  source/audiohost.h
  source/media/audioclient.cpp
  source/media/audioclient.h
  source/media/imediaserver.h
  source/media/iparameterclient.h
  source/media/miditovst.h
  source/platform/appinit.h
  source/platform/iapplication.h
  source/usediids.cpp)

add_executable(${target}
  ${public_sdk_source}
  ${project_source}
  ${platform_source})

target_compile_features(${target}
  PUBLIC cxx_std_14)

set(smtg_enable_address_sanitizer "ON")
#would this be where i enable address sanitizer?

target_link_libraries(${target} 
  PRIVATE
    base sdk
    ${platform_libs})

if(MAC_APP_PROPERTIES)
  set_target_properties( ${target}
    PROPERTIES
      ${APP_PROPERTIES})
endif(APP_PROPERTIES)

i’m also using vscode with cmake, could you please help clarify how i should set up debugging?

i’m a little unsure on how to run it with debugging when i have to run the exe from terminal with the path to the vst

See c++ - Debugging with command-line parameters in Visual Studio - Stack Overflow how to do this.

OK, I just read again and you try to use vscode as a beginner on macOS. Please use Xcode as this makes debugging and helping a lot easier. See how to debug program with argument vector in Xcode - Stack Overflow