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

Crash when calling archiveEvents #924

Closed jnimis closed 3 years ago

jnimis commented 3 years ago

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!

zihejia commented 3 years ago

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

jnimis commented 3 years ago

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

zihejia commented 3 years ago

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.