Hi All,
This is my first post here and I hope it is descriptive and my English is good enough. I am very sorry if not.
Short description
I have a plugin which is using AudioProcessorGraph. I tried to test it with pluginval, but unfortunately, tests failed. My understanding of call trace in a log is that there can be a problem in AudioProcessorGraph. So I have checked if I can reproduce this issue with the plugin from Tutorial: Cascading plug-in effects and this plugin also is failing in pluginval.
What I found?
Logs from pluginval (ex. 1.txt (3.4 KB)) do not say much, so I attached Visual Studio to pluginval process and run pluginval with “validate in process” option selected.
- Sometimes I got exception (call_stack_from_pluginval_1.txt (2.3 KB)):
Exception thrown: read access violation.
**this** was 0xFFFFFFFFFFFFFFFF. occurred
in HeapBlock:
inline operator ElementType*() const noexcept { return data; }
- and sometimes an assert:
jassert (isPositiveAndBelow (channel, numChannels));
is failing in AudioBuffer#clear. (I did not save call stack and now I cannot repeat this one).
- Another time I got an exception (call_stack_from_pluginval_2.txt (1.8 KB)):
Exception thrown: read access violation.
**this** was 0xFFFFFFFFFFFFFFAF.
in AudioProcessorGraph::Node::prepare.
All call stacks have in common:
AudioProcessorGraph::buildRenderingSequence()
AudioProcessorGraph::handleAsyncUpdate()
And because failing test AudioProcessingTest (BasicTests.cpp in pluginval) is looping with:
instance.releaseResources();
instance.prepareToPlay (sr, bs);
it looks for me that the async update is trying to build the sequence after releaseResources, or even after deleting object of AudioProcessorGraph.
Checked with JUCE versions:
- 5.4.3 release
- dev (8a66f1f)
and only with Windows 8.1.
Scenarios
- Build a plugin from tutorial “Tutorial: Cascading plug-in effects” and test it in pluginval.
- I was also able to reproduce such a problem in Ableton Live 9 (VST2) turning on and off (call_stack_from_ableton9.txt (2.0 KB)). I did not check with other DAWs.
Question
It looks like some minor issue , but maybe somebody knows if a plugin can be somehow secured?
In case of the plugin which I am tasting now, I will change AudioProcessorGraph to ProcessorChain, because I do not need changing processors and connections in runtime.
But still AudioProcessorGraph is a very interesting and helpful class, so it would be great to know how to deal with this issue.
Best regards,
Mateusz