Juce 1.5 demo plugins text problem

We are observing a very strange problem with Juce 1.5 2/23/10. We have build the demo RTAS plugin along with our own RTAS plugin. When both of these plugins are present in the Digidesign Plun-Ins folder, the demo text is not drawn in the juce demo plugin. This is the text drawn in updateParametersFromFiler when the slider is moved. This does not appear to affect the text in our plugin. If we remove our plugin, there is no problem in the demo plugin.

So, we made two slightly different versions of the juce demo plugin and the same thing happens with the text in the second plugin. It is never drawn! We are running on ProTools version 7.4 but the problem also also happens on PT 8.0. There is no connection between the two plugins in Info.plist or JucePluginCharacteristics. Changes were made in JucePluginCharacteristics as if we were making two different plugins.

To further isolate the problem, we also made two versions (again, with these different values in JucePluginCharacteristics) of the juce demo as VST plugins and loaded them with Ableton Live 7.0. The same thing happens there. No text drawn in the second plugin.

I don’t know when this started happening, but we have other plugins built with juce 1.45 that are also present and there is no such interaction occurring with these.

OK, I just tried this with the demo plugin and my own plugin, as your posting made me paranoid. I was unable to replicate this behavior in Live 8.0 or Logic (on OS 10.5.8 )… as any attempts I made to use both the demo plugin and my own plugin resulted in the host CRASHING.

I will track down and see if this is my own bug, but it is a bit disconcerting, to say the least.

Sean Costello

I just compiled one of my older reverb plugins that was built in Juce, using the latest Juce tip, and was able to run it in Live 8.0 as the same time as the plugin that was crashing in the post above. So having 2 Juce-based plugins running at once doesn’t seem to be a problem here. Putting the Juce Demo plugin in there crashes things for me. Not sure what is going on.

When I run both of my own Juce plugins, the text is drawn properly when the slider is moved.

Sean Costello

This sounds like our old friend the obj-c classname clash problem. Have you tried setting a unique value for JUCE_ObjCExtraSuffix in your build?

This appears to work, thanks! I see that this is explained in “How To Use This Framework.h”.

Would you consider something like this since it is such a gotcha…

Instead of …

#ifndef JUCE_ObjCExtraSuffix
#define JUCE_ObjCExtraSuffix 3
#endif

do this…

#ifndef JUCE_ObjCExtraSuffix
#error “You must define JUCE_ObjCExtraSuffix”
#endif

or at least #warning?

Thanks
Jim Stammers
Minnetonka Audio Software, Inc.

That’s actually a very good idea - thanks, Jim.

Where is the proper place for this #define? I have placed it in my project in the juce_LibrarySource.mm file, right above the line

#include "juce_amalgamated.mm"

Does this seem about right? It seems to fix my crashing bug, which is nice.

Will Jim’s suggestion be making it into the tip?

Sean Costello

Yes, it’d work ok there.

It might already be there, I checked some stuff in earlier today.