Today Notification Widget launch crashes with the following error:
Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '*** setObjectForKey: object
cannot be nil (key: <__NSConcreteUUID 0x170026460>
C492718F-C23C-4FC8-AE0F-ED5CE3141xxx)'
ViewDidLoad not even gets called
Any idea why?
Check if NotificationCenter.framework is included into your project's current selected target or if there is any other framework missing.
It sounds like you're trying to write a nil value into a dictionary or NSUserDefaults. Your controller will be initialized before viewDidLoad is called. Did you override the initializer?
I think you need to provide more information. Maybe post your controller code?
Related
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UISearchBar searchTextField]: unrecognized selector sent to instance 0x7f8ebaf60cf0'
How do I know which is this view 0x7f8ebaf60cf0?
I was doing PO 0x7f8ebaf60cf0
and it returns this 140250998770928
Then I needed more info like recursiveDescription but I can't get further. How can I start debugging such a bug?
The problem is that searchTextField is iOS 13 only. On iOS 12 and before it compiles, runs, and crashes. Just do a global search for searchTextField and don’t use it under iOS 12 or earlier.
Take a look https://learnappmaking.com/unrecognized-selector-sent-to-instance-swift-development/
Basically these errors occurs when you try to access an object which is nil.
I think in your case it happens because [UISearchBar searchTextField] ,Here searchTextField is no function.
I was updated xcode today.
When I want to show some viewController (without collectionView & tableView), I’ve got crash in AppDelegate and debug info:
Terminating app due to uncaught exception 'NSGenericException', reason: 'This coder requires that replaced objects be returned from initWithCoder:’
Anyone solved this problem?
Check your ViewController for injected Object references. It may be caused by external class from some Pod Repository. Remove it and define all the logic inside the VC class. This solved the issue for me. VC Scene
i have different realm objects in different ViewControllers and from my settingViewController i'm deleting all the data of app (the realm stored objects ) its working fine but when i move back to those viewControllers i got this exception :
Terminating app due to uncaught exception 'RLMException', reason: 'Object has been deleted or invalidated.'
*** First throw call stack:
(0x180c0adb0 0x18026ff80 0x100a13e7c 0x1001bd54c 0x1001be77c 0x1860c288c 0x1860c2c3c 0x185eb78e8 0x185d775b4 0x185eb6d34 0x192375f40 0x185ef1c94 0x192375ccc 0x1001b97ac 0x1001bbe4c 0x1860bf030 0x1860bf198 0x1860ae298 0x1860c3c64 0x185e548c4 0x185d641e4 0x1836f698c 0x1836f15c8 0x1836f1488 0x1836f0ab8 0x1836f0818 0x1836e9ddc 0x180bc0728 0x180bbe4cc 0x180bbe8fc 0x180ae8c50 0x1823d0088 0x185dd2088 0x100121cc8 0x1806868b8)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
i know its happening because system (kernel , iOS) dont knows that i've deleted those Realms Objects and system is trying to use that data which is not exists anymore (Correct me if i'm wrong) , any one can guide me on how i can fix this problem ???
I suggest you to make notification before deleting all your data to all view controllers, that manipulate with it:
Push notification from your settingViewController before wipe
Subscribe to this everywhere you need to clear objects.
delete references
perform clean in your settingViewController.
Or, other way - implement delegate pattern for your purpose. The idea is the same.
Hope this helps.
An app I recently started and working its keeps crashing with a SIGABRT message. The general message at the top of the debugger says:
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIView 0xb651580> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key parentEmail.'
... At the the bottom it says:
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Let me know if the "first throw call stack" info is necessary to solve this one.
Check and make sure that you didnt previously have a button/text field/label previously linked with an action, then deleted that item. The link still exists. Check and make sure that all your links match to existing items.
Usually this comes from an outlet link inside a xib with no corresponding class variable.
Did you remove a variable from a class without removing the link inside the xib?
I'm implementing UIButtons with block actions set on them for connivence and speed of integration. I've used this method before, a while ago now, and had little issue with it. Now, however, i'm facing an issue where integrating...
https://gist.github.com/2468899
... into my app now crashes it on launch. The error i'm receiving is as follows...
2012-09-27 22:18:47.459 flink[12174:907] -[UIButton setAction:withBlock:]: unrecognized selector sent to instance 0x1e8ae610
2012-09-27 22:18:47.460 flink[12174:907] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIButton setAction:withBlock:]: unrecognized selector sent to instance 0x1e8ae610'
*** First throw call stack:
(0x3885a3e7 0x333bf963 0x3885df31 0x3885c64d 0x387b4208 0xea477 0xff6af 0x36b92cb1 0x3882f8f7 0x3882f15d 0x3882df2f 0x387a123d 0x387a10c9 0x3868c33b 0x34014289 0xe7b8f 0xe7b30)
libc++abi.dylib: terminate called throwing an exception
... i've never seen this issue before but it's odd that it is immediately crashing without any interaction.
Thanks in advanced.
You must make sure to add the implementation file of the category to your target. In Xcode, go to the File Inspector and make sure the Target Membership checkbox for your target is checked.