if i open up a plugin editor window and start playback, closing the editor will cause the audi to break.

It would be a good idea to make audio playback totally insulated from any GUI actions or user operations.