Airglow
Airglow

Reputation: 71

SIGABRT Error swift

Could anyone help me understand why Im getting this error? It seems to be happening when I load one of my view controllers but I can't see why.

What usually causes an error like this?

    *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITextInputTraits length]: unrecognized selector sent to instance 0x7fbf924828a0'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000010664ac65 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x0000000105f27bb7 objc_exception_throw + 45
    2   CoreFoundation                      0x00000001066520ad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
    3   CoreFoundation                      0x00000001065a813c ___forwarding___ + 988
    4   CoreFoundation                      0x00000001065a7cd8 _CF_forwarding_prep_0 + 120
    5   libswiftCore.dylib                  0x0000000107ddf728 _TTSf4g_d___TFSSCfMSSFT12_cocoaStringPSs9AnyObject__SS + 120
    6   libswiftCore.dylib                  0x0000000107dc01a3 _TFSSCfMSSFT12_cocoaStringPSs9AnyObject__SS + 19
    7   Project1                            0x00000001054ec3bd _TToFC8ASA_Rank22SettingsViewControllers9ASANumberSS + 61
    8   Foundation                          0x0000000105abdb53 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259
    9   CoreFoundation                      0x0000000106592d50 -[NSArray makeObjectsPerformSelector:] + 224
    10  UIKit                               0x0000000106d1b4eb -[UINib instantiateWithOwner:options:] + 1506
    11  UIKit                               0x0000000106b736d8 -[UIViewController _loadViewFromNibNamed:bundle:] + 242
    12  UIKit                               0x0000000106b73cc8 -[UIViewController loadView] + 109
    13  UIKit                               0x0000000106b73f39 -[UIViewController loadViewIfRequired] + 75
    14  UIKit                               0x0000000106b743ce -[UIViewController view] + 27
    15  UIKit                               0x000000010710132d -[_UIFullscreenPresentationController _setPresentedViewController:] + 65
    16  UIKit                               0x0000000106b4ed69 -[UIPresentationController initWithPresentedViewController:presentingViewController:] + 105
    17  UIKit                               0x0000000106b80248 -[UIViewController _presentViewController:withAnimationController:completion:] + 1761
    18  UIKit                               0x0000000106b826c1 __62-[UIViewController presentViewController:animated:completion:]_block_invoke + 132
    19  UIKit                               0x0000000106b825e5 -[UIViewController presentViewController:animated:completion:] + 229
    20  UIKit                               0x0000000106a44d62 -[UIApplication sendAction:to:from:forEvent:] + 75
    21  UIKit                               0x0000000106b5650a -[UIControl _sendActionsForEvents:withEvent:] + 467
    22  UIKit                               0x0000000106b558d9 -[UIControl touchesEnded:withEvent:] + 522
    23  UIKit                               0x0000000106a91958 -[UIWindow _sendTouchesForEvent:] + 735
    24  UIKit                               0x0000000106a92282 -[UIWindow sendEvent:] + 682
    25  UIKit                               0x0000000106a58541 -[UIApplication sendEvent:] + 246
    26  UIKit                               0x0000000106a65cdc _UIApplicationHandleEventFromQueueEvent + 18265
    27  UIKit                               0x0000000106a4059c _UIApplicationHandleEventQueue + 2066
    28  CoreFoundation                      0x000000010657e431 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    29  CoreFoundation                      0x00000001065742fd __CFRunLoopDoSources0 + 269
    30  CoreFoundation                      0x0000000106573934 __CFRunLoopRun + 868
    31  CoreFoundation                      0x0000000106573366 CFRunLoopRunSpecific + 470
    32  GraphicsServices                    0x000000010a1e0a3e GSEventRunModal + 161
    33  UIKit                               0x0000000106a438c0 UIApplicationMain + 1282
    34  Project1                            0x00000001054f70c7 main + 135
    35  libdyld.dylib                       0x0000000108530145 start + 1
    36  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Please ask for any other informations that is helpful

Thanks

Upvotes: 0

Views: 234

Answers (1)

kirkbyo
kirkbyo

Reputation: 61

You most likely have an Outlet assigned to an element on the view controller you are transitioning to that is no longer connected to your code. This youtube video explains it in more detail.

To hunt down this issue, try right-clicking on all your elements (UILabels, UIViews, UIButton...) with the assistant editor open and cross check to see if the outlet name is referenced in the view controller.

Example

Upvotes: 3

Related Questions