Closed gabriellanata closed 2 years ago
I've submitted a PR with a suggested fix here: https://github.com/mixpanel/mixpanel-swift/pull/523
cc @zihejia
@gabriellanata this should be fixed in v3.1.6
, let us know if any issues persist. thanks again!
PR https://github.com/mixpanel/mixpanel-swift/pull/519 introduced a bug where the Mixpanel initialization code deadlocks on Mac M1 when using SwiftUI (possibly more, that's just the computer I was testing on).
Specifically this code change that wraps the instance initialization in a dispatch queue and a semaphore. I've verified that by reverting that to the previous implementation the deadlock goes away.
Here is a sample SwiftUI project that reproduces the deadlock, you can try interacting with the window in any way (like resizing) and it will beachball forever. MixpanelDeadlock.zip