mixpanel / mixpanel-swift

Official iOS (Swift) Tracking Library for Mixpanel Analytics
https://mixpanel.com
Apache License 2.0
434 stars 234 forks source link

Crash on Persistence.swift line 164 #487

Closed tusharvohracoder closed 2 years ago

tusharvohracoder commented 2 years ago

We are seeing crash in Mixpanel-swift sdk on Persistence.swift line 164 details below.

Crashed: com.mixpanel.archiveQueue 0 CoreFoundation 0xdabc CFBasicHashRehash + 100 1 CoreFoundation 0x1ef34 CFBasicHashAddValue + 100 2 CoreFoundation 0x12c7c CFBasicHashAddValue + 2104 3 CoreFoundation 0x5868c CFDictionaryAddValue + 236 4 CoreFoundation 0x2da20 _flattenPlist + 288 5 CoreFoundation 0x2dbb4 _flattenPlist + 692 6 CoreFoundation 0x2db4c _flattenPlist + 588 7 CoreFoundation 0x11c2c _CFBinaryPlistWriteOrPresize + 232 8 Foundation 0x55b88 -[NSKeyedArchiver finishEncoding] + 544 9 Foundation 0x95864 -[NSKeyedArchiver encodedData] + 72 10 Foundation 0x3117c +[NSKeyedArchiver archivedDataWithRootObject:requiringSecureCoding:error:] + 120 11 Mixpanel 0x7cc3c specialized static Persistence.archiveToFile(:object:token:) + 164 (Persistence.swift:164) 12 Mixpanel 0x79284 closure #1 in static Persistence.archiveEvents(_:token:) + 4414460548 13 Mixpanel 0x5c5b8 partial apply for thunk for @callee_guaranteed () -> () + 4414342584 (:4414342584) 14 Mixpanel 0x3e988 thunk for @escaping @callee_guaranteed () -> () + 4414220680 (:4414220680) 15 libdispatch.dylib 0x64198 _dispatch_client_callout + 16 16 libdispatch.dylib 0x460cc _dispatch_lane_barrier_sync_invoke_and_complete + 52 17 Mixpanel 0x4df34 closure #3 in closure #1 in MixpanelInstance.track(event:properties:) + 4414283572 (MixpanelInstance.swift:4414283572) 18 Mixpanel 0x82dc4 closure #1 in ReadWriteLock.read(closure:) + 20 (ReadWriteLock.swift:20) 19 Mixpanel 0x5c5b8 partial apply for thunk for @callee_guaranteed () -> () + 4414342584 (:4414342584) 20 Mixpanel 0x3e988 thunk for @escaping @callee_guaranteed () -> () + 4414220680 (:4414220680) 21 libdispatch.dylib 0x64198 _dispatch_client_callout + 16 22 libdispatch.dylib 0x46698 _dispatch_sync_invoke_and_complete + 52 23 Mixpanel 0x4dc64 closure #1 in MixpanelInstance.track(event:properties:) + 4414282852 (MixpanelInstance.swift:4414282852) 24 Mixpanel 0x3e988 thunk for @escaping @callee_guaranteed () -> () + 4414220680 (:4414220680) 25 libdispatch.dylib 0x63194 _dispatch_call_block_and_release + 24 26 libdispatch.dylib 0x64198 _dispatch_client_callout + 16 27 libdispatch.dylib 0x3f13c _dispatch_lane_serial_drain$VARIANT$armv81 + 604 28 libdispatch.dylib 0x3fbf4 _dispatch_lane_invoke$VARIANT$armv81 + 388 29 libdispatch.dylib 0x495cc _dispatch_workloop_worker_thread + 616 30 libsystem_pthread.dylib 0x4e84 _pthread_wqthread + 284 31 libsystem_pthread.dylib 0x49f0 start_wqthread + 8

zihejia commented 2 years ago

hi @tusharvohracoder , the issue will no longer exist on the version "3.0.0.beta.5" since it is using SQLite for persistence. It's in parity with 2.10.3 just without messaging and a/b testing features. If you don't use Mixpanel for messaging and a/b testing, you will get a very similar build from 3.0.0.beta.5 as the final 3.0.0. On Jan 1, 2022, 3.0.0 will be released. I'm closing this issue now, please feel free to open any issue related to 3.0.x, but we are not going to fix any issue from the legacy file persistence.