handleIncomingMidiMessage producing "EXC_BAD_ACCESS" error

If you’re building with Xcode, try enabling Address Sanitizer (ASAN). You can do this by clicking on your app’s name in the title bar next to the run/stop buttons, selecting ‘Edit Scheme’, then clicking ‘Diagnostics’, then selecting the ASAN checkbox.

ASAN will give you a detailed report any time a memory-related issue (like an EXC_BAD_ACCESS) occurs, which might help you track down the problem. The diagnostic output will normally be printed to the ‘console’ window inside Xcode.