I have a little bit of a problem with reloading an APVTS from Xml. This problem seems to crash JUCE.
There are 2 buttons, save and load.
Save will save a Parameter living in an
AudioProcessorValueTreeState to an XML file on your desktop.
Load will reload said XML file and try to replace the current APVTS with the one from the XML.
There are a loadPreset() and savePreset() function in the AudioProcessor that do this.
The error happens in the loadPreset function, when
copyPropertiesAndChildrenFrom() function happens a call to
removeAllChildren which then uses a while loop to remove all Children from the
ValueTree::SharedObject. This while loop seems to be getting stuck and the children never actually get removed from my tree.
I consulted on another forum with this problem already and @matkatmusic was able to recreate the problem with my sample code.
Can anyone else reproduce this?
The code, as it is on the git repo right now causes my RAM to explode… Am I doing something wrong or is this a deeper problem with this function?