Одно из моих приложений зависает всякий раз, когда кто-то пытается отредактировать запись (т. е. когда я показываю EditRecordViewController). Я попытался использовать Watchdog, чтобы обнаружить зависание основного потока и вызвать сбой, чтобы получить отчет Firebase Crashlytics и отследить, где я вызываю блокировку основного потока.
Печально то, что когда я получил отчет о сбое Firebase для Watchdog, буквально каждый поток выполнялся в коде Apple, а не в моем коде. Я не вижу ничего, что могло бы привести к зависанию/зависанию.
Похоже, что основной поток выполняет некоторый код UICollectionView, но В моем приложении даже нет UICollectionView. На всякий случай я просмотрел всю свою кодовую базу.
Есть идеи, где это может быть и что происходит?
Мой экран редактирования состоит из UINavigationController, у которого UIViewController является корневым контроллером представления. Этот UIViewController включает UITableViewController.
Вот что это показывает:
com.apple.main-thread 0 libobjc.A.dylib 0xa6d0 objc_alloc_init + 36 1 UIKitCore 0x14e7f8 +[UICollectionViewLayoutAttributes layoutAttributesForCellWithIndexPath:] + 24 2 UIKitCore 0x14e0a0 -[_UICollectionCompositionalLayoutSolver _createAndCacheLayoutAttributesForItemAtIndexPath:frame:zIndex:] + 152 3 UIKitCore 0x13a04 __85-[_UICollectionCompositionalLayoutSolver _layoutAttributesForElementsInRect:handler:]_block_invoke + 944 4 UIKitCore 0x6b799c __85-[_UICollectionCompositionalLayoutSolver _layoutAttributesForElementsInRect:handler:]_block_invoke_2 + 40 5 UIKitCore 0x484278 _UIRTreeContainerNode::enumerateIndexesIntersecting(CGRect const&, bool*, void (unsigned long, bool*) block_pointer) const + 160 6 UIKitCore 0x4842b4 _UIRTreeContainerNode::enumerateIndexesIntersecting(CGRect const&, bool*, void (unsigned long, bool*) block_pointer) const + 220 7 UIKitCore 0x40adb0 -[_UIRTree enumerateIndexesForFramesIntersectingFrame:withBlock:] + 52 8 UIKitCore 0x11b14 -[_UICollectionCompositionalLayoutSolver _layoutAttributesForElementsInRect:handler:] + 1092 9 UIKitCore 0x4483a4 -[_UICollectionCompositionalLayoutSolver layoutAttributesForElementsInRect:] + 172 10 UIKitCore 0x1321c -[UICollectionViewCompositionalLayout layoutAttributesForElementsInRect:] + 112 11 UIKitCore 0x12840 __45-[UICollectionViewData validateLayoutInRect:]_block_invoke + 136 12 UIKitCore 0x43ce3c -[UICollectionViewData validateLayoutInRect:] + 1252 13 UIKitCore 0x2878c -[UICollectionView layoutSubviews] + 220 14 UIKitCore 0x4420 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1992 15 QuartzCore 0x9f30 CA::Layer::layout_if_needed(CA::Transaction*) + 500 16 QuartzCore 0x1d4ac CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 148 17 QuartzCore 0x2e8d8 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 444 18 QuartzCore 0x5de80 CA::Transaction::commit() + 648 19 UIKitCore 0x4fd4f0 _UIApplicationFlushCATransaction + 84 20 UIKitCore 0x64dd94 _UIUpdateSequenceRun + 84 21 UIKitCore 0xcb2894 планировщикStepScheduledMainSection + 144 22 UIKitCore 0xcb1df0 runloopSourceCallback + 92 23 CoreFoundation 0xd3128 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 24 CoreFoundation 0xdf7b4 __CFRunLoopDoSource0 + 176 25 CoreFoundation 0x645e8 __CFRunLoopDoSources0 + 244 26 CoreFoundation 0x7a0d4 __CFRunLoopRun + 828 27 CoreFoundation 0x7f3ec CFRunLoopRunSpecific + 612 28 GraphicsServices 0x135c GSEventRunModal + 164 29 UIKitCore 0x39cf58 -[UIApplication _run] + 888 30 UIKitCore 0x39cbbc UIApplicationMain + 340 31 HerdBoss 0xced0 main + 16 (main.m:16) 32 ??? 0x1dd1b0dec (отсутствует)
Для справки, вот другие темы:
Неустранимая ошибка: