JuceMidiSupport.handleDeviceChanged error

Thanks for reporting this issue. There was another similar issue that got patched recently:

I wonder whether you’ve tested on the latest version of JUCE to see whether this issue has been fixed there. If you’re still seeing problems, then I can take another look.