libc ++ abi.dylib: terminating with uncaught exception of type NSException

2

I get the following error when running the application:

objc[1951]: Class PLBuildVersion is implemented in both/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0xd14044c) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0xced8b78). One of the two will be used. Which one is undefined.
2017-03-10 10:31:06.170 Vehiculos[1951:137518] Unknown class MyTableCarViewController in Interface Builder file.
2017-03-10 10:31:06.316 Vehiculos[1951:137518] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UITableViewController 0x78775e30> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key ImageView.'
*** First throw call stack:
(   0   CoreFoundation                      0x01108bf2 __exceptionPreprocess + 194
1   libobjc.A.dylib                     0x007a2e66 objc_exception_throw + 52
2   CoreFoundation                      0x01108b21 -[NSException raise] + 17
3   Foundation                          0x003ea90d -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 238
4   Foundation                          0x00318476 _NSSetUsingKeyValueSetter + 162
5   Foundation                          0x00317fe8 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285
6   UIKit                               0x016d5a9e -[UIViewController setValue:forKey:] + 80
7   Foundation                          0x00339b5f -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 309
8   UIKit                               0x019833ad -[UIRuntimeOutletConnection connect] + 138
9   libobjc.A.dylib                     0x007b8177 -[NSObject performSelector:] + 51
10  CoreFoundation                      0x010a8180 -[NSArray makeObjectsPerformSelector:] + 272
11  UIKit                               0x01981a6c -[UINib instantiateWithOwner:options:] + 2102
12  UIKit                               0x016dcd23 -[UIViewController _loadViewFromNibNamed:bundle:] + 437
13  UIKit                               0x016dd770 -[UIViewController loadView] + 197
14  UIKit                               0x019973ef -[UITableViewController loadView] + 90
15  UIKit                               0x016ddae9 -[UIViewController loadViewIfRequired] + 188
16  UIKit                               0x016e4c00 -[UIViewController __viewWillAppear:] + 114
17  UIKit                               0x017088d3 -[UIViewController(UIContainerViewControllerProtectedMethods) beginAppearanceTransition:animated:] + 204
18  UIKit                               0x0171455b -[UINavigationController _startCustomTransition:] + 1438
19  UIKit                               0x017269fd -[UINavigationController _startDeferredTransitionIfNeeded:] + 836
20  UIKit                               0x01727ebd -[UINavigationController __viewWillLayoutSubviews] + 70
21  UIKit                               0x0194b69a -[UILayoutContainerView layoutSubviews] + 232
22  UIKit                               0x015e57e4 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1457
23  libobjc.A.dylib                     0x007b81b9 -[NSObject performSelector:withObject:] + 59
24  QuartzCore                          0x061ec679 -[CALayer layoutSublayers] + 141
25  QuartzCore                          0x061df503 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 401
26  QuartzCore                          0x061df359 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 21
27  QuartzCore                          0x06168f57 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 339
28  QuartzCore                          0x06197d4c _ZN2CA11Transaction6commitEv + 498
29  QuartzCore                          0x0619985c _ZN2CA11Transaction17flush_transactionEv + 38
30  UIKit                               0x0150845b _UIApplicationFlushRunLoopCATransactionIfTooLate + 222
31  UIKit                               0x01dccead __handleEventQueue + 6148
32  CoreFoundation                      0x010a7edf __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
33  CoreFoundation                      0x0108bfa7 __CFRunLoopDoSources0 + 519
34  CoreFoundation                      0x0108b434 __CFRunLoopRun + 1124
35  CoreFoundation                      0x0108ad5b CFRunLoopRunSpecific + 395
36  CoreFoundation                      0x0108abbb CFRunLoopRunInMode + 123
37  GraphicsServices                    0x0530ab4c GSEventRunModal + 177
38  GraphicsServices                    0x0530a9c7 GSEventRun + 80
39  UIKit                               0x0150fff3 UIApplicationMain + 148
40  Vehiculos                           0x000a5901 main + 145
41  libdyld.dylib                       0x0364b799 start + 1
42  ???                                 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

I need to deliver this project today and I can not make it work.

Here is the complete project in case you like to see it.

    
asked by Aaron Alvarez 10.03.2017 в 19:23
source

2 answers

1

In your Storyboard you have a controller to which you have set your customClass to MyTableCarViewController .

However, this class does not exist in the repo. Hence the message:

  

Unknown class MyTableCarViewController in Interface Builder file.

When not finding the class, the Storyboard should try to load with a% normal UIViewController , and since you have established several outlets , and a UIViewController normal does not contain any property ImageView , it gives you that exception.

It looks like you've deleted that class accidentally , or maybe you've renamed .

Either you assign the correct class in the Storyboard, or you create that class with the outlets you need

    
answered by 13.03.2017 в 21:16
0

In my case I had an outlet to which I changed the name, that caused that in the inspector of connections there was an outlet of more.

You should check out the outlet that had the name imageView:

      @IBOutlet weak var imageView: UIImageView

And in the Connection Inspector delete the outlet that has no reference.

    
answered by 18.12.2017 в 21:43