How to update Midi Device

I got the same error with the default “Audio Application” project. I’ve verified that all the JUCE module paths are correct, and the Xcode target builds successfully (without adding/changing any settings).
The error appears no matter if “create local copy” is set for the modules or not.

Have you tried with the newest version of Projucer built from github? I added some module path checking to it.

I just tried it: Built Projucer from latest Github commit (5049bab). Since it doesn’t contain the JUCECompileEngine.dylib, I added that manually from the latest juce-grapefruit ZIP from the website.

Unfortunately, the same error still appears…I have taken care to not change any settings whatsoever.

+1 running into the exact same issue.

Yeah I can now reproduce the same issue with MIDIGetNumberOfSources. It happens whenever you try to do Projucer live coding with apps that include the audio modules.

I’m on it!

Fixed now, see my post here.

Hi.
I don’t know why, but I might found solution to fix this issue.

Would you try to call MIDIClientCreate before calling MIDIGetNumberOfSources?

(ex) juce_mac_CoreMidi.cpp L172

static StringArray findDevices (const bool forInput)
{
    // It seems that OSX can be a bit picky about the thread that's first used to
    // search for devices. It's safest to use the message thread for calling this.
    jassert (MessageManager::getInstance()->isThisTheMessageThread());

    StringArray s;

    if(getGlobalMidiClient())
    {
        const ItemCount num = forInput ? MIDIGetNumberOfSources()
                                       : MIDIGetNumberOfDestinations();
                                   
        for (ItemCount i = 0; i < num; ++i)
        {
            MIDIEndpointRef dest = forInput ? MIDIGetSource (i)
                                            : MIDIGetDestination (i);
            String name;

            if (dest != 0)
               name = getConnectedEndpointName (dest);

            if (name.isEmpty())
                name = "<error>";
            s.add (name);
        }
    }
    else
    {
        jassertfalse;
        s.add("<error>");
    }

    return s;
}