问题
I've got a strange Network MIDI issue that's arisen in iOS 9 which effectively works like the following:
- I do a NSNetServiceBrowser scan for wifi midi devices.
- It finds my macbook and I create a MIDINetworkConnection with the host from the NSNetService and store this in an ivar
- I do another scan some time later which nils the ivar. This causes a BAD_ACCESS in the internal dealloc of MIDINetworkConnection
Stack trace:
#0 0x000000019902dbd0 in objc_msgSend ()
#1 0x0000000184c41698 in _MIDINetworkHostImpl::~_MIDINetworkHostImpl() ()
#2 0x0000000184c40a50 in -[MIDINetworkConnection dealloc] ()
#3 0x0000000199035ae8 in (anonymous
namespace)::AutoreleasePoolPage::pop(void*) ()
#4 0x000000018430cb6c in _CFAutoreleasePoolPop ()
#5 0x0000000189c34d48 in _prepareForCAFlush ()
#6 0x0000000189c3a1e8 in _beforeCACommitHandler ()
Any ideas or pointers to dig deeper?
来源:https://stackoverflow.com/questions/32957397/midinetworkconnection-bad-access-on-dealloc-ios-9