Since I upgraded to iOS 8, I have the following lines of code :
NSNumber *balance = dict[@"user"][@"balance"];
[IWSession session].currentUser.balance = [balance integerValue];
which generate sometimes a exc_bad_access
1) This is totaly random
2) By setting a NSLog(@"%@",dict[@"user"][@"balance"])
, I can tell that the value is never nil
and the object type a NSNumber
3) IWSession.session
is a singleton instance and the currentUser.balance
is a NSInteger
which is well synthetized.
Any idea of what can be wrong ?
Thanks a lot