apptentive / apptentive-kit-ios

ApptentiveKit SDK for iOS and iPadOS
https://www.apptentive.com
BSD 3-Clause "New" or "Revised" License
6 stars 3 forks source link

Deadlock on application start (v6.0.1) #12

Closed lonsky closed 2 years ago

lonsky commented 2 years ago

@frankus after we released a new version (it has apptentive kit v6.0.1) we see many crashes (deadlocks) on app start

i wasn't able to reproduce it in my test app (apparently it requires some state). but was able to reproduce it with the main app:

Main thread:

image

Background thread (why do you need to dispatch synchronously on main thread result of the request?):

image
frankus commented 2 years ago

Thank you for the detailed report.

Looking back in the git history for this change, I unfortunately don't have a satisfying answer on why we decided to call the callback synchronously.

However as part of the 6.0.2 release, we refactored the SDK's register method. All dispatches to the main queue are now async, so hopefully this should be addressed in that release (although to be fair we weren't aware of this specific issue when we made the changes).

lonsky commented 2 years ago

@frankus Thanks for the quick reply Frank!

we will integrate the new SDK version. I already did some smoke-testing and didn't experience the issue.

I guess you can close this ticket.

Have a nice day!