I have a crash in my AudioUnit plug-in (running under Logic 9 and Logic X - Mac OS X 10.8.4. Does not reproduce in AU Lab)
My AudioUnit plug-ins performs the draw in a separate thread. When a Plug-in GUI is closed the AU plug-in receives a call to: NSView removeFromSuperviewWithoutNeedingDisplay Problem is, that starting OS X 10.8.4, at the time the AU is called with this function, my separate thread that performs the draw is still running. However, at this point some things are already destroyed so I receive an openGL error while attempting the draw: Invalid framebuffer operation(1286). This of course leads to graphic corruption in the next plug-in GUI draw, and also to a crash after several GUI open and close attempts.
The questions are: 1. Is there a function that can be implemented that is called before NSView removeFromSuperviewWithoutNeedingDisplay? This way, I can stop the drawing in the separate thread before Logic destroys the view. 2. If there is no way, do you have any other suggestion? Maybe check something in every attempt to draw?
Thanks! C.