Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plug memory leak calling setStateInformation() on hosted VST3 #484

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from

Conversation

getdunne
Copy link

@getdunne getdunne commented Feb 8, 2019

See my JUCE Forum post https://forum.juce.com/t/memory-leak-calling-setstateinformation-on-hosted-vst3-plugin/31660, and test/demo project https://github.com/getdunne/juce-wrapper. I think the leak is caused by the ComSmartPtr<Steinberg::MemoryStream> object getting initialized with a reference count of 2 here, when it should be just 1.

Repeatedly switching audio on, then off in a standard Audio/Midi Settings dialog would cause an assert failure, which I tracked to AudioIODevice::getAvailableBufferSizes() sometimes returning duplicate results.
@tpoole
Copy link
Member

tpoole commented Mar 25, 2019

For the second commit, what platform were you using when you spotted duplicates?

@getdunne
Copy link
Author

For the second commit, what platform were you using when you spotted duplicates?

My mistake--that second commit wasn't meant to be part of the original memory leak fix. It's a separate issue. I committed the change to my own fork because I use GitHub to propagate among different development PCs and Macs. It didn't occur to me that it would come up for you as part of the open PR--sorry about that.

I don't consider this change definitive in any way, but the duplicates do occur, so probably ought to be investigated.

To answer your question, I saw this on Windows 10 64-bit, when I opened a standard Audio Device Setup dialog and ticked, then un-ticked the box for input channels 1&2. For some reason the block size 128 was enumerated twice.

getdunne and others added 14 commits September 7, 2023 14:18
This is only needed for the Unify application. Eventually I hope to have a clean work-around which will not require any change to JUCE code.
This is probably only required to enable use of an older version of the AAX SDK.
Making the params member public allows my version of the Generic Audio Processor Editor to keep working.
Without this change, I don't believe there is any way to allow plug-in parameter names to be updated by the plug-in.
RIFF chunks are supposed to be padded to even length, but some WAV files feature an odd-length "data" chunk. These changes make the WAV reader code tolerant to this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants