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

Variable _debug isn't thread safe #290

Open
RaimundasSakalauskas opened this issue Dec 18, 2020 · 0 comments
Open

Variable _debug isn't thread safe #290

RaimundasSakalauskas opened this issue Dec 18, 2020 · 0 comments

Comments

@RaimundasSakalauskas
Copy link

I am investigating on a crash happening in appirater. Firebase lists it as: -[Appirater incrementUseCount] + 434. If we assume that the stacktrace is accurate, it shows this line:

if (_debug)
     NSLog(@"APPIRATER Use count: %@", @(useCount));

Before we call Appirater.appLaunched(true) we are setting Appirater.setDebug(false) on a main thread. Looking at the code, I can see that static variable _debug is used without any thread safety around it.

BTW, this only happens to 0.03% of our users so chances of reproducing that are fairly low :)

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

1 participant