mixpanel / mixpanel-iphone

Official iOS (Objective-C) Tracking Library for Mixpanel Analytics
http://mixpanel.com
Apache License 2.0
1.04k stars 567 forks source link

EXC_BAD_ACCESS mp_swizzledMethod_5 when combined with another library that uses pushes (even though both are unused) #903

Closed matt-dalton closed 3 years ago

matt-dalton commented 4 years ago

Integration Method: CocoaPods Xcode Version: 11.3.1 Library Version: 3.6.0 Platform: iOS Language: Objective-C Description: I've been using Mixpanel fine (only for tracking - I've never used it to send push notifications). I recently installed the Sailthru mobile SDK, which also has push notification logic (which I also don't use!). Since then, opening a push in our app causes the following crash in mixpanel:

EXC_BAD_ACCESS
userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler: >
Stack overflow in _ZN5folly6detail8function14FunctionTraitsIKFbRKNS_7dynamicES5_EE10uninitCallES5_S5_RNS1_4DataE
static void mp_swizzledMethod_5(id self, SEL _cmd, id arg, id arg2, id arg3)
{
    Method aMethod = class_getInstanceMethod([self class], _cmd);
    MPSwizzle *swizzle = (MPSwizzle *)[swizzles objectForKey:(__bridge id)((void *)aMethod)];

It seems as though the mixpanel push logic is still running and clashing with the Sailthru logic somehow.

Is there a fix for this? Or as a workaround - is there a way to prevent the push logic in mixpanel running in the first place?

Expected Behavior: The library not to crash

zihejia commented 3 years ago

Mixpanel is deprecating Messaging and Mobile A/B testing features(more details), please contact our support if you need to continue the conversation for any critical issues. Sorry for the inconvenience.