Switching presets causes crash on Windows
-
Hi all, I'm having an issue on Windows where my compiled plugin crashes when quickly switching presets using buttons (for example, double clicking the 'next preset' button can cause a crash). There's no issue on Mac, it only seems to be Windows which is odd. My Hise project is relatively simple with only a few FX and a looper. I've also tried a standalone version of the plugin and it does it there too, so it must be something in my code.
Has anyone encountered anything like this, or does anyone have any info on how to debug on Windows?
If anyone is interested, this is the code I'm using for the 2 buttons.
// btnPreset const btnPreset = Content.getAllComponents("btnPreset\\d"); for (x in btnPreset) x.setControlCallback(onbtnPresetControl); inline function onbtnPresetControl(component, value) { local index = btnPreset.indexOf(component); if (!value) return; if (!index) Engine.loadPreviousUserPreset(false); else Engine.loadNextUserPreset(false); }
-
I think this was related to changing presets too quickly. I've added a 'loading' panel which prevents this, so rather than cycling through multiple presets quickly, it's essentially forcing the loading of presets one at a time.