Crashes whe

In my iPad app, sometimes I get the following error a few seconds after I call the following code:

[self.beaconManager stopRangingBeaconsInRegion:self.region];
[self.beaconManager stopEstimoteBeaconDiscovery];

Anybody having the same issues?

2014-12-01 22:20:29.506 iMed[1024:60b] *** Assertion failure in -[CBCentralManager cancelPeripheralConnection:force:], /SourceCache/CoreBluetooth/CoreBluetooth-109/CBCentralManager.m:301
2014-12-01 22:20:29.508 iMed[1024:60b] Testing Crash Logs
2014-12-01 22:20:29.509 iMed[1024:60b] CRASH: Invalid parameter not satisfying: peripheral != nil
2014-12-01 22:20:29.532 iMed[1024:60b] Stack Trace: (
0 CoreFoundation 0x2e4e0feb <redacted> + 154
1 libobjc.A.dylib 0x390aaccf objcexceptionthrow + 38
2 CoreFoundation 0x2e4e0ead <redacted> + 0
3 Foundation 0x2ee8dd5b <redacted> + 90
4 CoreBluetooth 0x2e2027c3 <redacted> + 142
5 iMed 0x001f0db7 iMed + 1064375
6 iMed 0x001421d5 iMed + 348629
7 iMed 0x003c2c17 iMed + 2972695
8 UIKit 0x30d176ff <redacted> + 374
9 UIKit 0x30d08ea9 <redacted> + 544
10 UIKit 0x30cfb7e9 <redacted> + 76
11 UIKit 0x30cfb719 <redacted> + 376
12 UIKit 0x30cfb809 <redacted> + 108
13 UIKit 0x30cfb719 <redacted> + 376
14 UIKit 0x30d0868b <redacted> + 418
15 UIKit 0x30d084df <redacted> + 30
16 iMed 0x003a8d3f iMed + 2866495
17 iMed 0x003a797d iMed + 2861437
18 UIKit 0x30e1b05f <redacted> + 1078
19 UIKit 0x30ecd377 <redacted> + 214
20 UIKit 0x30d7c6f5 <redacted> + 316
21 UIKit 0x30cf555b <redacted> + 430
22 CoreFoundation 0x2e4ac2a5 <redacted> + 20
23 CoreFoundation 0x2e4a9c49 <redacted> + 284
24 CoreFoundation 0x2e4a9f8b <redacted> + 730
25 CoreFoundation 0x2e414f0f CFRunLoopRunSpecific + 522
26 CoreFoundation 0x2e414cf3 CFRunLoopRunInMode + 106
27 GraphicsServices 0x3333a663 GSEventRunModal + 138
28 UIKit 0x30d6016d UIApplicationMain + 1136
29 iMed 0x000f2cd1 iMed + 23761
30 libdyld.dylib 0x395b7ab7 <redacted> + 2
)
2014-12-01 22:20:29.537 iMed[1024:60b] Stack Addresses : (0x2e4e0fd3 0x390aaccf 0x2e4e0ead 0x2ee8dd5b 0x2e2027c3 0x1f0db7 0x1421d5 0x3c2c17 0x30d176ff 0x30d08ea9 0x30cfb7e9 0x30cfb719 0x30cfb809 0x30cfb719 0x30d0868b 0x30d084df 0x3a8d3f 0x3a797d 0x30e1b05f 0x30ecd377 0x30d7c6f5 0x30cf555b 0x2e4ac2a5 0x2e4a9c49 0x2e4a9f8b 0x2e414f0f 0x2e414cf3 0x3333a663 0x30d6016d 0xf2cd1 0x395b7ab7)

Also-- before this happens, I see a lot of the following warnings:
CoreBluetooth[WARNING] <CBPeripheral: 0x16bf66f0 identifier = E5F8D7EF-617B-9D5E-C959-466AAD6102B7, Name = "estimote", state = connecting> is being dealloc'ed while pending connection

Could this be related to the crash I'm seeing?

oops.. I forgot to write a proper title for this post .... and I can't seem to be able to edit it.

This one gets me thinking:

CoreBluetooth[WARNING] <CBPeripheral: 0x16bf66f0 identifier = E5F8D7EF-617B-9D5E-C959-466AAD6102B7, Name = "estimote", state = connecting> is being dealloc'ed while pending connection

Are you doing any connecting to beacons? You need to hold a strong reference to the ESTBeacon object for the duration of the connection, otherwise iOS memory management mechanisms will deallocate it.

I was able to figure it out. I had another set of code that was trying to connect to another bluetooth device in the same class. Once I took it off, all errors disappeared.

How to manage both bluetooth connections at the same time -- I'll leave that battle for another day.

thanks

Glad you managed to solve it! If you come up with a solution to the problem, feel free to share it! (: