How to fix Thread 1: signal SIGABRT

I'm creating an app to control tv buttons. My code is working with light, but not TV (IR transmitter).

2019-10-25 22:23:53.259608-0400 jpackHomeAutomation[5455:274138] [Graphics] UIColor created with component values far outside the expected range. Set a breakpoint on UIColorBreakForOutOfRangeColorComponents to debug. This message will only be logged once.
Over Head Light is On.
Over Head Light is Off.
2019-10-25 22:23:58.769591-0400 jpackHomeAutomation[5455:274138] [Storyboard] Unable to find method -[<jpackHomeAutomation.homeScreen: 0x7ff7145212c0> tvButton:]
2019-10-25 22:23:59.772982-0400 jpackHomeAutomation[5455:274138] -[UIButton loadRequest:]: unrecognized selector sent to instance 0x7ff7147607c0
2019-10-25 22:23:59.812855-0400 jpackHomeAutomation[5455:274138] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIButton loadRequest:]: unrecognized selector sent to instance 0x7ff7147607c0'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23baa1ee __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50864b20 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23bcb154 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 UIKitCore 0x00007fff475a6e79 -[UIResponder doesNotRecognizeSelector:] + 302
4 CoreFoundation 0x00007fff23baef6c forwarding + 1436
5 CoreFoundation 0x00007fff23bb10f8 _CF_forwarding_prep_0 + 120
6 jpackHomeAutomation 0x0000000103807d5a $sSo9WKWebViewC19jpackHomeAutomationE7loadURL3strySS_tF + 634
7 jpackHomeAutomation 0x00000001038079ca $sSo9WKWebViewC19jpackHomeAutomationE10loadingURL02onG003offG0ySS_SStF + 618
8 jpackHomeAutomation 0x000000010380b101 $s19jpackHomeAutomation8tvRemoteC0D5OnOffyySo8UIButtonCF + 833
9 jpackHomeAutomation 0x000000010380b184 $s19jpackHomeAutomation8tvRemoteC0D5OnOffyySo8UIButtonCFTo + 68
10 UIKitCore 0x00007fff4757a082 -[UIApplication sendAction:to:from:forEvent:] + 83
11 UIKitCore 0x00007fff46f608e5 -[UIControl sendAction:to:forEvent:] + 223
12 UIKitCore 0x00007fff46f60c2f -[UIControl _sendActionsForEvents:withEvent:] + 398
13 UIKitCore 0x00007fff46f5fb8e -[UIControl touchesEnded:withEvent:] + 481
14 UIKitCore 0x00007fff475b4a31 -[UIWindow _sendTouchesForEvent:] + 2604
15 UIKitCore 0x00007fff475b6338 -[UIWindow sendEvent:] + 4596
16 UIKitCore 0x00007fff47591693 -[UIApplication sendEvent:] + 356
17 UIKitCore 0x00007fff47611e5a __dispatchPreprocessedEventFromEventQueue + 6847
18 UIKitCore 0x00007fff47614920 __handleEventQueueInternal + 5980
19 CoreFoundation 0x00007fff23b0d271 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
20 CoreFoundation 0x00007fff23b0d19c __CFRunLoopDoSource0 + 76
21 CoreFoundation 0x00007fff23b0c974 __CFRunLoopDoSources0 + 180
22 CoreFoundation 0x00007fff23b0767f __CFRunLoopRun + 1263
23 CoreFoundation 0x00007fff23b06e66 CFRunLoopRunSpecific + 438
24 GraphicsServices 0x00007fff38346bb0 GSEventRunModal + 65
25 UIKitCore 0x00007fff47578dd0 UIApplicationMain + 1621
26 jpackHomeAutomation 0x00000001038030cb main + 75
27 libdyld.dylib 0x00007fff516ecd29 start + 1
28 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

You probably want the “Using Swift” section of the forums; this section is about development of the language itself.

jpackHomeAutomation[5455:274138] -[UIButton loadRequest:]: unrecognized selector sent to instance 0x7ff7147607c0

This error message (which is a holdover from Objective-C, hence the odd wording) means that you tried to call a method named loadRequest(_:) on a UIButton, which doesn’t have such a method. Judging from the name, perhaps you are trying to make the button’s action be a method on the controller, but you accidentally set it to call that method on the button instead. Check any addTarget(_:action:for:) method calls and Interface Builder/Storyboard connections related to this and see if they’re hooked up to the wrong target.

2 Likes

I moved the thread, thx.