0

It is the error shown in the Xcode when i switch back to settings in simulator .if somebody knows please kindly notify me. Thanks in advance

GeoNet[2325:41287] This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes.  This will cause an exception in a future release.
 Stack:(
    0   CoreFoundation                      0x00c5ba14 __exceptionPreprocess + 180
    1   libobjc.A.dylib                     0x0071ce02 objc_exception_throw + 50
    2   CoreFoundation                      0x00c5b93d +[NSException raise:format:] + 141
    3   Foundation                          0x004ee74b _AssertAutolayoutOnMainThreadOnly + 96
    4   Foundation                          0x003164c1 -[NSISEngine optimize] + 67
    5   Foundation                          0x00316f84 -[NSISEngine withBehaviors:performModifications:] + 245
    6   Foundation                          0x0031a404 -[NSISEngine withAutomaticOptimizationDisabled:] + 48
    7   UIKit                               0x01dd9b08 -[UIView(AdditionalLayoutSupport) _withAutomaticEngineOptimizationDisabledIfEngineExists:] + 75
    8   UIKit                               0x01dda781 -[UIView(AdditionalLayoutSupport) updateConstraintsIfNeeded] + 278
    9   UIKit                               0x01aa48b8 -[UITableViewCellContentView updateConstraintsIfNeeded] + 185
    10  UIKit                               0x01ddb66c -[UIView(AdditionalLayoutSupport) _updateConstraintsAtEngineLevelIfNeeded] + 372
    11  UIKit                               0x014a919a -[UIView(Hierarchy) _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 173
    12  UIKit                               0x014a9929 -[UIView(Hierarchy) layoutSubviews] + 184
    13  UIKit                               0x014bb008 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 810
    14  libobjc.A.dylib                     0x00731059 -[NSObject performSelector:withObject:] + 70
    15  QuartzCore                          0x0603480a -[CALayer layoutSublayers] + 144
    16  QuartzCore                          0x060284ee _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 388
    17  QuartzCore                          0x06028352 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
    18  QuartzCore                          0x0601ae8b _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 317
    19  QuartzCore                          0x0604ee03 _ZN2CA11Transaction6commitEv + 561
    20  QuartzCore                          0x0604f1ab _ZN2CA11Transaction14release_threadEPv + 289
    21  libsystem_pthread.dylib             0x0308d2f7 _pthread_tsd_cleanup + 93
    22  libsystem_pthread.dylib             0x0308d051 _pthread_exit + 108
    23  libsystem_pthread.dylib             0x0308d734 pthread_get_stackaddr_np + 0
    24  libsystem_pthread.dylib             0x0308ae0e start_wqthread + 30
)
Prabhu
  • 840
  • 11
  • 28

2 Answers2

1

This is happening since iOS 9, on earlier version your code could have working fine. This is because, some of your functions must executing on the background thread and after view load trying to change the appearance of view. So, you must have put that function on main thread and load it asynchronously. Please share the code of ViewController, which you are trying to load for more specific answer.

dispatch_async(dispatch_get_main_queue(), ^{
// your code here
})
Kunal Kumar
  • 1,722
  • 1
  • 17
  • 32
0

Been encountering this error a lot in my OS X using swift: "This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes. This will cause an exception in a future release."

See this link, You can find solution.

Community
  • 1
  • 1
Dinesh Gurrapu
  • 158
  • 1
  • 1
  • 11