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
Assertion failure false-positives when using OpenGL in audio plugins in OS X #88
Comments
I think the suggested checks in checkGLError are really just a workaround for the underlying problem that the openGLContext needs to know when the component is removed from a peer before it happens. I'll try to add a workaround.... |
…omponent from a window (Fixes #88)
Can you confirm that this is now fixed on develop? |
With the latest develop adding the JUCE demo plugin (unmodified/without OpenGL) in Tracktion as VST or VST3 crashes. (and before the last commit 99186e5 it doesn't crash) |
OK Let me know if it works now. |
It still crashes as VST and VST3.. Tried to enable address sanitizer and thread sanitizer to see if I get any clues to the cause of the crash.. tsan writes some stuff that seems irrelevant but maybe this line is relevant:
? |
…JUCE-internal fix for OpenGLContext detach crash Fixes #88
Can you check if the latest commit on develop fixes the issue? |
Yes! Looks like it works now! |
Thank you for reporting! |
…ug-in windows" This reverts commit 7d371d7. The bug was eventually solved differently in the official juce branch and this is no longer needed. See juce-framework#88
This means that debug assertion trigger when closing plugin window occasionally, or near-always if also using plain JUCE opengl support without using CVDisplayLink as in SR's branch. Revert "Partially undo commits #99186e5 and #89d938d and use less-intrusive, JUCE-internal fix for OpenGLContext detach crash" This reverts commit c7b3472. Revert "Call removeFromDesktop when an external host tries to remove a juce component from a window (Fixes juce-framework#88)" This reverts commit 99186e5.
…ndows Reapply 7d371d7 to solve juce-framework#88
I verified that reverting the fixes for this issue (soundradix@1935232) resolves #120 which was introduced by them. Applying instead the fix that I previously suggested (soundradix@589d7cc), on SR's branch which uses CVDisplayLink on macOS, seems to resolve this issue without introducing any other problems afaik so far.. |
To trigger this bug we need to modify the JUCE demo plugin to use OpenGL with continuous rendering enabled.
Demo plugin modifications:
OpenGLContext context;
member inJuceDemoPluginAudioProcessorEditor
.context.attachTo (*this); context.setContinuousRepainting (true);
inJuceDemoPluginAudioProcessorEditor
's constructor andcontext.detach();
in its destructor.Then debug the plugin in Xcode when running via Traction 7.1.1 (though I believe the behavior is similar across all hosts), and use the plugin as either AU, VST, or VST3. Just open a plugin window and then either close it or switch to a different application. This triggers the assertion error in
checkGLError
about 90% of the time.Tested on OS X 10.11.6 using Xcode 7.3.1, in 64-bit mode, with either the JUCE master branch or the develop branch.
The following patch which adds some additional checks in
checkGLError
for these cases seems to almost solve the problem but it still occasionally triggers: soundradix@7d371d7When combined with changes making the OpenGL rendering on OS X use
CVDisplayLink
(these new changes are available in soundradix's branch but are not yet thoroughly tested), the above patch appears to solve the issue completely.The text was updated successfully, but these errors were encountered: