numUsed expression cannot be evaluated?



I am having a error I cannot solve, the problem does not appear to be with my code (but I am certainly happy to be proved wrong).

It occurs when I try to use an AudioFormatManager object to:     formatManager.registerBasicFormats();

Which then tries to call:      registerFormat (new WavAudioFormat(), true);

Then:     getNumKnownFormats();

The program stops in juce_OwnedArray.h:    

    inline int size() const noexcept
        return numUsed;

numUsed expression cannot be evaluated.


Any help or advice would be greatly appreciated!




Are you sure your format manager wasn't deleted in between ?

Try to add a watch to "this"  in size . It might be null or have an invalid value.