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

Calling shutdownAudio() in component dtor #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bgolinvaux
Copy link
Contributor

@bgolinvaux bgolinvaux commented Dec 22, 2024

The audio app template, as it was before the fix, triggers the following :

any.AudioAppTemplate.savedState/
JUCE Assertion failure in juce_AudioAppComponent.cpp:54
Process 67014 stopped
* thread #1, name = 'JUCE v8.0.4: Message Thread', queue = 'com.apple.main-thread', stop reason = EXC_BREAKPOINT (code=1, subcode=0x10089010c)
    frame #0: 0x0000000100890110 Audio App Template`juce::AudioAppComponent::~AudioAppComponent(this=0x000000012d872600) at juce_AudioAppComponent.cpp:54:5
   51  	{
   52  	    // If you hit this then your derived class must call shutdown audio in
   53  	    // destructor!
-> 54  	    jassert (audioSourcePlayer.getCurrentSource() == nullptr);
   55  	}
   56  	
   57  	void AudioAppComponent::setAudioChannels (int numInputChannels, int numOutputChannels, const XmlElement* const xml)
Target 0: (Audio App Template) stopped.
(lldb) ft

It's in debug mode (hence the assert trigger) with JUCE develop as of 29e6bee (with the Xcode 16.2 toolchain)

I think that this Audio App Template is the only place in your repo where AudioAppComponent is used and could trigger this assertion.

I take advantage of this to thank you profusely for this 'all-in-one' repo that really helps when starting with JUCE! 🙏

Hope this helps!

@bgolinvaux bgolinvaux marked this pull request as ready for review December 29, 2024 15:41
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.

1 participant