Load preset crash
-
@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...
-
@matt_sf Your buttons have save in preset enabled, won't that create an infinite loop?
-
@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. -
@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