Many crashes on Fabric because of this error:
Fatal Exception: NSInternalInconsistencyException
Modifications to the layout engine must not be performed from a background thread after it has been accessed from the main thread.
Fatal Exception: NSInternalInconsistencyException
0 CoreFoundation 0x1c34c896c __exceptionPreprocess
1 libobjc.A.dylib 0x1c31e1028 objc_exception_throw
2 Foundation 0x1c39b45e0 -[NSISEngine tryToOptimizeReturningMutuallyExclusiveConstraints]
3 Foundation 0x1c37ad854 -[NSISEngine _optimizeWithoutRebuilding]
4 Foundation 0x1c37ad768 -[NSISEngine optimize]
5 Foundation 0x1c37ad3d8 -[NSISEngine performPendingChangeNotifications]
6 UIKitCore 0x1c7a695b8 -[UIView(Hierarchy) layoutSubviews]
7 UIKitCore 0x1c7a7c8b0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:]
8 libobjc.A.dylib 0x1c31dca4c -[NSObject performSelector:withObject:]
9 QuartzCore 0x1ca09255c -[CALayer layoutSublayers]
10 QuartzCore 0x1ca0929ac CA::Layer::layout_if_needed(CA::Transaction*)
11 QuartzCore 0x1ca0a51bc CA::Layer::layout_and_display_if_needed(CA::Transaction*)
12 QuartzCore 0x1c9fe9b00 CA::Context::commit_transaction(CA::Transaction*, double)
13 QuartzCore 0x1ca014910 CA::Transaction::commit()
14 QuartzCore 0x1ca0154e4 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*)
15 CoreFoundation 0x1c3443524 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
16 CoreFoundation 0x1c343e1c4 __CFRunLoopDoObservers
17 CoreFoundation 0x1c343df60 CFRunLoopRunSpecific
18 WebCore 0x1cb618820 RunWebThread(void*)
19 libsystem_pthread.dylib 0x1c31d1840 _pthread_start
20 libsystem_pthread.dylib 0x1c31d99f4 thread_start
My full code here: https://github.com/tongvantruong/code/blob/master/TestingController.swift
I don't really understand where is the root cause from the crash message. Please help me!