I’m trying to build an AU plugin using source that yields a working RTAS under Windows. The AU loads fine in the Juce Plugin Host and even processes audio, but when I try to open the editor UI I get EXC_BAD_ACCESS in the call to CharPointer_UTF8::getAddress() resulting from the following line in JuceAU::GetProperty():
(This is for kAudioUnitProperty_CocoaUI)
I can’t see how this would relate to any of my own code. Any ideas?
Well… I can’t think of any way in which that line could possibly fail to work. A File object always returns a valid string, and toUTF8 always returns a valid pointer. It really just can’t go wrong…
Are you sure it’s not the following line that’s crashing, where it actually loads the bundle?
Might be helpful to do some debugging and find out what the strings are that it’s using?
Well, all I can think of would be that maybe the Obj-C++ compiler is failing to correctly handle the scope of the temporary String object that’s involved. Does it work if you rephrase it like this: