[EDIT] See below - it seems this strange behaviour was most likely due to not having a virtual destructor declared in a base class.
I am getting errors that seem to be related to Font, and using the malloc_error_break breakpoint in Xcode it seems to be coming from juce_Font.cpp at line 58:
juce_DeclareSingleton (TypefaceCache, false)
Its triggered from the first Label or TextEditor in a component that I am instantiating.
No idea how to debug this further, or if theres a possibilty it might be a JUCE issue?
Its an intermittent error, sometimes does not occur. Usually after a successful run, upon stop and restarting the app again, the error will crop up again, or a different error, from line 484 of juce_mac_NSViewComponentPeer.mm:
if (makeActiveWindow) [window makeKeyAndOrderFront: nil]; // <-- EXC_BAD_ACCESS here else [window orderFront: nil];
So suspect its some kind of memory thing. Any advice on how to debug this kind of error would be much appreciated.