HISE Logo Forum
    • Categories
    • Register
    • Login

    saveUserPreset overwrite existing files = crash

    Scheduled Pinned Locked Moved Bug Reports
    6 Posts 3 Posters 277 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.
    • Dan KorneffD
      Dan Korneff
      last edited by

      When using saveUserPreset, I'm experiencing an instant crash (HISE and compiled plugin) when I overwrite an existing preset.
      Here's what I'm doing:

      function save(file)
      {
          Engine.saveUserPreset(file);
      }
      
      inline function onPRESET_SAVEControl(component, value)
      {
          if (value)
          {
              FileSystem.browse(FileSystem.UserPresets, true, "*.preset", save); 
          }
          
      	
      };
      
      Content.getComponent("PRESET_SAVE").setControlCallback(onPRESET_SAVEControl);
      

      Dan Korneff - Producer / Mixer / Audio Nerd

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

        @dustbro Do you have read-only factory presets enabled in preferences? And if so does that setting make a difference?

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

        Dan KorneffD 1 Reply Last reply Reply Quote 0
        • Dan KorneffD
          Dan Korneff @d.healey
          last edited by

          @d-healey I do not have that enabled.

          Dan Korneff - Producer / Mixer / Audio Nerd

          ustkU 1 Reply Last reply Reply Quote 0
          • ustkU
            ustk @Dan Korneff
            last edited by

            @dustbro what about this flag that I added recently if you set it to disabled:

            Screenshot 2022-03-21 at 16.03.07.png

            Can't help pressing F5 in the forum...

            Dan KorneffD 1 Reply Last reply Reply Quote 0
            • Dan KorneffD
              Dan Korneff @ustk
              last edited by

              @ustk It was happening before that new option was added too. I just tried and both ways crash.

              Dan Korneff - Producer / Mixer / Audio Nerd

              1 Reply Last reply Reply Quote 0
              • Dan KorneffD
                Dan Korneff
                last edited by

                Circling back around to this issue as this still happens on all of my builds. Would love to get some help on this one.
                Overwriting an existing preset will crash my plugs.

                When I debug the standalone version on PC, I get the following;

                 	Test Debug.exe!juce::MessageManager::callFunctionOnMessageThread(void *(*)(void *) func, void * parameter) Line 176
                 	Test Debug.exe!juce::Component::runModalLoop() Line 1746
                 	Test Debug.exe!hise::PresetHandler::showYesNoWindow(const juce::String & title, const juce::String & message, hise::PresetHandler::IconType type) Line 682
                 	Test Debug.exe!hise::UserPresetHelpers::saveUserPreset(hise::ModulatorSynthChain * chain, const juce::String & targetFile, juce::NotificationType notify) Line 61
                 	Test Debug.exe!hise::ScriptingApi::Engine::saveUserPreset(juce::var presetName) Line 2251
                 	Test Debug.exe!hise::ScriptingApi::Engine::Wrapper::saveUserPreset(hise::ApiClass * m, juce::var value1) Line 859
                 	Test Debug.exe!hise::ApiClass::callFunction(int index, juce::var * args, int numArgs) Line 366
                 	Test Debug.exe!hise::HiseJavascriptEngine::RootObject::ApiCall::getResult(const hise::HiseJavascriptEngine::RootObject::Scope & s) Line 140
                 	Test Debug.exe!hise::HiseJavascriptEngine::RootObject::Expression::perform(const hise::HiseJavascriptEngine::RootObject::Scope & s, juce::var * __formal) Line 633
                 	Test Debug.exe!hise::HiseJavascriptEngine::RootObject::BlockStatement::perform(const hise::HiseJavascriptEngine::RootObject::Scope & s, juce::var * returnedValue) Line 52
                 	Test Debug.exe!hise::HiseJavascriptEngine::RootObject::FunctionObject::invoke(const hise::HiseJavascriptEngine::RootObject::Scope & s, const juce::var::NativeFunctionArgs & args) Line 560
                 	Test Debug.exe!hise::HiseJavascriptEngine::callExternalFunctionRaw(juce::var function, const juce::var::NativeFunctionArgs & args) Line 413
                 	Test Debug.exe!hise::HiseJavascriptEngine::callExternalFunction(juce::var function, const juce::var::NativeFunctionArgs & args, juce::Result * result, bool allowMessageThread) Line 449
                 	Test Debug.exe!hise::WeakCallbackHolder::CallableObject::call(hise::HiseJavascriptEngine * engine, const juce::var::NativeFunctionArgs & args, juce::var * returnValue) Line 904
                 	Test Debug.exe!hise::WeakCallbackHolder::operator()(hise::JavascriptProcessor * p) Line 738
                 	[External Code]	
                 	Test Debug.exe!hise::JavascriptThreadPool::Task::callWithResult() Line 2012
                 	Test Debug.exe!hise::SuspendHelpers::Suspended<hise::JavascriptThreadPool::Task,hise::SuspendHelpers::FreeTicket>::call() Line 221
                 	Test Debug.exe!hise::JavascriptThreadPool::executeQueue(const hise::JavascriptThreadPool::Task::Type & t, juce::Array<juce::WeakReference<hise::JavascriptProcessor,juce::ReferenceCountedObject>,juce::DummyCriticalSection,0> & pendingCompilations) Line 1866
                 	Test Debug.exe!hise::JavascriptThreadPool::executeQueue(const hise::JavascriptThreadPool::Task::Type & t, juce::Array<juce::WeakReference<hise::JavascriptProcessor,juce::ReferenceCountedObject>,juce::DummyCriticalSection,0> & pendingCompilations) Line 1876
                 	Test Debug.exe!hise::JavascriptThreadPool::run() Line 1931
                 	Test Debug.exe!juce::Thread::threadEntryPoint() Line 96
                 	Test Debug.exe!juce::juce_threadEntryPoint(void * userData) Line 119
                 	Test Debug.exe!juce::threadEntryProc(void * userData) Line 66
                 	Test Debug.exe!thread_start<unsigned int (__cdecl*)(void *),1>(void * const parameter) Line 97
                 	[External Code]	
                

                Dan Korneff - Producer / Mixer / Audio Nerd

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

                21

                Online

                1.7k

                Users

                11.8k

                Topics

                103.0k

                Posts