Plugin Crashing DAW when quitting (Hardcoded FX, Preset System)
-
There is a bug which is crashing the DAW when removing the Plugin from the chain.
What I found so far is
- using 4 channels
- using
hardcodedFX
orEffect slots
- use
Engine.addModuleStateToUserPreset('HardcodedMasterFX1');
- switching preset where the preset will change the loaded network order
The bug can be triggered by changing presets, then removing the plugin from the FX Chain inside the DAW. To replicate this inside HISE simply quit HISE.
It seems like this bug is in the
clearPreset()
function in HISE which is executed when the Plugin is exited or quit.
This will crash the entire DAW, especially in Ableton and FL Studio. Some DAWs handle it more gracefully.There is no debug log created by the Plugin but I could trace the issue to the clearPreset() function. I assume it has something todo with using more than 2 channels and looks like a read access violation, trying to remove what has already been removed.
How can I debug this further. I feel like this is pretty severe since crashing the DAW is really bad.
@Christoph-Hart can you help out here?
Thread 0 Crashed:: MainThread Dispatch queue: com.apple.main-thread 0 Reach 0x33bcc22f0 hise::HardcodedSwappableEffect::~HardcodedSwappableEffect() + 640 1 Reach 0x33bcc53ac hise::HardcodedMasterFX::~HardcodedMasterFX() + 288 2 Reach 0x33bcbd390 hise::SlotFX::~SlotFX() + 136 3 Reach 0x33bb277d0 hise::Chain::Handler::clearAsync(hise::Processor*) + 340 4 Reach 0x33baf48a0 hise::MainController::clearPreset(juce::NotificationType)::$_0::operator()(hise::Processor*) const + 712 5 Reach 0x33baf43f4 hise::MainController::clearPreset(juce::NotificationType) + 524 6 Reach 0x33bd4bfac hise::FrontendProcessor::~FrontendProcessor() + 776 7 Reach 0x33bd498c8 hise::FrontendProcessor::~FrontendProcessor() + 12 8 Reach 0x33ba03118 juce::JuceAudioProcessor::~JuceAudioProcessor() + 364 9 Reach 0x33ba02fa4 juce::JuceAudioProcessor::~JuceAudioProcessor() + 12 10 Reach 0x33ba02918 juce::JuceAudioProcessor::release() + 48 11 Reach 0x33ba0a63c juce::JuceVST3Component::~JuceVST3Component() + 220 12 Reach 0x33ba061f0 juce::JuceVST3Component::~JuceVST3Component() + 12 13 Reach 0x33ba0a090 non-virtual thunk to juce::JuceVST3Component::release() + 44 14 Live 0x10501fde4 0x102bb8000 + 38174180
-
@oskarsh Users have reported that this was working a version ago so I assume there has been a change in HISE since I recompiled my plugin using a later version again.
-
@oskarsh It might be related to this:
https://forum.hise.audio/topic/11005/using-2-and-multiple-channels-together-in-the-effect-slot
-
@orange I am getting weird behavior when using the Engine.addToModuleState() function.
I feel like its related to the multichannel issue and it always assumes 2 channels are used. I hit a roadblock here. Maybe @Christoph-Hart can help.