mixpanel/mixpanel-iphone

Crash in [Mixpanel unarchiveFromFile:asClass:]

weibel opened this issue · 2 comments

Integration Method:
CocoaPods

Xcode Version:
12.5.2

Library Version:
3.9.0

Platform:
iOS

Language:
Swift / Objective-C (both)

Description:

Starting from iOS15 we're seeing many crashes in the Xcode Organizer in [Mixpanel unarchiveFromFile:asClass:]

Trace

#0	(null) in nanov2_allocate ()
#1	(null) in nanov2_malloc ()
#2	(null) in _malloc_zone_malloc ()
#3	(null) in os_trace_blob_grow ()
#4	(null) in os_trace_blob_vaddf ()
#5	(null) in os_trace_blob_addf ()
#6	(null) in _os_log_fmt_compose_data ()
#7	(null) in os_log_fmt_compose ()
#8	(null) in _os_log_impl_compose ()
#9	(null) in _os_log_impl_flatten_and_send ()
#10	(null) in _os_log ()
#11	(null) in _os_log_fault_impl ()
#12	(null) in -[NSCoder _warnAboutNSObjectInAllowedClasses] ()
#13	(null) in -[NSCoder _walkAllowedClassListLookingForClass:forKey:allowedClasses:strictModeEnabled:alwaysEnforceExplicitSubclasses:] ()
#14	(null) in -[NSKeyedUnarchiver _validatePropertyListClass:forKey:] ()
#15	(null) in _decodeObjectBinary ()
#16	(null) in -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] ()
#17	(null) in -[NSDictionary(NSDictionary) initWithCoder:] ()
#18	(null) in _decodeObjectBinary ()
#19	(null) in -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] ()
#20	(null) in -[NSArray(NSArray) initWithCoder:] ()
#21	(null) in _decodeObjectBinary ()
#22	(null) in _decodeObject ()
#23	(null) in -[NSKeyedUnarchiver decodeObjectForKey:] ()
#24	(null) in -[NSKeyedUnarchiver decodeObjectOfClasses:forKey:] ()
#25	(null) in -[NSCoder __tryDecodeObjectForKey:error:decodeBlock:] ()
#26	(null) in -[NSCoder decodeTopLevelObjectOfClasses:forKey:error:] ()
#27	(null) in +[NSKeyedUnarchiver unarchivedObjectOfClasses:fromData:error:] ()
#28	(null) in +[NSKeyedUnarchiver unarchivedObjectOfClass:fromData:error:] ()
#29	0x0000000102dc5e74 in +[Mixpanel unarchiveFromFile:asClass:] at /Users/[...]/Pods/Mixpanel/Mixpanel/Mixpanel.m:1435
#30	0x0000000102dc5da4 in +[Mixpanel unarchiveOrDefaultFromFile:asClass:] at /Users/[...]Pods/Mixpanel/Mixpanel/Mixpanel.m:1425
#31	0x0000000102dc6104 in -[Mixpanel unarchivePeople] at /Users/[...]/Pods/Mixpanel/Mixpanel/Mixpanel.m:1469
#32	0x0000000102dc5d30 in -[Mixpanel unarchive] at /Users/[...]/Pods/Mixpanel/Mixpanel/Mixpanel.m:1415
#33	0x0000000102dbec60 in -[Mixpanel initWithToken:launchOptions:flushInterval:trackCrashes:automaticPushTracking:optOutTrackingByDefault:] at /Users/[...]/Pods/Mixpanel/Mixpanel/Mixpanel.m:184

Expected Behavior:
No crashes.

@weibel recommend using our 4.0.0.beta branch which replaces the file-based archiving system with SQLite. It also removes all of the Messages & Experiments functionality, which will be deprecated on Dec 31. Other than that, it is in parity with the current release. After the M&E deprecation it will be promoted from beta to the main release version.

@jaredmixpanel Thanks for getting back to me so quickly. I want to avoid rolling out a beta version of the SDK just before the holiday season. After all it is called a beta for a reason. However I'll be happy to look into it once the new version has been out of beta for a little while.