Closed tettoffensive closed 7 years ago
The only place I can find where _currentDevice
is being changed without will/DidChangeValueForKey
is in _destroyCamera
. So I'm guessing this could be it. I'm using setCurrentDevice
in other places but this should automatically call it. And anywhere else I see the ivar changing, the will/Did are there.
Going to try changing it to this:
[self willChangeValueForKey:@"currentDevice"];
_currentDevice = nil;
[self didChangeValueForKey:@"currentDevice"];
Fatal Exception: NSInternalInconsistencyException Cannot update for observer <PBJVision 0x15c75cfb0> for the key path "currentDevice.torchAvailable" from <PBJVision 0x15c75cfb0>, most likely because the value for the key "currentDevice" has changed without an appropriate KVO notification being sent. Check the KVO-compliance of the PBJVision class.
This seems to be our apps most common crashes in the app store recorded by crashlytics. Though I've not seen it happen on my personal device