MIDINetworkConnection BAD_ACCESS on dealloc (iOS 9

2019-08-07 20:07发布

I've got a strange Network MIDI issue that's arisen in iOS 9 which effectively works like the following:

  1. I do a NSNetServiceBrowser scan for wifi midi devices.
  2. It finds my macbook and I create a MIDINetworkConnection with the host from the NSNetService and store this in an ivar
  3. 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?

0条回答
登录 后发表回答