Forum
    • Categories
    • Register
    • Login

    Preset Crash

    Scheduled Pinned Locked Moved General Questions
    22 Posts 2 Posters 5.3k 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.
    • bendursoB
      bendurso @David Healey
      last edited by

      @d-healey I think I found the issue. I included "Debug mode" on the floating tile, and the beta tester sent me the log.

      Most crashes happen when the convolution reverb combo box is loaded. The problem is that I'm using a convolution reverb inside a hardcoded master FX (created with Scriptnode).

      In the combo box's inline function, I call Synth.getAudioSampleProcessor() only when the convolution is active. But audio processors can't be declared inside inline functions. The issue is I also can't declare them in onInit, because the convolution reverb is not loaded yet in the hardcoded master FX—so I can't call Synth.getAudioSampleProcessor()

      David HealeyD 1 Reply Last reply Reply Quote 0
      • David HealeyD
        David Healey @bendurso
        last edited by

        @bendurso said in Preset Crash:

        Synth.getAudioSampleProcessor()

        Yeah this is what I was saying in another thread. All references need to be declared in on init as const.

        Free HISE Bootcamp Full Course for beginners.
        YouTube Channel - Public HISE tutorials
        My Patreon - HISE tutorials

        bendursoB 1 Reply Last reply Reply Quote 0
        • bendursoB
          bendurso @David Healey
          last edited by

          @d-healey Yes, but the problem with this one is that Hise returns error if I declare on init, because there's no effect loaded on the hardcoded master fx.

          David HealeyD 1 Reply Last reply Reply Quote 0
          • David HealeyD
            David Healey @bendurso
            last edited by

            @bendurso minimal snippet

            Free HISE Bootcamp Full Course for beginners.
            YouTube Channel - Public HISE tutorials
            My Patreon - HISE tutorials

            bendursoB 2 Replies Last reply Reply Quote 0
            • bendursoB
              bendurso @David Healey
              last edited by

              @d-healey

              Only after I load the Convolution Reverb network on HardcodedMasterFX1 I can get Synth.getAudioSampleProcessor. And in my plugin all hardcoded master fxs are empty on init.

              HiseSnippet 760.3ocuU00SaCCE0tsFs1MlFRr2i3IXBgRnsrhPSCneLp1ZoZkg3MjqiC0pI1QINvpl1+48OXyNIzzR6ftpskGp58q3SN2y85dABBMLTD.fktXrOE.eAp+XtbX8gXFGztA.9RTGbnjFXj35zw93vPpM.By+AsCXwBf3me79SwtXNgl4B.tTvHzOw7XxLu8N9iLW2VXa5ELuoxtxwsIBdcgqHRgm7HSfOlLBeCsKVmVND3Lb3P.7MnA16aZac.olk09UqVybPsxjCGT1AWtBEO3PyZV3Cq5XVA.WqoMSJB5KwRZn5kdpvdb+gh63IGvkrP1.Wp1vBzWcxItA0Gxbs6cO4DB.vB8xnp7IT0lnNLa1D+YT1qhCXjUwzjFL2iAIq+.HAmBRERfzFn9j.luLKhFOOG0lq5fNXUuYZnjjKH25PTcgJCtbOO7HZq.kwjJ19.SycMT+ryQkJo5OgRiShrYhIGgw6LhkL6cCUFGoO1y2kNI91acFNvlHro1IJoVWYs0NG4DwIRlfaH3cER547s2oz2JUrz2KY7vPNNKLlFyABWWZvBCqEWAOVgayi7FPC103VraDcRhJxb1NzZKWGhjPgSknf2lyjm6SSsaIbs0Lu9+y2OAo8.0+9R6FXIV2hS8oxymFHYZ3.aPuUMTkzvKhZPCGIE9pwp4TCJcnvNxEKmUbpGaSCn3iYTD5tNOjIGO8X8CUrE987g4T7wS70tjvcCTOljLbw3M2Bvqh09Wi2z4+0QMcbnDYFXKfZc0iNrWX4jRYPYYG7eMZxPlQ59ZETzXZSz7ieyfwtT4chfQ5U+cEF76sx+WZME3yhHIieSGrLf8U.D0MxquZCOgp3MNm5pd4HXNs9Ow1Taq6i8ob6XiepdRCZosgoAstO3+kyvCSBDWSR1cnaCOK1i56lGe+TQ0EkJaCKP79joUjdpqCtlPl8UMWg6upEVdUKrxpVX0UsvCV0Be6pVXsmtP8s0mDIEdIKX.fN8ZFu.FBaxwJUd7bB3W.WeCizC
              
              1 Reply Last reply Reply Quote 0
              • bendursoB
                bendurso @David Healey
                last edited by bendurso

                @d-healey I found the source code for that API. https://github.com/christophhart/HISE/blob/372a9e682cff2f3b52ee432ae50977fc95d9173c/hi_scripting/scripting/api/ScriptingApi.cpp#L5997

                If I remove this check (Line 6009) I can declare an empty Hardcoded Master FX on init.

                if (asp->getNumDataObjects(ExternalData::DataType::AudioFile) > 0)
                

                Is this safe to do? Or there is a better way to handle it? @Christoph-Hart ? Thanks

                1 Reply Last reply Reply Quote 0
                • David HealeyD
                  David Healey
                  last edited by

                  I see the issue. How many convolution reverb networks will you be loading at any time?

                  Free HISE Bootcamp Full Course for beginners.
                  YouTube Channel - Public HISE tutorials
                  My Patreon - HISE tutorials

                  bendursoB 1 Reply Last reply Reply Quote 0
                  • bendursoB
                    bendurso @David Healey
                    last edited by

                    @d-healey I have 6 layers and 6 hardcoded master FX slots per layer. Users can load any effect into these hardcoded master FX slots. There are like 8 available networks, including the convolution reverb. Any of these effects—convolution included—can be loaded into any of the 36 hardcoded master FX slots :)

                    David HealeyD 1 Reply Last reply Reply Quote 0
                    • David HealeyD
                      David Healey @bendurso
                      last edited by David Healey

                      @bendurso I have an idea I want to play with - but I've forgotten how you load an effect into a hardcoded fx using scripting... how?

                      Got it.

                      Free HISE Bootcamp Full Course for beginners.
                      YouTube Channel - Public HISE tutorials
                      My Patreon - HISE tutorials

                      1 Reply Last reply Reply Quote 1
                      • David HealeyD
                        David Healey
                        last edited by

                        If you set the convolution node to use an external slot then it should work.

                        In this snippet I'm connecting it to an AudioWaveform control on the UI, just so we can see what's happening, but you don't have to do that. Instead I think you can use Engine.createAndRegisterAudioFile() - you'll need one for each slot.

                        HiseSnippet 1030.3ocyW90aaaCD.mxNrc16OsEn8cA+jyPWfUZhicGBpa7eVMVcpwbVW.1CEzRT1DQhzfhJIFCEXej5Gg9QZeC1NRIaI25zkYr0Y+PPHOd28iGu6H0PovkFEIjHqxmMeFEY8U3Qy4posmRXbT+NHq6gIwdLQOV.8LZjBcx7YjnHpGxxp3OnWjUocPle+wyNgDP3tzroPnWKXtzWxBYprYG15GYAA8HdzyXg4V8As56J3sEAhX.nh3ZnYD2KHSnmRzKq.F8BRzTj02hqcXyl0F23nl07q63PZzrQ8wjZNdG3Ra3P1uouyQ6OdrqKx5Nc8XJgbjhnnQHqcNQ3MezTwU7DG7ZVDab.UOvAMB7bxz8DAd5sndVT6or.ugKhTQHvJCyhaEShaODOf4wVNeV769FA1YZjO.ZUXU7JtBdN4wqVN7VCRV4PBmfzCvibkrYpLIZd9RbethJ8Iv4TdTNMN74KNnARvVVvIRhAPEdmEts.Tiq1KjbAsmDFrzLUqWq1isg+r62WtLb.ForujHs8u19XaSxzdSnpQABUuyqV4EDomq.BtCHQf98N2ohVMFOfwo19wbWESvsE7wJ9KEDOsakhfpthvYBN.viAiGDS2s7uUtj4+rO9XaG6mA9auHppquO0UUsBvwkhJ6Z+zUm+6b.u8VvgK1N.ZsWX5pURcZkc0pj551jffwPdX0OjIvR438Tgh9JdUCWkeaY6OTju+ZkkZq.pbsh0EHxOkhU4wgiox7QE8BgbzUyrv2blU9De2jvRtEJ384L0qlQ42T4.JMVpyBSoBp6TlbvGklCZRs9ExkTegLDw7z0EqLmCxrAx25vinHlpdIgOgBaDoRmWpEYloK2awXzO2uid0oD.v..NiJUL8d2pC8RnKTRUQIbGZzEJwLvzKO4Wx62jx6IwJkfa.sDN8XGccFc8aMOaPmVJ50ZafMKKB1R84CkTHGRWYgx4l69ONrbCN82+0VWw7TSyjNu0TJaxzr9ruW1Z1hio9d5VTebwGzLNquwNIQHnikvKNfnVsMltYep.HCbkdG5VA7HlZd9KC9Wq21sEwGfGxTtSWOiEVCiP5x+ELldivWiS54jA3N3dm+Yn8eZL5QYG21Im21f60br1DgUtKfptRHuvT7YU7Vynymlw6bKOGuGdni8VclFP39a8D9jsdBOXqmvC25Ir9+SD9ShXEiOY.QIYvUTX34iifms6RA53bZf4IjEzONHYbsEWUOhx8LC9S3WpPmku2DD5rP3mEeDRbkh23l7rEcWpuvLCru4lO5nDdfdr8ZdeRH7t92n+Fi7l5iTb+MUwmroJdvlp3gaph02TEOZSUrweuh5O654wJQXRsABMXXWyiDsr5xIPVtoLA8W.gl4IgB
                        

                        Free HISE Bootcamp Full Course for beginners.
                        YouTube Channel - Public HISE tutorials
                        My Patreon - HISE tutorials

                        bendursoB 1 Reply Last reply Reply Quote 0
                        • bendursoB
                          bendurso @David Healey
                          last edited by

                          @d-healey said in Preset Crash:

                          createAndRegisterAudioFile

                          So, instead of using getAudioSampleProcessor for loading the impulse responses, I can use Engine.createAndRegisterAudioFile(), and I should compile the convolution reverb with 36 different external slots?

                          David HealeyD 1 Reply Last reply Reply Quote 0
                          • David HealeyD
                            David Healey @bendurso
                            last edited by

                            @bendurso Yes, but test it first. Make a test project with maybe 4 slots.

                            Free HISE Bootcamp Full Course for beginners.
                            YouTube Channel - Public HISE tutorials
                            My Patreon - HISE tutorials

                            bendursoB 1 Reply Last reply Reply Quote 0
                            • bendursoB
                              bendurso @David Healey
                              last edited by

                              @d-healey Ok, cool — I'll give it a try, thanks! But do you think removing the conditional for searching audio files in the source code, just to be able to declare the empty hardcoded master FXs on init, is a bad idea? I compiled it and it seems to work fine :) I'm not sure yet if it solves the crashes though.

                              David HealeyD 1 Reply Last reply Reply Quote 0
                              • David HealeyD
                                David Healey @bendurso
                                last edited by

                                @bendurso I defer to Christoph on that, I'm not sure. Maybe make a github issue so it doesn't get lost in the forum.

                                Free HISE Bootcamp Full Course for beginners.
                                YouTube Channel - Public HISE tutorials
                                My Patreon - HISE tutorials

                                bendursoB 1 Reply Last reply Reply Quote 0
                                • bendursoB
                                  bendurso @David Healey
                                  last edited by bendurso

                                  @d-healey Great, thanks. I changed that but it keep crashing for him. This time it crashed right after he pressed the next button; the plugin didnt load anything more (I can see from the debug log).

                                  This is my script for next preset:

                                  inline function onbtnNextPresetControl(component, value)
                                  {
                                  	if (value)
                                  	{
                                  	Engine.loadNextUserPreset(0);
                                  	LookAndFeel.presetDisplayName = Engine.getCurrentUserPresetName();
                                  	LookAndFeel.btnPresetSelect.sendRepaintMessage();
                                  	}
                                  };
                                  
                                  Content.getComponent("btnNextPreset").setControlCallback(onbtnNextPresetControl);
                                  

                                  presetDisplayName is a variable I have in the LookAndFeel namespace where I store the name of the current preset.
                                  And btnPresetSelect is the button to display the preset name and to open the preset browser.

                                  Oh and the LookAndFeel namespace has 2600 lines. I'm not sure if this is relevant.

                                  Is there something wrong here that could cause a crash?

                                  David HealeyD 1 Reply Last reply Reply Quote 0
                                  • David HealeyD
                                    David Healey @bendurso
                                    last edited by

                                    @bendurso said in Preset Crash:

                                    Is there something wrong here that could cause a crash?

                                    I don't see any issue in that bit of code. Make a minimal project that just tests the effect loading stuff to rule out that being the issue.

                                    Free HISE Bootcamp Full Course for beginners.
                                    YouTube Channel - Public HISE tutorials
                                    My Patreon - HISE tutorials

                                    bendursoB 1 Reply Last reply Reply Quote 1
                                    • bendursoB
                                      bendurso @David Healey
                                      last edited by

                                      @d-healey I will check. And is it bad to use Engine.createUserPresetHandler and PresetHandler.setPostCallback in two different namespaces?

                                      David HealeyD 1 Reply Last reply Reply Quote 0
                                      • David HealeyD
                                        David Healey @bendurso
                                        last edited by

                                        @bendurso said in Preset Crash:

                                        Engine.createUserPresetHandler and PresetHandler.setPostCallback in two different namespaces?

                                        Yes. You can only have one of each so having two will lead to weirdness.

                                        Free HISE Bootcamp Full Course for beginners.
                                        YouTube Channel - Public HISE tutorials
                                        My Patreon - HISE tutorials

                                        bendursoB 1 Reply Last reply Reply Quote 2
                                        • bendursoB
                                          bendurso @David Healey
                                          last edited by

                                          @d-healey Thanks, I removed the extra preset handler, but it still keeps crashing for him. I think my code is pretty clean now.

                                          I'm starting to think the issue might be with the macros. I was thinking of disabling the macro modulation source before the preset change and re-enabling it afterward. Any other ideas regarding macros? I saw another post where @hisefilo had issues with preset changes involving macros.

                                          David HealeyD 1 Reply Last reply Reply Quote 0
                                          • David HealeyD
                                            David Healey @bendurso
                                            last edited by

                                            @bendurso said in Preset Crash:

                                            Any other ideas regarding macros?

                                            Make a minimal project to test it.

                                            Free HISE Bootcamp Full Course for beginners.
                                            YouTube Channel - Public HISE tutorials
                                            My Patreon - HISE tutorials

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

                                            23

                                            Online

                                            2.1k

                                            Users

                                            13.0k

                                            Topics

                                            112.4k

                                            Posts