We are getting this crash in CoreData when we started using XCode 12.2. There is no change in code. So to fix this, we wrapped managedObjectContext of privateQueueConcurrencyType with performBlockAndWait as in apple documentation for core data concurrency - https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CoreData/Concurrency.html#:~:text=Concurrency%20is%20the%20ability%20to,UIKit%20are%20not%20thread%2Dsafe. After this change app become slow and some visible lagging is user actions like entering text is observed. What can be done to improve the performance here? Is it correct to wrap context fetch/update/save call with performBlockAndWait?
Post
Replies
Boosts
Views
Activity
We are facing a list of issues in crashlytics with a crash description "??? objc_msgSend", "???-[FBSSerialQueue assertBarrierOnQueue]", "???__exceptionPreprocess"
we can't find any clue related to our source code from the logs.
below are few logs for reference.
Crash Stack 1(???_objc_msgSend)
Crashed: WebThread
0 libobjc.A.dylib 0x21e0 objc_msgSend + 32
1 UIKitCore 0x110ae48 -[UIView _wantsReapplicationOfAutoLayoutWithLayoutDirtyOnEntry:] + 104
2 UIKitCore 0x110ba68 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2668
3 QuartzCore 0x167670 -[CALayer layoutSublayers] + 308
4 QuartzCore 0x167b54 CA::Layer::layout_if_needed(CA::Transaction*) + 548
5 QuartzCore 0x17c78c CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 144
6 QuartzCore 0xbe5e4 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 500
7 QuartzCore 0xea7f4 CA::Transaction::commit() + 684
8 QuartzCore 0xebb20 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 96
9 CoreFoundation 0xa25e0 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36
10 CoreFoundation 0x9c704 __CFRunLoopDoObservers + 572
11 CoreFoundation 0x9c3b4 CFRunLoopRunSpecific + 684
12 WebCore 0xb5ca24 <redacted> + 688
13 libsystem_pthread.dylib 0x1bfc _pthread_start + 320
14 libsystem_pthread.dylib 0xa758 thread_start + 8
Crash Stack 2(???_FBSSerialQueue assertBarrierOnQueue)
Crashed: WebThread
0 FrontBoardServices 0x8cdc -[FBSSerialQueue assertBarrierOnQueue] + 448
1 FrontBoardServices 0x12168 -[FBSScene updateClientSettings:withTransitionContext:] + 72
2 FrontBoardServices 0x1c344 -[FBSScene updateClientSettingsWithTransitionBlock:] + 160
3 FrontBoardServices 0xad48 -[FBSScene updateClientSettingsWithBlock:] + 140
4 UIKitCore 0x1f9250 -[FBSScene(UIApp) updateUIClientSettingsWithBlock:] + 184
5 UIKitCore 0x602fc4 -[UIApplication _setAmbiguousControlCenterActivationMargin:] + 140
6 UIKitCore 0xd6678 -[UIPeripheralHost(UIKitInternal) setAmbiguousControlCenterActivationMargin:] + 52
7 UIKitCore 0x292908 __66-[UIInputWindowController postValidatedEndNotifications:withInfo:]_block_invoke + 1132
8 UIKitCore 0x523a2c -[UIInputWindowController postValidatedEndNotifications:withInfo:] + 204
9 UIKitCore 0xd375bc __48-[UIInputWindowController viewDidLayoutSubviews]_block_invoke.865 + 852
10 UIKitCore 0x461180 -[UIInputWindowController performWithSafeTransitionFrames:] + 268
11 UIKitCore 0x382358 -[UIInputWindowController viewDidLayoutSubviews] + 360
12 UIKitCore 0x18dea0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 3092
13 QuartzCore 0x3f280 CA::Layer::layout_if_needed(CA::Transaction*) + 536
14 QuartzCore 0x31aa8 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 144
15 QuartzCore 0x460b0 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 500
16 QuartzCore 0x4f174 CA::Transaction::commit() + 680
17 QuartzCore 0x3121c CA::Transaction::flush_as_runloop_observer(bool) + 100
18 CoreFoundation 0x41570 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36
19 CoreFoundation 0x10854 __CFRunLoopDoObservers + 572
20 CoreFoundation 0x1f41c CFRunLoopRunSpecific + 684
21 WebCore 0xbf8810 <redacted> + 756
22 libsystem_pthread.dylib 0x1a60 _pthread_start + 148
23 libsystem_pthread.dylib 0xf5c thread_start + 8
Crash Stack 3(???__exceptionPreprocess)
Fatal Exception: NSInternalInconsistencyException
0 CoreFoundation 0x9905c __exceptionPreprocess
1 libobjc.A.dylib 0x15f54 objc_exception_throw
2 Foundation 0x13099c _userInfoForFileAndLine
3 UIFoundation 0xa933c -[NSTextLineFragment _drawTexCorrectionMarker:characterRange:atOrigin:graphicsContext:]
4 UIFoundation 0x8b08 -[NSTextLineFragment drawTextCorrectionMarkersAtPoint:graphicsContext:]
5 UIFoundation 0x65c44 -[NSTextLineFragment drawAtPoint:graphicsContext:]
6 UIFoundation 0x69ef4 -[NSTextLineFragment drawAtPoint:inContext:]
7 UIFoundation 0x3eb80 -[NSTextLayoutFragment drawAtPoint:inContext:]
8 UIKitCore 0x649ce4 _UITextCanvasDrawWithFadedEdgesInContext
9 UIKitCore 0x77cb4c -[_UITextLayoutFragmentView drawRect:]
10 UIKitCore 0x18898c -[UIView(CALayerDelegate) drawLayer:inContext:]
11 QuartzCore 0x4d2c8 CABackingStoreUpdate_
12 QuartzCore 0x8fe60 invocation function for block in CA::Layer::display_()
13 QuartzCore 0x91ae0 -[CALayer _display]
14 QuartzCore 0x31bc4 CA::Layer::layout_and_display_if_needed(CA::Transaction*)
15 QuartzCore 0x460b0 CA::Context::commit_transaction(CA::Transaction*, double, double*)
16 QuartzCore 0x4f174 CA::Transaction::commit()
17 QuartzCore 0x3121c CA::Transaction::flush_as_runloop_observer(bool)
18 CoreFoundation 0x41570 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
19 CoreFoundation 0x10854 __CFRunLoopDoObservers
20 CoreFoundation 0xb8ec __CFRunLoopRun
21 CoreFoundation 0x1f3c8 CFRunLoopRunSpecific
22 GraphicsServices 0x138c GSEventRunModal
23 UIKitCore 0x51b0bc -[UIApplication _run]
24 UIKitCore 0x298be8 UIApplicationMain
25 CitibankAUx 0x41673c (Missing)
26 Citibank AU 0x25b48 main + 43 (main.m:43)
27 ??? 0x107dbda24 (Missing)
Can anyone helps us to know what can be the cause of such crashes and what does this three question mark "???" before a crash description means?
Thanks in advance.
Amit