registerBasicFormats() and XCode Debugger


#1

Tip and XCode 5

The XCode debugger seems to get screwy* when creating a new CoreAudioFormat object in AudioFormatManager::registerBasicFormats()

Any way to fix this? It doesn’t just cause an issue at that line… all breakpoints after that line get screwy.*

I did find this thread (http://www.juce.com/forum/topic/registerbasicformats-freeze) from April …which may be related.

Thanks,

Rail

*Screwy: The debugger starts jumping to unrelated lines of code.

Confirmed in the Demo app - put a breakpoint in AudioDemoPlaybackPage.cpp at line 221 and step to line 66 in juce_AudioFormatManager.cpp


Xcode 9.2 debugger not stopping at the correct breakpoint line
#2

The thing that happens in there is that it calls findFileExtensionsForCoreAudioCodecs(), which asks the OS for all its codec formats. On my machine, that spews out a heap of debugging that indicates that the OS is loading/testing all the codec modules that it can find. It could be that one of the codecs on your machine is doing something funny to the stack or otherwise confusing the debugger. But I don't think this is a "real" bug, just the debugger struggling to cope.


#3

Yeah, It’s just a pain in the rear… 'cause if I have that function call anywhere in my plugin and try and debug unrelated code somewhere later (in a completely different scope) the debugger is still “off”.

Of course just running the program is fine – this is purely a debugger issue… I’ll just keep line 66 commented out while I debug.

Thanks,

Rail


#4

I was about to post a topic, but (as usual) I searched for the issue

My workaround was to just use the codec I need (manager->registerFormat(...)).