Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXC_BAD_ACCESS FlagSynchronizer:63 #314

Open
m1entus opened this issue Oct 17, 2023 · 4 comments
Open

EXC_BAD_ACCESS FlagSynchronizer:63 #314

m1entus opened this issue Oct 17, 2023 · 4 comments

Comments

@m1entus
Copy link

m1entus commented Oct 17, 2023

Describe the bug
Crash (synchronization issue)

SDK version
9.1.1

OS/platform
iOS

Additional context
Zrzut ekranu 2023-10-17 o 10 57 18

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)
}
@tanderson-ld
Copy link
Contributor

tanderson-ld commented Oct 17, 2023

Hi @m1entus , how frequently are you encountering this issue? Also, thank you for digging deeply and providing an option to fix the issue.

@m1entus
Copy link
Author

m1entus commented Oct 17, 2023

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.

@tanderson-ld
Copy link
Contributor

@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.

@m1entus
Copy link
Author

m1entus commented Oct 25, 2023

@tanderson-ld To be honest it appears only once so far

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants