Android Midi Crash


#1

Hi!

I am trying to run a JUCE android app that interacts with midi. However, when I try calling MidiInput or MidiOut::getDevices().size() or similar commands the app crashes and I get

11-02 16:50:59.589 1391 1417 W art : Suspending all threads took: 19.111ms
11-02 16:50:59.607 1755 1755 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-02 16:50:59.607 1755 1755 F DEBUG : Build fingerprint: 'Android/sdk_phone_armv7/generic:7.0/NYC/3245079:userdebug/test-keys’
11-02 16:50:59.608 1755 1755 F DEBUG : Revision: '0’
11-02 16:50:59.608 1755 1755 F DEBUG : ABI: 'arm’
11-02 16:50:59.609 1755 1755 F DEBUG : pid: 1731, tid: 1731, name: r.MobileTestApp >>> air.MobileTestApp <<<
11-02 16:50:59.610 1755 1755 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
11-02 16:50:59.611 1755 1755 F DEBUG : r0 00000000 r1 00000000 r2 00000000 r3 00000000
11-02 16:50:59.611 1755 1755 F DEBUG : r4 8ce4eb20 r5 be9d3f20 r6 be9d3ce8 r7 be9d3ca8
11-02 16:50:59.611 1755 1755 F DEBUG : r8 be9d3f20 r9 ab005400 sl be9d3dfc fp be9d3b54
11-02 16:50:59.611 1755 1755 F DEBUG : ip ac1ae94c sp be9d3b40 lr 8c6f5cb8 pc 8c6f522c cpsr 60000010
11-02 16:50:59.635 1755 1755 F DEBUG :
11-02 16:50:59.635 1755 1755 F DEBUG : backtrace:
11-02 16:50:59.636 1755 1755 F DEBUG : #00 pc 003df22c /data/app/air.MobileTestApp-1/lib/arm/libjuce_jni.so (_ZN7_JNIEnv17CallObjectMethodVEP8_jobjectP10_jmethodIDSt9__va_list+32)
11-02 16:50:59.637 1755 1755 F DEBUG : #01 pc 003dfcb4 /data/app/air.MobileTestApp-1/lib/arm/libjuce_jni.so (_ZNK4juce9GlobalRef16callObjectMethodEP10_jmethodIDz+92)
11-02 16:50:59.637 1755 1755 F DEBUG : #02 pc 003ee8d0 /data/app/air.MobileTestApp-1/lib/arm/libjuce_jni.so (_ZN4juce24AndroidMidiDeviceManagerC2Ev+52)
11-02 16:50:59.637 1755 1755 F DEBUG : #03 pc 003eefd4 /data/app/air.MobileTestApp-1/lib/arm/libjuce_jni.so (_ZN4juce10MidiOutput10getDevicesEv+48)
11-02 16:50:59.638 1755 1755 F DEBUG : #04 pc 0039bd2c /data/app/air.MobileTestApp-1/lib/arm/libjuce_jni.so (Java_com_test_juce_AudioApp_getMidiInDeviceCount+52)
11-02 16:50:59.639 1755 1755 F DEBUG : #05 pc 0013244d /data/app/air.MobileTestApp-1/oat/arm/base.odex (offset 0x124000)

I have tried running basic android midi tests using the Projucer and as soon as I try to retrieve the MidiInput I receive the same error.

Any help would be greatly appreciated.

Thanks,
Zack


#2

Have you reproduced this in the JUCE demo app as well? You can go to the Audio Settings page and select a midi device.