HISE Logo Forum
    • Categories
    • Register
    • Login

    Switching presets causes crash on Windows

    Scheduled Pinned Locked Moved General Questions
    2 Posts 1 Posters 199 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      paper_lung
      last edited by

      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);
      }
      
      P 1 Reply Last reply Reply Quote 0
      • P
        paper_lung @paper_lung
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        15

        Online

        1.7k

        Users

        11.8k

        Topics

        102.4k

        Posts