我有一个非常快速更新的BLE特性(每秒> 20次更新)。我的应用程序工作正常,直到我开始从特征接收更新。该特征设置为通知。
我的应用程序作为两个ViewControllers,一个用于选择和连接BLE设备,另一个用于读取特征并订阅它们。当移回到发现BLE设备的View Controller时会发生崩溃。
(lldb)bt报告以下内容: -
* thread #1: tid = 0x1605b9, 0x000000019700bbd0 libobjc.A.dylib`objc_msgSend + 16, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x10)
* frame #0: 0x000000019700bbd0 libobjc.A.dylib`objc_msgSend + 16
frame #1: 0x0000000185440b3c CoreBluetooth`-[CBPeripheral handleMsg:args:] + 284
frame #2: 0x000000018543c9d4 CoreBluetooth`-[CBCentralManager xpcConnection:didReceiveMsg:args:] + 164
frame #3: 0x0000000100138fd4 libdispatch.dylib`_dispatch_call_block_and_release + 24
frame #4: 0x0000000100138f94 libdispatch.dylib`_dispatch_client_callout + 16
frame #5: 0x0000000100143db8 libdispatch.dylib`_dispatch_queue_drain + 780
frame #6: 0x000000010013c2c4 libdispatch.dylib`_dispatch_queue_invoke + 132
frame #7: 0x000000010013d6f4 libdispatch.dylib`_dispatch_main_queue_callback_4CF + 532
frame #8: 0x000000018578b7f8 CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
frame #9: 0x00000001857898a0 CoreFoundation`__CFRunLoopRun + 1492
frame #10: 0x00000001856b52d4 CoreFoundation`CFRunLoopRunSpecific + 396
frame #11: 0x000000018eecb6fc GraphicsServices`GSEventRunModal + 168
frame #12: 0x000000018a27afac UIKit`UIApplicationMain + 1488
frame #13: 0x00000001000d861c Sting Ray Controller (v3) i5 1.0.2`main(argc=1, argv=0x000000016fd2f9e0) + 124 at main.m:14
frame #14: 0x0000000197676a08 libdyld.dylib`start + 4
我只是在猜测,但是这是因为它在关闭运行收集更新的ViewController时尝试读取和处理特性?