Search code examples
xcode10

Xcode Thread 1: Signabrt using triggered segues


I'm discovering issues with my IOS app. I have created UIButton to push to another view controller. The problem is every time the button is pressed my app crashes. I received a "Thread 1: Sigabrt" error message section in in AppDelegate.swift file in class section. There were no error codes displayed. I have verify my outlet connections on the view controller are set and checked for duplicates. I don't know what to do I added a snapshot of the error below. Someone please help. Here are screenshots and code listed below.

Thread1: Sigbart error

ViewControllersPush

2019-05-03 12:08:16.173571-0400 GreaterStJohnAMEChurchApp[11142:218008] libMobileGestalt MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform.
2019-05-03 12:11:19.502165-0400 GreaterStJohnAMEChurchApp[11142:218008] -[__NSArrayM setDelegate:]: unrecognized selector sent to instance 0x6000026fc2a0
2019-05-03 12:11:19.847144-0400 GreaterStJohnAMEChurchApp[11142:218008] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayM setDelegate:]: unrecognized selector sent to instance 0x6000026fc2a0'
*** First throw call stack:
(
    0   CoreFoundation                      0x0000000105fe96fb __exceptionPreprocess + 331
    1   libobjc.A.dylib                     0x000000010558dac5 objc_exception_throw + 48
    2   CoreFoundation                      0x0000000106007ab4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
    3   CoreFoundation                      0x0000000105fee443 ___forwarding___ + 1443
    4   CoreFoundation                      0x0000000105ff0238 _CF_forwarding_prep_0 + 120
    5   GreaterStJohnAMEChurchApp           0x00000001049bb303 $s25GreaterStJohnAMEChurchApp9SendEmailC11viewDidLoadyyF + 243
    6   GreaterStJohnAMEChurchApp           0x00000001049bb7b4 $s25GreaterStJohnAMEChurchApp9SendEmailC11viewDidLoadyyFTo + 36
    7   UIKitCore                           0x000000010b34143b -[UIViewController loadViewIfRequired] + 1183
    8   UIKitCore                           0x000000010b341868 -[UIViewController view] + 27
    9   UIKitCore                           0x000000010b2903d0 -[UINavigationController _startCustomTransition:] + 929
    10  UIKitCore                           0x000000010b2a631a -[UINavigationController _startDeferredTransitionIfNeeded:] + 741
    11  UIKitCore                           0x000000010b2a76a7 -[UINavigationController __viewWillLayoutSubviews] + 150
    12  UIKitCore                           0x000000010b28838d -[UILayoutContainerView layoutSubviews] + 217
    13  UIKitCore                           0x000000010be119c1 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1417
    14  QuartzCore                          0x000000010d382eae -[CALayer layoutSublayers] + 173
    15  QuartzCore                          0x000000010d387b88 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 396
    16  QuartzCore                          0x000000010d393ee4 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 72
    17  QuartzCore                          0x000000010d3033aa _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 328
    18  QuartzCore                          0x000000010d33a584 _ZN2CA11Transaction6commitEv + 608
    19  UIKitCore                           0x000000010b93dd8a _UIApplicationFlushRunLoopCATransactionIfTooLate + 150
    20  UIKitCore                           0x000000010ba30f5f __handleEventQueueInternal + 6845
    21  CoreFoundation                      0x0000000105f50be1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    22  CoreFoundation                      0x0000000105f50463 __CFRunLoopDoSources0 + 243
    23  CoreFoundation                      0x0000000105f4ab1f __CFRunLoopRun + 1231
    24  CoreFoundation                      0x0000000105f4a302 CFRunLoopRunSpecific + 626
    25  GraphicsServices                    0x000000010f5552fe GSEventRunModal + 65
    26  UIKitCore                           0x000000010b943ba2 UIApplicationMain + 140
    27  GreaterStJohnAMEChurchApp           0x00000001049bf8cb main + 75
    28  libdyld.dylib                       0x00000001090e9541 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

Bad Outlets


Solution

  • The crash has nothing to do with the button and the segue. It is because of bad code or a bad outlet in your Send Email view controller. Look for code where you try to set the delegate of a text field, as well as bad connections in the storyboard.