Quantcast
Viewing all articles
Browse latest Browse all 40524

ofxMIDI on iOS crashes if I close other MIDI app

Hi, I'm using @danomatika's ofxMIDI addon for my app.
Everything works fine in general, but if I open other MIDI supporting apps (such as Music IO, Mobmuplat and so on) in the background then close the app while my app is running, my app suddenly crashes.

The crash happens when it calls "void ofApp::midiInputRemoved(string name, bool isNetwork)" function. The error happens when it's trying to close port in the function. (input->closePort)

The error message is as below.

2015-10-15 14:59:13.193 MyApp[2416:1056922] Error (Disconnecting from MIDI source): -50:Error Domain=NSMachErrorDomain Code=-50 "The operation couldn’t be completed. (Mach error -50.)"
ofxMidi: input removed: Music IO (MIDI) network: 0

2015-10-15 14:59:13.195 MyApp[2416:1056922] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 1 beyond bounds [0 .. 0]'
*** First throw call stack:
(0x184f202d8 0x1964e00e4 0x184e0385c 0x1000675e0 0x100063448 0x10006651c 0x100142f88 0x1856ec7c0 0x1856c9654 0x1856e4f94 0x184ed7a54 0x184ed79b4 0x184ed5934 0x184e012d4 0x18e4df6fc 0x1899c6fac 0x1005e4a70 0x1005e4900 0x1005c4b10 0x10047b940 0x10047b7f4 0x10047b708 0x100045194 0x196b5ea08)
libc++abi.dylib: terminating with uncaught exception of type NSException

If I delete the "closePort" part, it doesn't crash in the beginning but if I repeat the task, it crashes at some point. I think it's due to a memory leaking.

Could anybody help me fix this problem please? I would really appreciate.
Thank you very much!!


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>