Closed Leksa98 closed 1 week ago
@Leksa98 Подскажи как часто падает? И можешь скинуть полный стектрейс со всеми потоками.
@DmitriiKozhevnikov за последнюю неделю около 100 крашей
Crashed: NSManagedObjectContext 0x282efc9c0
0 Mindbox 0x47120 $s7Mindbox20MBDatabaseRepositoryC6create5eventyAA5EventVtKFyyKXEfU + 848
1 Mindbox 0x470d4 $s7Mindbox20MBDatabaseRepositoryC6create5eventyAA5EventVtKFyyKXEfU + 772
2 Mindbox 0x5f620 $s7Mindbox20MBDatabaseRepositoryC6create5eventyAA5EventV_tKFyyKXEfU_TA + 16
3 Mindbox 0x603d4 $sxs5Error_pIgrzo_xsAA_pIegrzo_lTRyt_Tg5TA + 20
4 Mindbox 0x6040c $sSo22NSManagedObjectContextC7MindboxE21_performAndWaitHelper33_4144BD779CBD4B0321B4B38CB733A8D6LL2fn7execute6rescuexyyyXEXE_xyKXExs5Error_pKXEtKlFyxyKcXEfU_yyXEfU_yt_Tg5TA + 44
5 Mindbox 0x5f604 $sIg_Ieg_TRTA + 20
6 Mindbox 0x57db0 $sIeg_IyB_TR + 20
7 CoreData 0x13601c developerSubmittedBlockToNSManagedObjectContextPerform + 156
8 libdispatch.dylib 0x61280 _dispatch_client_callout + 16
9 libdispatch.dylib 0x440ec _dispatch_lane_barrier_sync_invoke_and_complete + 56
10 CoreData 0x8dd4 -[NSManagedObjectContext performBlockAndWait:] + 256
11 Mindbox 0x58490 $sSo22NSManagedObjectContextC7MindboxE14performAndWaityxxyKXEKlFyt_Tg5 + 264
12 Mindbox 0x5ad8c $s7MindboxAAC21executeAsyncOperation19operationSystemName0E4BodyySS_xtAA0dH11RequestTypeRzlF + 820
13 MindBoxService 0x115f4 swift_memcpy1208 + 24196
14 Gold Apple 0xb8858 MindBoxAnalyticsEngine.logWishlist(product:isAdded:) + 128 (MindBoxAnalyticsEngine.swift:128)
15 Gold Apple 0xb6b80 MindBoxAnalyticsEngine.log(:) + 4342999936 (
com.apple.uikit.eventfetch-thread 0 libsystem_kernel.dylib 0x4644 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x3a48 mach_msg + 72 2 CoreFoundation 0x9a0fc CFRunLoopServiceMachPort + 376 3 CoreFoundation 0x94570 CFRunLoopRun + 1176 4 CoreFoundation 0x93ba0 CFRunLoopRunSpecific + 572 5 Foundation 0x77f8 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 228 6 Foundation 0x76d8 -[NSRunLoop(NSRunLoop) runUntilDate:] + 88 7 UIKitCore 0xbda054 -[UIEventFetcher threadMain] + 504 8 Foundation 0x1644bc NSThreadstart__ + 848 9 libsystem_pthread.dylib 0x8c9c _pthread_start + 288 10 libsystem_pthread.dylib 0xd880 thread_start + 8
com.google.firebase.crashlytics.MachExceptionServer 0 FirebaseCrashlytics 0x1c314 FIRCLSProcessRecordAllThreads + 184 1 FirebaseCrashlytics 0x1c6f4 FIRCLSProcessRecordAllThreads + 1176 2 FirebaseCrashlytics 0x14680 FIRCLSHandler + 48 3 FirebaseCrashlytics 0x16e34 FIRCLSMachExceptionServer + 688 4 libsystem_pthread.dylib 0x8c9c _pthread_start + 288 5 libsystem_pthread.dylib 0xd880 thread_start + 8
com.apple.NSURLConnectionLoader 0 libsystem_kernel.dylib 0x4644 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x3a48 mach_msg + 72 2 CoreFoundation 0x9a0fc CFRunLoopServiceMachPort + 376 3 CoreFoundation 0x94570 CFRunLoopRun + 1176 4 CoreFoundation 0x93ba0 CFRunLoopRunSpecific + 572 5 CFNetwork 0x2324b0 _CFURLStorageSessionCopyCache + 59740 6 Foundation 0x1644bc NSThreadstart__ + 848 7 libsystem_pthread.dylib 0x8c9c _pthread_start + 288 8 libsystem_pthread.dylib 0xd880 thread_start + 8
JavaScriptCore bmalloc scavenger
0 libsystem_kernel.dylib 0x2761c psynch_cvwait + 8
1 libsystem_pthread.dylib 0x5db4 _pthread_cond_wait$VARIANT$armv81 + 1180
2 libc++.1.dylib 0xce0c std::__1::condition_variable::wait(std::1::unique_lock
WebThread
0 libsystem_kernel.dylib 0x4644 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x3a48 mach_msg + 72
2 CoreFoundation 0x9a0fc CFRunLoopServiceMachPort + 376
3 CoreFoundation 0x94570 CFRunLoopRun + 1176
4 CoreFoundation 0x93ba0 CFRunLoopRunSpecific + 572
5 WebCore 0xbbdb1c
AVAudioSession Notify Thread 0 libsystem_kernel.dylib 0x4644 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x3a48 mach_msg + 72 2 CoreFoundation 0x9a0fc CFRunLoopServiceMachPort + 376 3 CoreFoundation 0x94570 CFRunLoopRun + 1176 4 CoreFoundation 0x93ba0 CFRunLoopRunSpecific + 572 5 AudioSession 0xc098 GenericRunLoopThread::Entry(void) + 156 6 AudioSession 0xdff8 CAPThread::Entry(CAPThread) + 88 7 libsystem_pthread.dylib 0x8c9c _pthread_start + 288 8 libsystem_pthread.dylib 0xd880 thread_start + 8
Thread 0 libsystem_kernel.dylib 0x2848c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0xa5f0 _pthread_wqthread + 348 2 libsystem_pthread.dylib 0xd874 start_wqthread + 8
Thread 0 libsystem_kernel.dylib 0x2848c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0xa5f0 _pthread_wqthread + 348 2 libsystem_pthread.dylib 0xd874 start_wqthread + 8
com.google.fira.worker 0 CoreFoundation 0x9c348 _CFRelease + 68 1 libobjc.A.dylib 0x25574 AutoreleasePoolPage::releaseUntil(objc_object**) + 200 2 libobjc.A.dylib 0x25450 objc_autoreleasePoolPop + 208 3 Foundation 0x215c00 44-[NSXPCDecoder _decodeArrayOfObjectsForKey:]_block_invoke + 80 4 Foundation 0x226dd4 _NSXPCSerializationIterateArrayObject + 204 5 Foundation 0x20f08 -[NSXPCDecoder _decodeArrayOfObjectsForKey:] + 208 6 Foundation 0x251a0 -[NSArray(NSArray) initWithCoder:] + 172 7 Foundation 0x215688 _decodeObject + 1340 8 Foundation 0x215be0 44-[NSXPCDecoder _decodeArrayOfObjectsForKey:]_block_invoke + 48 9 Foundation 0x226dd4 _NSXPCSerializationIterateArrayObject + 204 10 Foundation 0x20f08 -[NSXPCDecoder _decodeArrayOfObjectsForKey:] + 208 11 Foundation 0x20850 -[NSDictionary(NSDictionary) initWithCoder:] + 176 12 Foundation 0x215688 _decodeObject + 1340 13 Foundation 0x215b7c _decodeObjectAfterSettingWhitelistForKey + 160 14 Foundation 0x14d78 -[NSXPCDecoder decodeObjectOfClasses:forKey:] + 48 15 CoreServices 0xcb264 -[NSCoder(LaunchServicesAdditions) ls_decodeObjectOfClasses:forKey:] + 192 16 CoreServices 0xcb840 -[NSCoder(LaunchServicesAdditions) ls_decodeDictionaryWithKeysOfClass:valuesOfClasses:forKey:] + 200 17 CoreServices 0xead60 -[_LSDictionaryBackedPropertyList initWithCoder:] + 100 18 Foundation 0x215688 _decodeObject + 1340 19 Foundation 0x215be0 44-[NSXPCDecoder _decodeArrayOfObjectsForKey:]_block_invoke + 48 20 Foundation 0x226dd4 _NSXPCSerializationIterateArrayObject + 204 21 Foundation 0x20f08 -[NSXPCDecoder _decodeArrayOfObjectsForKey:] + 208 22 Foundation 0x20850 -[NSDictionary(NSDictionary) initWithCoder:] + 176 23 Foundation 0x215688 _decodeObject + 1340 24 Foundation 0x215b7c _decodeObjectAfterSettingWhitelistForKey + 160 25 Foundation 0x14d78 -[NSXPCDecoder decodeObjectOfClasses:forKey:] + 48 26 CoreServices 0xcb264 -[NSCoder(LaunchServicesAdditions) ls_decodeObjectOfClasses:forKey:] + 192 27 CoreServices 0xcb840 -[NSCoder(LaunchServicesAdditions) ls_decodeDictionaryWithKeysOfClass:valuesOfClasses:forKey:] + 200 28 CoreServices 0x726b0 -[LSRecord initWithCoder:] + 152 29 CoreServices 0xef904 -[LSBundleRecord initWithCoder:] + 84 30 CoreServices 0x12b1b4 -[LSApplicationRecord initWithCoder:] + 72 31 Foundation 0x215688 _decodeObject + 1340 32 Foundation 0x215b7c _decodeObjectAfterSettingWhitelistForKey + 160 33 Foundation 0x14d78 -[NSXPCDecoder decodeObjectOfClasses:forKey:] + 48 34 CoreServices 0xcb264 -[NSCoder(LaunchServicesAdditions) ls_decodeObjectOfClasses:forKey:] + 192 35 CoreServices 0xcb170 -[NSCoder(LaunchServicesAdditions) ls_decodeObjectOfClass:forKey:] + 104 36 CoreServices 0x62ae4 -[LSApplicationProxy initWithCoder:] + 112 37 Foundation 0x215688 _decodeObject + 1340 38 Foundation 0x1436c -[NSXPCDecoder _decodeObjectOfClasses:atObject:] + 144 39 Foundation 0xec1a0 _NSXPCSerializationDecodeTypedObjCValuesFromArray + 1300 40 Foundation 0xec734 _NSXPCSerializationDecodeInvocationArgumentArray + 504 41 Foundation 0x5e38c -[NSXPCDecoder decodeXPCObject:allowingSimpleMessageSend:outInvocation:outArguments:outArgumentsMaxCount:outMethodSignature:outSelector:isReply:replySelector:interface:] + 784 42 Foundation 0x14160 -[NSXPCDecoder _decodeReplyFromXPCObject:forSelector:interface:] + 80 43 Foundation 0x13ba0 -[NSXPCConnection _decodeAndInvokeReplyBlockWithEvent:sequence:replyInfo:] + 172 44 Foundation 0x20e814 88-[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:]_block_invoke_3 + 208 45 Foundation 0x12f78 -[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:] + 2464 46 Foundation 0x123a4 -[NSXPCConnection _sendSelector:withProxy:arg1:] + 128 47 Foundation 0x21a598 _NSXPCDistantObjectSimpleMessageSend1 + 36 48 CoreServices 0x11e594 +[LSBundleProxy bundleProxyForCurrentProcess] + 448 49 Foundation 0x6fe74 -[NSBundle appStoreReceiptURL] + 104 50 GAAnalytics 0x49228 +[APMAEU appStoreRURL] + 224 51 GAAnalytics 0x4950c +[APMAEU isASRS] + 36 52 GAAnalytics 0x492b4 +[APMAEU isFAS] + 76 53 GAAnalytics 0x9ce64 -[APMMeasurement(Event) createRawEventMetadataWithUserAttributes:] + 264 54 GAAnalytics 0x9f504 -[APMMeasurement(Event) writeEvent:isPublicEvent:isRealtime:] + 780 55 GAAnalytics 0x9cd18 57-[APMMeasurement(Event) writeFilteredEventOnWorkerQueue:]_block_invoke + 604 56 GAAnalytics 0xeed10 -[APMSqliteStore performTransactionWithError:block:] + 176 57 GAAnalytics 0x5dc64 -[APMDatabase performTransaction:] + 48 58 GAAnalytics 0x9ca90 -[APMMeasurement(Event) writeFilteredEventOnWorkerQueue:] + 264 59 GAAnalytics 0x9c6d4 -[APMMeasurement(Event) writeEventOnWorkerQueue:] + 1444 60 GAAnalytics 0x9bfc0 -[APMMeasurement(Event) handleEventOnWorkerQueue:] + 540 61 GAAnalytics 0x91d94 -[APMMeasurement logEventOnWorkerQueue:notifyEventListeners:] + 76 62 GAAnalytics 0x91d44 -[APMMeasurement logEventOnWorkerQueueWithOrigin:isPublicEvent:name:parameters:timestamp:enabled:ignoreEnabled:ignoreInterceptor:interceptor:addedScreenParameters:] + 708 63 GAAnalytics 0x91a20 151-[APMMeasurement logEventWithOrigin:isPublicEvent:name:parameters:timestamp:enabled:ignoreEnabled:ignoreInterceptor:interceptor:addedScreenParameters:]_block_invoke + 68 64 GAAnalytics 0xe4418 51-[APMScheduler scheduleOnWorkerQueueBlockID:block:]_block_invoke + 44 65 libdispatch.dylib 0x60298 _dispatch_call_block_and_release + 24 66 libdispatch.dylib 0x61280 _dispatch_client_callout + 16 67 libdispatch.dylib 0x3d4f0 _dispatch_lane_serial_drain$VARIANT$armv81 + 568 68 libdispatch.dylib 0x3dfdc _dispatch_lane_invoke$VARIANT$armv81 + 404 69 libdispatch.dylib 0x47800 _dispatch_workloop_worker_thread + 692 70 libsystem_pthread.dylib 0xa5a4 _pthread_wqthread + 272 71 libsystem_pthread.dylib 0xd874 start_wqthread + 8
Thread 0 libsystem_kernel.dylib 0x2848c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0xa5f0 _pthread_wqthread + 348 2 libsystem_pthread.dylib 0xd874 start_wqthread + 8
Thread 0 libsystem_kernel.dylib 0x2848c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0xa5f0 _pthread_wqthread + 348 2 libsystem_pthread.dylib 0xd874 start_wqthread + 8
Thread 0 libsystem_pthread.dylib 0xd86c start_wqthread + 190
Thread 0 libsystem_kernel.dylib 0x2848c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0xa5f0 _pthread_wqthread + 348 2 libsystem_pthread.dylib 0xd874 start_wqthread + 8
@Leksa98 сходу не обнаружили причину. Есть ли пример кода для воспроизведения краша? Как вариант, можно с вашими разработчиками созвониться и вместе посмотреть на проблему.
@Leksa98 я закрою ишью. Если вернешься с деталями, то верну его и будем помогать ;)
Краш происходит внутри Mindbox, судя по логам падает внутри метода executeAsyncOperation, там есть обращение к БД и юзается CoreData, крашит везде на NSManagedObjectContext, насколько знаю такое чаще всего из-за неправильной работы с потоками в CoreData
Ниже пример как мы из проекта делаем отправку событий в маиндбокс:
func sendAddToWishlitEvent(product: ProductListItem) {
guard let body = WishlistOperationBodyRequest(addProductListItem: product) else { return }
Mindbox.shared.executeAsyncOperation(operationSystemName: Operation.addToWishlist.rawValue, operationBody: body)
}
final class WishlistOperationBodyRequest: OperationBodyRequest {
init?(addProductListItem: ProductListItem) {
guard let productId = addProductListItem.product.ids?.website,
let priceOfLine = Double(addProductListItem.priceOfLine)
else { return nil }
super.init()
addProductToList = ProductListRequest(
product: ProductRequest(ids: IDS(["website": productId])),
pricePerItem: priceOfLine
)
}
init?(removeProductListItem: ProductListItem) {
guard let productId = removeProductListItem.product.ids?.website,
let priceOfLine = Double(removeProductListItem.priceOfLine)
else { return nil }
super.init()
removeProductFromList = ProductListRequest(
product: ProductRequest(ids: IDS(["website": productId])),
pricePerItem: priceOfLine
)
}
}
@d-i-bondarenko переоткрой пожалуйста тикет, на данный момент это самый топовый краш у нас, при необходимости можем вместе созвониться посмотреть
@d-i-bondarenko, на версии Mindbox 2.8.0 сталкиваемся с такой же проблемой. Решения пока нет?
Данная проблема была решена в релизе 2.3.0
Crash on NSManagedObjectContext
iOS 14, 15, 16 Mindbox 2.4.0