ios-client-sdk
ios-client-sdk copied to clipboard
EXC_BAD_ACCESS FlagSynchronizer:63
Describe the bug Crash (synchronization issue)
SDK version 9.1.1
OS/platform iOS
Additional context
Seems this is retain cycle issue:
self.throttler.runThrottled {
// since going online was throttled, check the last called setOnline value and whether we can go online
self.go(online: goOnline && self.canGoOnline, reasonOnlineUnavailable: self.reasonOnlineUnavailable(goOnline: goOnline), completion: completion)
}
here you are capturing self inside throttler:
LDClient -> throttler -> runQueue -> runThrottled -> self (LDClient)
this method should look like this:
self.throttler.runThrottled { [weak self] in
guard let self else {
completion?()
return
}
// since going online was throttled, check the last called setOnline value and whether we can go online
self.go(online: goOnline && self.canGoOnline, reasonOnlineUnavailable: self.reasonOnlineUnavailable(goOnline: goOnline), completion: completion)
}
Hi @m1entus , how frequently are you encountering this issue? Also, thank you for digging deeply and providing an option to fix the issue.
Just got one crash in Sentry analitycs - so preety rare, but maybe this also can caouse because app is entering background and you are dosing some async action, hard to say really.
@m1entus , could you provide a rough estimate of number of sessions your customer base runs per day? That will help us evaluate the frequency in a relative percentage.
@tanderson-ld To be honest it appears only once so far