AudioFormatManager::registerBasicFormats() hangs

Hi, I’m on Mac, very rarely using registerBasicFormats() will make my program hang. I can get it going again by halting execution then continuing. I use the function during the program’s initialisation using something similar to the following code. I assume it’s a rare race condition, is there some kind of processor virtual function I can override for things like this?

    createPluginFilter()
    {
        new MyProcessor();//inherits AudioProcessor
    }

    MyProcessor()
    {
        ScopedPointer<AudioFormatManager> formatManager = new AudioFormatManager
        formatManager->registerBasicFormats(); //hangs, maybe 1/20 times
    }

If you pause in the Xcode debugger when your program hangs you should be able to see where your program is getting stuck by looking at the stack trace. That will help us work out what’s going on.

It hangs calling AudioFileGetGlobalInfo in findFileExtensionsForCoreAudioCodecs in juce_CoreAudioFormat.cpp.