mixpanel/mixpanel-iphone

Crash when calling archiveEvents

jnimis opened this issue · 3 comments

Integration Method: CocoaPods
Xcode Version: 12.3 (12C33)
Library Version: 3.6.1
Platform: iOS
Language: Objective-C
Description: We are seeing this crash in production through Crashlytics, not terribly often, but consistently. I can't reproduce it locally.
Expected Behavior: app does not crash

I searched and saw similar issues #864 and #821. These claim to be resolved in library version 3.4.9, but we are using 3.6.1 so I would expect it to be resolved.

Fatal Exception: NSRangeException ** -[__NSArrayM getObjects:range:]: range {0, 5} extends beyond bounds [0 .. 3]
__25-[Mixpanel archiveEvents]_block_invoke

0 CoreFoundation 0x1b1af9344 __exceptionPreprocess
1 libobjc.A.dylib 0x1b180ecc0 objc_exception_throw
2 CoreFoundation 0x1b1b52550 -[__NSCFString characterAtIndex:].cold.1
3 CoreFoundation 0x1b19d2400 -[__NSArrayM getObjects:range:]
4 CoreFoundation 0x1b19cc210 -[NSArray initWithArray:range:copyItems:]
5 XXXXXXX 0x1033d3130 __25-[Mixpanel archiveEvents]_block_invoke + 1238 (Mixpanel.m:1238)
6 libdispatch.dylib 0x1b179b5ac _dispatch_client_callout
7 libdispatch.dylib 0x1b17a8360 _dispatch_lane_barrier_sync_invoke_and_complete
8 XXXXXXX 0x1033d30c8 -[Mixpanel archiveEvents] + 1237 (Mixpanel.m:1237)
9 XXXXXXX 0x1033cf680 __29-[Mixpanel track:properties:]_block_invoke + 623 (Mixpanel.m:623)
10 libdispatch.dylib 0x1b179a134 _dispatch_call_block_and_release
11 libdispatch.dylib 0x1b179b5ac _dispatch_client_callout
12 libdispatch.dylib 0x1b17a1a64 _dispatch_lane_serial_drain
13 libdispatch.dylib 0x1b17a2498 _dispatch_lane_invoke
14 libdispatch.dylib 0x1b17aba5c _dispatch_workloop_worker_thread
15 libsystem_pthread.dylib 0x1b1801718 _pthread_wqthread
16 libsystem_pthread.dylib 0x1b18079c8 start_wqthread

Thanks in advance!

hi @jnimis , sorry about the inconvenience. Could you please try v3.6.4? We fixed another critical crash issue related to the archiving.

Yes, I'll try that - thanks for the quick reply!

hi @jnimis , I'm closing this issue because it has been inactive for a couple of months now, please feel free to reopen you still encounter this issue.