Not sure if this is the right forum to post this to, but here it goes. My app throws an NSInvalidArgumentException. I am able to step through the code and the exception appears to be thrown at this code snippet:
Terminating app due to uncaught exception ‘NSUnknownKeyException’, reason: ‘ setValue:forUndefinedKey:: this class is not key value coding-compliant for the key nametxt.’. First throw call stack: (0 CoreFoundation 0x02316a14 exceptionPreprocess + 180.
NSFetchRequest *request = [NSFetchRequest fetchRequestWithEntityName:@'Rooms'];
NSEntityDescription *entity = [NSEntityDescription entityForName:@'Rooms' inManagedObjectContext:managedObjectContext];
request.resultType = NSDictionaryResultType;
request.propertiesToFetch = [NSArray arrayWithObject:[[entity propertiesByName] objectForKey:@'roomName']];
I am not good at reading the stack which follows:
2015-07-29 20:30:22.423 HomeSense[55434:2541818] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]'
*** First throw call stack:
(
0 CoreFoundation 0x00000001120cfc65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000111d68bb7 objc_exception_throw + 45
2 CoreFoundation 0x0000000111f94478 -[__NSPlaceholderArray initWithObjects:count:] + 360
3 CoreFoundation 0x0000000112007b4f +[NSArray arrayWithObject:] + 47
4 HomeSense 0x000000010fe0b78a -[HSPaintLogViewController viewDidLoad] + 666
5 UIKit 0x00000001107271d0 -[UIViewController loadViewIfRequired] + 738
6 UIKit 0x00000001107273ce -[UIViewController view] + 27
7 UIKit 0x0000000110cb432d -[_UIFullscreenPresentationController _setPresentedViewController:] + 65
8 UIKit 0x0000000110701d69 -[UIPresentationController initWithPresentedViewController:presentingViewController:] + 105
9 UIKit 0x0000000110733248 -[UIViewController _presentViewController:withAnimationController:completion:] + 1761
10 UIKit 0x00000001107356c1 __62-[UIViewController presentViewController:animated:completion:]_block_invoke + 132
11 UIKit 0x00000001107355e5 -[UIViewController presentViewController:animated:completion:] + 229
12 UIKit 0x00000001105f7d62 -[UIApplication sendAction:to:from:forEvent:] + 75
13 UIKit 0x00000001105f7d62 -[UIApplication sendAction:to:from:forEvent:] + 75
14 UIKit 0x000000011070950a -[UIControl _sendActionsForEvents:withEvent:] + 467
15 UIKit 0x00000001107088d9 -[UIControl touchesEnded:withEvent:] + 522
16 UIKit 0x0000000110644958 -[UIWindow _sendTouchesForEvent:] + 735
17 UIKit 0x0000000110645282 -[UIWindow sendEvent:] + 682
18 UIKit 0x000000011060b541 -[UIApplication sendEvent:] + 246
19 UIKit 0x0000000110618cdc _UIApplicationHandleEventFromQueueEvent + 18265
20 UIKit 0x00000001105f359c _UIApplicationHandleEventQueue + 2066
21 CoreFoundation 0x0000000112003431 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
22 CoreFoundation 0x0000000111ff92fd __CFRunLoopDoSources0 + 269
23 CoreFoundation 0x0000000111ff8934 __CFRunLoopRun + 868
24 CoreFoundation 0x0000000111ff8366 CFRunLoopRunSpecific + 470
25 GraphicsServices 0x0000000114ee7a3e GSEventRunModal + 161
26 UIKit 0x00000001105f68c0 UIApplicationMain + 1282
27 HomeSense 0x000000010fe06d7f main + 111
28 libdyld.dylib 0x0000000113390145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
This particular functionality was working fine until now. I am totally clueless as to what is going on here, so any help would be greatly appreciated.
NSFetchRequest *request = [NSFetchRequest fetchRequestWithEntityName:@'Rooms'];
NSEntityDescription *entity = [NSEntityDescription entityForName:@'Rooms' inManagedObjectContext:managedObjectContext];
request.resultType = NSDictionaryResultType;
request.propertiesToFetch = [NSArray arrayWithObject:[[entity propertiesByName] objectForKey:@'roomName']];
I am not good at reading the stack which follows:
2015-07-29 20:30:22.423 HomeSense[55434:2541818] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]'
*** First throw call stack:
(
0 CoreFoundation 0x00000001120cfc65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000111d68bb7 objc_exception_throw + 45
2 CoreFoundation 0x0000000111f94478 -[__NSPlaceholderArray initWithObjects:count:] + 360
3 CoreFoundation 0x0000000112007b4f +[NSArray arrayWithObject:] + 47
4 HomeSense 0x000000010fe0b78a -[HSPaintLogViewController viewDidLoad] + 666
5 UIKit 0x00000001107271d0 -[UIViewController loadViewIfRequired] + 738
6 UIKit 0x00000001107273ce -[UIViewController view] + 27
7 UIKit 0x0000000110cb432d -[_UIFullscreenPresentationController _setPresentedViewController:] + 65
8 UIKit 0x0000000110701d69 -[UIPresentationController initWithPresentedViewController:presentingViewController:] + 105
9 UIKit 0x0000000110733248 -[UIViewController _presentViewController:withAnimationController:completion:] + 1761
10 UIKit 0x00000001107356c1 __62-[UIViewController presentViewController:animated:completion:]_block_invoke + 132
11 UIKit 0x00000001107355e5 -[UIViewController presentViewController:animated:completion:] + 229
Mac Mail Terminating App Due To Uncaught Exception Error
12 UIKit 0x00000001105f7d62 -[UIApplication sendAction:to:from:forEvent:] + 75
13 UIKit 0x00000001105f7d62 -[UIApplication sendAction:to:from:forEvent:] + 75
14 UIKit 0x000000011070950a -[UIControl _sendActionsForEvents:withEvent:] + 467
15 UIKit 0x00000001107088d9 -[UIControl touchesEnded:withEvent:] + 522
16 UIKit 0x0000000110644958 -[UIWindow _sendTouchesForEvent:] + 735
17 UIKit 0x0000000110645282 -[UIWindow sendEvent:] + 682
18 UIKit 0x000000011060b541 -[UIApplication sendEvent:] + 246
19 UIKit 0x0000000110618cdc _UIApplicationHandleEventFromQueueEvent + 18265
20 UIKit 0x00000001105f359c _UIApplicationHandleEventQueue + 2066
21 CoreFoundation 0x0000000112003431 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
Mac Mail Terminating App Due To Uncaught Exception Free
22 CoreFoundation 0x0000000111ff92fd __CFRunLoopDoSources0 + 269
Mac Mail Terminating App Due To Uncaught Exception Date
23 CoreFoundation 0x0000000111ff8934 __CFRunLoopRun + 868
Mac Mail Terminating App Due To Uncaught Exception Pdf
24 CoreFoundation 0x0000000111ff8366 CFRunLoopRunSpecific + 470
25 GraphicsServices 0x0000000114ee7a3e GSEventRunModal + 161
26 UIKit 0x00000001105f68c0 UIApplicationMain + 1282
27 HomeSense 0x000000010fe06d7f main + 111
28 libdyld.dylib 0x0000000113390145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
![]()
This particular functionality was working fine until now. I am totally clueless as to what is going on here, so any help would be greatly appreciated.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |