-
-
Notifications
You must be signed in to change notification settings - Fork 865
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
XCode 9: Main Thread Checker: UI API called from background thread: -[UIApplication applicationIconBadgeNumber] must be called from main thread only #1146
Comments
Would you provide a Pr for that? |
I'll try to get around to this during the summer, I'm currently bundling pre-built binaries of SDK so I'll need to spend some time to learn to rebuild the client side SDK code in order to test everything properly :). Are there any special steps needed to build? (read: I have not yet spent any minute investigating it :)) |
one quick thing to note here is that even before this new found issue using XCode 9 on iOS 11, Parse iOS/OSX SDK was spitting out anywhere from around 5-300 memory leaks per PFQuery, all pointing to BFTask and Save Eventually commands using Bolts. And no, these weren't my calls to save eventually or bolts, they were all internal issues to the SDK. The good thing was even though these issues were popping constantly, they never crashed the app or raised the memory load to a level exceeding ~50-100mb nor did i find that they forced retention of views or view controllers that accessed and used the Parse SDK. These were all issues of the same sort as listed above in the debug output, but we're game breakers. Most of these issues were only observable when running SDK without using Pods. I'll start linking these here as additional open issues here soon when I have time so the community can decide what to do here. |
For testing you can just use rake, (look into .travis.yaml) this should properly run the tests and ensure CI passes correctly. |
@larceneaux I've published a PR that addresses some memory leaks, can you have a look with the latest release? |
I have prepared a PR against master, tested locally built framework against on one of my apps and main thread checker warnings are gone. |
Is there any update on this? |
with making the call 'synchronized' on the main queue, the issue is that if you're 'waiting' on the main queue, your app will deadlock. (why @mman 's PR is failing at the moment). so we can't use a dispatch_sync technique to acquire this value. |
Thank you for the update. I have shared a solution of another project in the PR: #1165 |
+1 |
1 similar comment
+1 |
Thinking about it a bit more. Since we are not accessing this property directly but via a wrapper Thoughts? |
I like your approach, also, do we know if KVO works for UIApplication.badgeCount? That would be an elegant solution, prone to race conditions in extreme cases, but, acceptable |
Anyone about to submit a PR regarding this? |
Submitted here: #1186 |
👍🏻 Thanks! |
This is still waiting for feedback, all tests are passing. |
I can confirm that this has been resolved in Parse 1.15.3 (which finally compiles thanks to the fix in #1159). This issue can be closed. |
Great, thanks!
…On Wed, Sep 27, 2017 at 10:30 AM, funnel20 ***@***.***> wrote:
I can confirm that this has been resolved in Parse 1.15.3 (which finally
compiles thanks to the fix in #1159
<#1159>).
Verified with Xcode 9.0 and iOS 11.0.1.
This issue can be closed.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1146 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAe83TO5EIHS5vazh3IMmHxmqXVB2_p2ks5smgfAgaJpZM4N48Hp>
.
|
Sweet! |
Using the 1.14.4 version with XCode 9 on iOS 11 with the new main thread sanitizer activated.
This is the backtrace I got:
Looks like
PFApplication
needs to dispatch back to the main queue to interact withUIApplication
.The text was updated successfully, but these errors were encountered: