EXC_BAD_ACCESS in iOS 8 Simulator using CoreBluetooth
| Originator: | jesus | ||
| Number: | rdar://18581942 | Date Originated: | 2014-10-08 |
| Status: | Open | Resolved: | |
| Product: | Xcode | Product Version: | 6.0.1 |
| Classification: | Developer Tools | Reproducible: | Always |
Summary: An immediate or quick release of a recently instantiated CBCentralManager object causes a EXC_BAD_ACCESS exception in iOS 8 Simulator. Steps to Reproduce: Instantiate and make nil a CBCentralManager instance in a short time interval. The attached class makes these two calls in a sequential way as an easy way to reproduce the crash, but we found the issue in an unit test case which happened to instantiate a CBCentralManager. After the case finished, the CBCentralManager was released causing a crash. Expected Results: CBCentralManager should be released without issues. Actual Results: App crashes with EXC_BAD_ACCESS or similar exception before the required delegate method centralManagerDidUpdateState: is called. NSZombie reports: *** -[CBCentralManager xpcConnectionIsInvalid:]: message sent to deallocated instance 0x7af7d930 Version: 6.0.1 6A317 Simulator 8.0 550.1 Notes: Configuration: The issue is not reproducible neither on iOS 7.1 Simulator nor in real device. It is always reproducible in iOS 8 Simulator (any simulated device) and in unit testing.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!