HISE Logo Forum
    • Categories
    • Register
    • Login

    Load preset crash

    Scheduled Pinned Locked Moved Bug Reports
    4 Posts 3 Posters 318 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.
    • Matt_SFM
      Matt_SF
      last edited by

      @Christoph-Hart I stumbled upon a weird crash while organizing/refactoring some of my old scripts :

      I made a mistake in a loadUserPreset function and called basically this :

      inline function onbtn1Control(component, value)
      {
      	Engine.loadUserPreset("-- Factory --/-- Init --");
      }
      

      I didn't put a if (!value) return; at the begining and with this, HISE crashes when compiling the script.
      It does not crash when writing the call outside the button function...
      (The preset does exist in the project folder).

      Here's the code :

      Content.makeFrontInterface(200, 100);
      
      const btn0 = Content.addButton("btn0", 30, 0);
      
      const btn1 = Content.addButton("btn1", 30, 30);
      btn1.setControlCallback(onbtn1Control);
      
      inline function onbtn1Control(component, value)
      {
      	// Comment these two lines and compile to crash HISE
      	if (!value)
      	    return;
      
      	Engine.loadUserPreset("-- Factory --/-- Init --");
      }
      
      //Engine.loadUserPreset("-- Factory --/-- Init --");			// Does not makes HISE crash
      
      HiseSnippet 872.3ocsVs0SaCCE1oPPKcangzdF4wSEIJj.rKRnownW1p1.pVYS6MjwwkZgicksCrpo8ed+C1NNIPSgNtTokm74x2we93y43zUqnLiQoQdAGMZHC48D+dij1AMFP3RTmlHuE82mXrLMNW0diFRLFVLxyatO3T3ELOJ662uaOhfHorwpPnuo3T1m4Ib6Xsc28SbgnMIlcDOoj2auaGpR1PITo.elyODMjPOibJ6.hysJ9HuEZEysJcOKwxLfO6ohG0af5BYt+eia3mHXNgHTOHP4pQMFvEwcu7rZPHu46N9jOW9I+496yi4WoebF3YYFviQTNG3U41nTzCfRdknz74TZI+dTMencrEGedreGIbgzm.o5xTI2WTEdE+FJvCoc8DxYr1ZP3JD01LLbMbTX3p6TsJjtMV7IVYH9s3KwPhi2K0ZUxZq3rrxZ3s.DS5ez+z+nB+2xAvIutgYctpUhFDg3D3JslR5rTn0EXtTvkLb+TI0xUR7DNTipRFpjvdsF9bhHksZ0eVMXiM.Fjj.Zw1ALCCauPgcQwfIxXrCCW.ZUXplXFf+XmdspFv6iq8hhfDDnY1TsD1+fVxSAnqKTj3uZX5tZHh1ZqTuNtMgBWuiv0quAH0QxsvxUVcmf.GE1GRvlrXmuMU+U0pyZrZpfPIUVbx0BZozxAJK6PYsrL.rW3qape+oZqHSJX5oZ10GpuMf0joImvzky+NGgB0Iq9W39U8SyKcJ4nR5xFGNjUH2VIhcU0t02rWAUT6AcMUJXH3pMqmYwhdl7ZRDGBxB9tBYTF2KObBcewFMEresSShk35aKHCPvgLsk6xCdMYmCC9x6hC7axLmYUCyXaQoLj5tK99Cjmu2xvVMxsnfv2W3QWC9xYSduwDFX1lJNUPrSNvyMYuv.TGLwTF2jDogaGUdx+CXJX3sNE79Rwk76xszASmiUlBGckJ+G3XwaGO0uU+9LpcLAm2u82m0GJtis+KpTKWd59Dql6tjOHMoG7jIkA6tTxDF28cEW0Rtb3kkO8Xx3Lg+.eEFibxdEFitzHJgP0pio48GtWmdTlFfSxrGiCf+J.jwW0Y36GtdHJAdn7XJ0c7qCMtSGyly.lslALaOCXd4Lf4Uy.lWOCXdyshw8OJuO0pRxaG.EcakMgxyqkj.UVYUgn+RtVzJC
      

      Not a problem if you write your scripts correctly but I thought of mentionning it...

      Develop branch
      Win10 & VS17 / Ventura & Xcode 14. 3

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @Matt_SF
        last edited by

        @matt_sf Your buttons have save in preset enabled, won't that create an infinite loop?

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        Matt_SFM 1 Reply Last reply Reply Quote 1
        • Matt_SFM
          Matt_SF @d.healey
          last edited by Matt_SF

          @d-healey aaah another there-must-be-something-wrong-but-I-don't-see-it bug 🤦
          You're right, thanks David, I wonder what we would do without you...
          Sorry @Christoph-Hart , never mind.

          Develop branch
          Win10 & VS17 / Ventura & Xcode 14. 3

          NatanN 1 Reply Last reply Reply Quote 0
          • NatanN
            Natan @Matt_SF
            last edited by Natan

            @matt_sf said in Load preset crash:

            @d-healey aaah another there-must-be-something-wrong-but-I-don't-see-it bug 🤦
            You're right, thanks David, I wonder what we would do without you...
            Sorry @Christoph-Hart , never mind.

            💯 I Was An Employee On McDonald's nad Weekdns On Ikea 😆 LOL
            Not Sure About Other Felow 😆

            @d-healey God Bless You Fine Sir 💓

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

            15

            Online

            1.8k

            Users

            12.1k

            Topics

            104.9k

            Posts