Page 1 of 1

iOS bug: AirconsoleMgr dealloc causes uncaught exception

Posted: Wed Apr 08, 2015 7:25 am
by granoff
When this line of code is invoked (in my code):

Code: Select all

self.acManager = nil;


the following exception is logged:

Code: Select all

*** Terminating app due to uncaught exception 'NSRangeException', reason: 'Cannot remove an observer <AirconsoleMgr 0x174265e00> for the key path "UIApplicationDidEnterBackgroundNotification" from <NSNotificationCenter 0x1700d6b20> because it is not registered as an observer.'


This suggests to me that somewhere along the way the AirconsoleMgr class registered itself as an observer for UIApplicationDidEnterBackgroundNotification, but that code was removed. Unfortunately, the de-registration code for this event was perhaps NOT removed from the -dealloc code for AirconsoleMgr.

This is a serious issue which I'd think is easy to fix and release.

Anyone?

Re: iOS bug: AirconsoleMgr dealloc causes uncaught exception

Posted: Sun Apr 12, 2015 10:38 pm
by daniel
The latest version of the SDK is 1.51 but for some reason this isn't showing up on the website - it will be fixed shortly. It contains some fixes for crashes and adds multi-port support. I think it probably resolves your issue above.

However, you should only ever have one copy of the AirconsoleMgr class instantiated - it encapsulates the CBCentralManager used to communicate with BTLE devices

Re: iOS bug: AirconsoleMgr dealloc causes uncaught exception

Posted: Tue Apr 14, 2015 3:48 am
by granoff
Confirmed: SDK v1.51 does fix this crash.