Cocoa Touch project with ARC error: [__NSCFString deviceOrientationDidChange:]: unrecognized selector - ios

I've got the Cocoa Touch project with ARC and this error sometimes occurs. Can You explain me the kind of this error and the way to solve this?
-[__NSCFString deviceOrientationDidChange:]: unrecognized selector sent to instance 0x1ddf81a0
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString deviceOrientationDidChange:]: unrecognized selector sent to instance 0x1ddf81a0'
*** First throw call stack:
(0x313132a3 0x38fad97f 0x31316e07 0x31315531 0x3126cf68 0x31264037 0x31b7a599 0x33121c65 0x3311c3db 0x3311b6cd 0x3311b11b 0x34e1c5a3 0x34e1c1d3 0x312e8173 0x312e8117 0x312e6f99 0x31259ebd 0x31259d49 0x34e1b2eb 0x3316f301 0x14b61 0x14ae8)
libc++abi.dylib: terminate called throwing an exception

You have a zombie problem. If you can reproduce this on the simulator, run it under the Zombies instrument. If you can only reproduce it on the device, edit your scheme, go to the Diagnostics tab, and turn on the zombies checkbox there. (Instruments doesn't offer zombie detection on the device, unfortunately.)

The crash you're seeing has nothing to do with ARC and everything to do with the object (which appears to be a NSCFString object) that's receiving a bogus "deviceOrientationDidChange:" message.
My recommendation would be to set a symbolic breakpoint on "deviceOrientationDidChange" and catch the message being sent and then you'll know what line of code is broken.

Related

Terminating app due to uncaught exception 'NSInvalidArgumentException' , reason: '-[NSNull _fastCStringContents:]: unrecognized selector

I created a new tabbed application in Xcode. I am receiving the following error every time I try to type any letters or numbers into a text field.
I noticed that this error started when I checked the box for "is initial view controller"
When i have the ViewController itself set as the initial ViewController it will not throw the error. However, when I make a NavigationController the initial ViewController it will throw this error.
Error received:
Reminder[46707:4165261] -[NSNull _fastCStringContents:]: unrecognized selector sent to instance 0x10d087af0
2016-03-23 00:48:19.830 Cable tech Reminder[46707:4165261] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull _fastCStringContents:]: unrecognized selector sent to instance 0x10d087af0'
For me this issue was caused because I inadvertently clicked on the Key Commands controls in the attribute inspector. I did not create any commands, but having and empty entry caused any input into a textField to crash.
Solution :-
1) Right click on storyboard and open as source code.
2) Search for keyCommands and delete that empty keyCommands tag.
3) Clean and Run.
This solved my problem, I hope it will be helpful for you as well.
Cheers

[__NSConcreteURLComponents queryItems]: unrecognized selector

I'm getting this error trying to run a bare project from the react-native init command, on an iOS 7.1 device.
This works on the iOS simulator, so I wonder if its an iOS compatibility issue?
The Movies example app works ok on this device.
```
2016-01-08 16:34:33.224 CouchTest[1210:60b] -[__NSConcreteURLComponents queryItems]: unrecognized selector sent to instance 0x14dacc10
2016-01-08 16:34:33.226 CouchTest[1210:60b] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSConcreteURLComponents queryItems]: unrecognized selector sent to instance 0x14dacc10'
* First throw call stack:
(0x2edb0f83 0x39561ccf 0x2edb4917 0x2edb3203 0x2ed02768 0x10abaf 0xb47a1 0xb1735 0xb0c8b 0x39a49833 0x39a4981f 0x39a49777 0x2ed7b8a1 0x2ed7a175 0x2ece4ebf 0x2ece4ca3 0x33bea663 0x3163114d 0x9780d 0x39a6eab7)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
```
NSURLComponents queryItems is only available on iOS8+
That's why you are seeing the crash.
See the docs here for more info: https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSURLComponents_class/index.html#//apple_ref/occ/instp/NSURLComponents/queryItems
Setting an exception breakpoint will show you which class/method is making that call. Otherwise, it sounds like react-native is calling queryItems when it shouldn't.

BugClipper integration issue

I have trouble integrating BugClipper into my project.
I followed the integration instructions mentioned on their website
But, the when I continue with my build it throws the following error -
Cannot find executable for CFBundle/CFPlugIn 0x17eaf2f0 (not loaded)
2014-07-24 12:34:15.457 BugClipper[371:60b] -[SMOCInvokerView smoc_width]: unrecognized selector sent to instance 0x17eae380
2014-07-24 12:34:15.459 BugClipper[371:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SMOCInvokerView smoc_width]: unrecognized selector sent to instance 0x17eae380'
*** First throw call stack:
(0x2eafce83 0x391a66c7 0x2eb007b7 0x2eaff0af 0x2ea4ddc8 0x10e8bf 0x10e60f 0x3968b0af 0x3968bcdb 0x10e5e7 0x105861 0xea8e5 0x312f1aad 0x312f14f3 0x312ebb41 0x31286a07 0x31285cfd 0x312eb321 0x3373876d 0x33738357 0x2eac7777 0x2eac7713 0x2eac5edf 0x2ea30471 0x2ea30253 0x312ea5c3 0x312e5845 0xeaae5 0x3969fab7)
libc++abi.dylib: terminating with uncaught exception of type NSException
it seems the category is not loaded, better go to Build Settings of your Target App, and search for Other Linker Flag and add one line in there, -ObjC -all_load
This should definitely solve your problem.
Cheers

NSZombieEnabled not working

I've set NSZombieEnabled to YES in my scheme but still no debug info. I am using Xcode 4.6.3.
I've read this question but it does not solve my issue: NSZombie Enabled but Still No Debug Info.
Here is the crash log,
-[MODELNode nodeList]: unrecognized selector sent to instance 0x1315170
2013-12-16 12:30:29.990 OHI Control[6198:907] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MODELNode nodeList]: unrecognized selector sent to instance 0x1315170'
*** First throw call stack:
(0x311c32a3 0x3906397f 0x311c6e07 0x311c5531 0x3111cf68 0x1a2273 0x333fc547 0x333fd789 0x333f4add 0x333f53eb 0x333f27d3 0x333fc685 0x333fcb3d 0x333e375f 0x32fce803 0x32d78d8b 0x32d78929 0x32d7985d 0x32d79243 0x32d79051 0x32fd48eb 0x311986cd 0x311969c1 0x31196d17 0x31109ebd 0x31109d49 0x34cd32eb 0x3301f301 0x2f15 0x3949ab20)
libc++abi.dylib: terminate called throwing an exception
How do I get this working correctly?
For adding Exception Break Point I am adding here images to explain how.
That's All. Hope this helps.

iOS Button Target Actions with Block Crashes

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.

Resources