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

Crash: TrackerQueue (QOS: BACKGROUND) #92

Closed
sebbbbbb opened this issue Aug 10, 2020 · 1 comment
Closed

Crash: TrackerQueue (QOS: BACKGROUND) #92

sebbbbbb opened this issue Aug 10, 2020 · 1 comment

Comments

@sebbbbbb
Copy link

Hello,
On my app, in some rares cases the tracker crash because of a concurrent access.
I use the following snippet to setup the tracker :

 func setup() {
    let tracker = ATInternet.sharedInstance.defaultTracker
    tracker.setLog(log, completionHandler: nil)
    tracker.setSiteId(siteId, completionHandler: nil)
    tracker.setSecuredLog(logSSL, completionHandler: nil)
  }

I see that you can provide a sync param to perform operation synchronously and I will do that but it look like setting it to false doesn't work all the times. Probably because the queue priority is set to Background which may defer it's execution.

I'm using version 2.16.2.

Capture d’écran 2020-08-10 à 11 30 28
Capture d’écran 2020-08-10 à 11 30 15

@nsagnett
Copy link
Contributor

Hi !

It's strongly recommended to use sync version to keep code visibility because in the async version, the completionHandler have to be set, it's the function called when async code have been done so if you set nil and you call multiple async functions, this problem occcurs because same ressource can be modified at the same time

Regards,

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