Compiled VST3 FX Plugin crashes when using Routing Matrix
-
Did something change regarding Routing Matrixes? I used to compile my plugins just fine but notices that the latest compile (latest commit of develop branch) of my Plugin is instantly crashing. I skipped the last 20 commits but just updated today and noticed that.
I traced it down to the routing matrix and set up a minimal project showcasing this behavior. The compile works just fine but opening this plugin in my daw results in this error:
HiseSnippet 812.3ocwV0raSCDDd2jrHR3GQk3AvGakJUNMkBRbHklePQzehpKsbqZq8jlU0dWK60ERQ7fza7ZvQNxyAm5MdCfcschsSSiJAgvGhxLey38amuY108CD1PXnH.gqd3He.geHwZDWNr0PJii50FguG4PHTh1djOMLDbPXb42nwvUqfhe9YysotTtMj4BgNRvrgcXdLYl29a8VlqaWpCbHyKWzarUOaAukvUDo3QYhIxmZeN8LXOpNrRDEI53vjh.KIUBgHbksENirFJ9.OI9iXgrScAsQcjk5Ek3tqv0QyXsWTqgLWm9i2ugH0aoe1tubxt+ojcYNrI9ypBOIFvHKi70CbohzqbA5UOO8LyQuYPIbNJUIgRKQrrCX9xLDMed.oGWBACnpxddpjDKB+MRsVBUDb4ZdzygtAJiIYr7lllqZn9YkWMHhaKYBtgfumPB6yWdkZepV0ZetlwzPCFLSL8xDHbcgfYBqk5f4k3x7HuSgfUMtf5FASBTs+KVTI2dQMulamrqyEnf2iyj66C7aqS.kVpT+6c8ZSkTsRj5SEmODHYZJfaCWnZqSzkpj1P34Rgupw9FhlpcQ3D4RkE6gzCNo.pZPAgSKN7PlbT9Aqoarpb2Zrlee+cktKQ5yj1CmMeKMC9ppZ+q4a5X5iHcFL.rkYjsBo66m6L4eLUl47YoaxkpjCDQRPs7IEMsEielwtTY.6i0KRpx24CJpO2CJPoqRxhnHwdQdVpiOsAUIgyAW8.CVqKo1lZasDYAbmXiRYf0013TvXixYfqqs+k5QCNwHErQdvIF4UrzqUdLwh446BG.W.AmlNNj3xHwWwJ0ABgmE6xw2R7kqt55lsod9p8bpqsZz3GMOFj6nx1MKru2rcvno7ccyiYNxg4czM.fKAUuctU3qM+OqOiKjlSUkqmGr9TfqOVLuU8obJXl97228LM6Jz8LM6Pyic3avNOpcf3D6jqGzSc2O1ipVyi+ffpjc01F0QwWYnxiXtlIxScA8I115yBdl5bjYmy5KPNMVfb1XAx44KPNat.47hEHmWN2bzeazqijBuj6ITN52I9dTLtCmplXhmoQ+FjYygCN
-
@oskarsh My VST plugins are crashing in the latest update too...
Edit: Including standalone.
-
@Christoph-Hart Here's the crash thread.
Probably related to FL Studio buffer size fixes in most recent commit
Crashed Thread: 0 JUCE Message Thread Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000147ffffe0 Exception Codes: 0x0000000000000001, 0x0000000147ffffe0 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11 Terminating Process: exc handler [88006] VM Region Info: 0x147ffffe0 is not in any region. Bytes after previous region: 25165793 Bytes before following region: 32 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL MALLOC_SMALL 146000000-146800000 [ 8192K] rw-/rwx SM=PRV ---> GAP OF 0x1800000 BYTES MALLOC_MEDIUM 148000000-148800000 [ 8192K] rw-/rwx SM=PRV Thread 0 Crashed:: JUCE Message Thread Dispatch queue: com.apple.main-thread 0 libsystem_platform.dylib 0x1a200b2e8 _platform_memmove + 536 1 CUBE Debug 0x105ced0e8 juce::FloatVectorOperations::copy(float*, float const*, int) + 44 (juce_FloatVectorOperations.cpp:542) 2 CUBE Debug 0x10494bb50 juce::AudioBuffer<float>::setSize(int, int, bool, bool, bool) + 672 (juce_AudioSampleBuffer.h:457) 3 CUBE Debug 0x104bb052c hise::MainController::updateMultiChannelBuffer(int) + 112 (MainController.cpp:1810) 4 CUBE Debug 0x104ba6cd4 hise::MainController::prepareToPlay(double, int) + 808 (MainController.cpp:1305) 5 CUBE Debug 0x104ba69a0 hise::DelayedRenderer::prepareToPlayWrapped(double, int) + 156 (MainControllerHelpers.cpp:1322) 6 CUBE Debug 0x104e45910 hise::FrontendProcessor::prepareToPlay(double, int) + 48 (FrontEndProcessor.cpp:449) 7 CUBE Debug 0x105ebea20 juce::AudioProcessorPlayer::setProcessor(juce::AudioProcessor*) + 436 (juce_AudioProcessorPlayer.cpp:191) 8 CUBE Debug 0x105ebfb10 juce::AudioProcessorPlayer::audioDeviceAboutToStart(juce::AudioIODevice*) + 368 (juce_AudioProcessorPlayer.cpp:328) 9 CUBE Debug 0x105d36f90 juce::AudioDeviceManager::addAudioCallback(juce::AudioIODeviceCallback*) + 200 (juce_AudioDeviceManager.cpp:879) 10 CUBE Debug 0x104bf5430 hise::AudioProcessorDriver::initialiseAudioDriver(juce::XmlElement*) + 968 (StandaloneProcessor.cpp:206) 11 CUBE Debug 0x104bf59b8 hise::StandaloneProcessor::StandaloneProcessor() + 516 (StandaloneProcessor.cpp:150) 12 CUBE Debug 0x104bf5c9c hise::StandaloneProcessor::StandaloneProcessor() + 28 (StandaloneProcessor.cpp:107) 13 CUBE Debug 0x104e46774 hise::FrontendStandaloneApplication::AudioWrapper::init() + 52 (FrontEndProcessor.cpp:624) 14 CUBE Debug 0x104e4945c hise::FrontendStandaloneApplication::AudioWrapper::timerCallback() + 40 (FrontEndProcessor.h:310) 15 CUBE Debug 0x10606b148 juce::Timer::TimerThread::callTimers() + 184 (juce_Timer.cpp:114) 16 CUBE Debug 0x10606b058 juce::Timer::TimerThread::CallTimersMessage::messageCallback() + 40 (juce_Timer.cpp:180) 17 CUBE Debug 0x106071560 juce::MessageQueue::deliverNextMessage() + 104 (juce_osx_MessageQueue.h:81) 18 CUBE Debug 0x1060714c8 juce::MessageQueue::runLoopCallback() + 56 (juce_osx_MessageQueue.h:92) 19 CUBE Debug 0x10607118c juce::MessageQueue::runLoopSourceCallback(void*) + 24 (juce_osx_MessageQueue.h:100) 20 CoreFoundation 0x1a20c0f94 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 21 CoreFoundation 0x1a20c0ee0 __CFRunLoopDoSource0 + 208 22 CoreFoundation 0x1a20c0be0 __CFRunLoopDoSources0 + 268 23 CoreFoundation 0x1a20bf560 __CFRunLoopRun + 828 24 CoreFoundation 0x1a20bea84 CFRunLoopRunSpecific + 600 25 HIToolbox 0x1aacfe338 RunCurrentEventLoopInMode + 292 26 HIToolbox 0x1aacfdfc4 ReceiveNextEventCommon + 324 27 HIToolbox 0x1aacfde68 _BlockUntilNextEventMatchingListInModeWithFilter + 72 28 AppKit 0x1a4c2651c _DPSNextEvent + 860 29 AppKit 0x1a4c24e14 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1328 30 AppKit 0x1a4c16fe0 -[NSApplication run] + 596 31 CUBE Debug 0x10605c6c4 juce::MessageManager::runDispatchLoop() + 112 (juce_mac_MessageManager.mm:359) 32 CUBE Debug 0x10605c5d4 juce::JUCEApplicationBase::main() + 288 (juce_ApplicationBase.cpp:262) 33 CUBE Debug 0x10605c458 juce::JUCEApplicationBase::main(int, char const**) + 68 (juce_ApplicationBase.cpp:240) 34 CUBE Debug 0x10494619c main + 56 (Plugin.cpp:25) 35 dyld 0x10f84908c start + 520
-
I figured it out, it's not the Routing Matrix its the channel amount. If you use more than 2 channels it instantly crashes when opening. I tested with standalone and vst3. Also forcing stereo output does not help.
@Casey-Kolb Try building your plugins against the master it seems like this bug does not exist there. I was not able to pinpoint the exact commit where this started happening.@Christoph-Hart you should be aware of this bug and maybe know what could cause this.
-
@oskarsh I'm almost certain it's related to this commit if you look at my crash thread: https://github.com/lunacyaudio/HISE/commit/367cae32bc2dcba48fb0d6359295da2bedac29d2
The crash happens right when
setSize
is called on the AudioBuffer. -
@Casey-Kolb this looks pretty plausible. How can you log the crash report? Do I need to compile my plugin with the Debug configuration or is it enough to enable
setEnableDebugMode
in my plugin? I want to debug these kinds of errors myself in the future. -
@oskarsh You'll just need to compile the Debug version of your VST or standalone app. You can open the Autogenerated Projucer file in your project's Binaries folder and then export the plugin from Xcode. From there you can choose to "Build For Testing"
-
On Win11/Cubase12/VS2022 I'm seeing this at launch:
JUCE Assertion failure in juce_AudioSampleBuffer.h:421
Also, the exported plug-in doesn't show up in Reaper.
-
Same experience here.
Instruments are building and working as expected but VST3 and AU are crashing Logic and Ableton.
-
So just to recap: multichannel plugins crash with the latest commit?
-
@Christoph-Hart yes correct FX plugins crash with multichannel amount != 2.
I have not tested instrument plugins.
-
I've committed a fix for it, was indeed a trivial issue. Let me know if it works now.
-
@Christoph-Hart Just rebuilt the latest commit and confirm the issue is fixed here. Thanks for sorting this out so quickly!