Allocation in VST3PluginInstance::processBlock

logAllocationViolationIfNotAllowed() TestUtilities.cpp:24
operator new(unsigned long) TestUtilities.cpp:72
void* std::__1::__libcpp_operator_new<unsigned long>(unsigned long) new:235
std::__1::__libcpp_allocate(unsigned long, unsigned long) new:261
std::__1::allocator<int>::allocate(unsigned long) memory:870
std::__1::allocator_traits<std::__1::allocator<int> >::allocate(std::__1::allocator<int>&, unsigned long) allocator_traits.h:260
std::__1::vector<int, std::__1::allocator<int> >::__vallocate(unsigned long) vector:993
std::__1::vector<int, std::__1::allocator<int> >::vector(std::__1::vector<int, std::__1::allocator<int> > const&) vector:1258
std::__1::vector<int, std::__1::allocator<int> >::vector(std::__1::vector<int, std::__1::allocator<int> > const&) vector:1251
juce::ChannelMapping::ChannelMapping(juce::ChannelMapping const&) juce_VST3Common.h:496
juce::ChannelMapping::ChannelMapping(juce::ChannelMapping const&) juce_VST3Common.h:496
juce::DynamicChannelMapping::DynamicChannelMapping(juce::DynamicChannelMapping const&) juce_VST3Common.h:539
juce::DynamicChannelMapping::DynamicChannelMapping(juce::DynamicChannelMapping const&) juce_VST3Common.h:539
juce::ClientBufferMapperData<float>::setUpInputChannels(Steinberg::Vst::ProcessData&, unsigned long, juce::ScratchBuffer<float>&, std::__1::vector<juce::DynamicChannelMapping, std::__1::allocator<juce::DynamicChannelMapping> > const&, std::__1::vector<float*, std::__1::allocator<float*> >&) juce_VST3Common.h:693
juce::ClientBufferMapperData<float>::getMappedBuffer(Steinberg::Vst::ProcessData&, std::__1::vector<juce::DynamicChannelMapping, std::__1::allocator<juce::DynamicChannelMapping> > const&, std::__1::vector<juce::DynamicChannelMapping, std::__1::allocator<juce::DynamicChannelMapping> > const&) juce_VST3Common.h:675
juce::ClientRemappedBuffer<float>::ClientRemappedBuffer(juce::ClientBufferMapperData<float>&, std::__1::vector<juce::DynamicChannelMapping, std::__1::allocator<juce::DynamicChannelMapping> > const*, std::__1::vector<juce::DynamicChannelMapping, std::__1::allocator<juce::DynamicChannelMapping> > const*, Steinberg::Vst::ProcessData&) juce_VST3Common.h:907
juce::ClientRemappedBuffer<float>::ClientRemappedBuffer(juce::ClientBufferMapperData<float>&, std::__1::vector<juce::DynamicChannelMapping, std::__1::allocator<juce::DynamicChannelMapping> > const*, std::__1::vector<juce::DynamicChannelMapping, std::__1::allocator<juce::DynamicChannelMapping> > const*, Steinberg::Vst::ProcessData&) juce_VST3Common.h:910
juce::ClientRemappedBuffer<float>::ClientRemappedBuffer(juce::ClientBufferMapper&, Steinberg::Vst::ProcessData&) juce_VST3Common.h:913
void juce::JuceVST3Component::processAudio<float>(Steinberg::Vst::ProcessData&) juce_VST3_Wrapper.cpp:3595
juce::JuceVST3Component::process(Steinberg::Vst::ProcessData&) juce_VST3_Wrapper.cpp:3517
void juce::VST3PluginInstance::processAudio<float>(juce::AudioBuffer<float>&, juce::MidiBuffer&, Steinberg::Vst::SymbolicSampleSizes, bool) juce_VST3PluginFormat.cpp:2684
juce::VST3PluginInstance::processBlock(juce::AudioBuffer<float>&, juce::MidiBuffer&) juce_VST3PluginFormat.cpp:2599
AllocationsInRealTimeThreadTest::runTest(PluginTests&, juce::AudioPluginInstance&) ExtremeTests.cpp:70
PluginTests::testType(juce::PluginDescription const&) PluginTests.cpp:192
PluginTests::runTest() PluginTests.cpp:107
juce::UnitTest::performTest(juce::UnitTestRunner*) juce_UnitTest.cpp:77
juce::UnitTestRunner::runTests(juce::Array<juce::UnitTest*, juce::DummyCriticalSection, 0> const&, long long) juce_UnitTest.cpp:165
runTests(PluginTests&, std::__1::function<void (juce::String const&)>) Validator.cpp:206
validate(juce::String const&, PluginTests::Options, std::__1::function<void (juce::String const&)>) Validator.cpp:225
ValidatorChildProcess::processRequest(juce::MemoryBlock) Validator.cpp:501
ValidatorChildProcess::processRequests() Validator.cpp:464
ValidatorChildProcess::run() Validator.cpp:427
juce::Thread::threadEntryPoint() juce_Thread.cpp:98
juce::juce_threadEntryPoint(void*) juce_Thread.cpp:120
juce::Thread::createNativeThread(juce::Thread::Priority)::$_16::operator()(void*) const juce_mac_Threads.mm:82
juce::Thread::createNativeThread(juce::Thread::Priority)::$_16::__invoke(void*) juce_mac_Threads.mm:76
_pthread_start 0x00007ff8125744e1
thread_start 0x00007ff81256ff6b

Thanks for reporting. I think there might be a missing & at the top of setUpInputChannels:

Could you try adding that and check whether it resolves the issue?

1 Like

yes, that fixes it!

1 Like

Thanks, that’s merged here:

2 Likes

Great, thanks for the quick fix.

Do you have any plans for setting up automatic runs of pluginval? This problem would have been caught there. You could also run it with address, ub, and thread sanitizers :slight_smile: