The application began to crash when installing on iOS 9.1 Beta 2. Exactly same binary (downloaded from hudson link) behaves so:
It did not crash on iOS 9.0 and iOS 9.0.1
It did not crash on either iOS 8
I have extracted the crash log, crash happens inside the call to [[NSBundle mainBundle] loadNibNamed:#"NameOfView" owner:self options:nil];. The crash itself is NSUnknownKeyException:
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[< NameOfView: 0x1446a6ea0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key .'
So far i see weird key '.' which nib loading mechanism tries to set on my class, and obviously, such is not present in nib. And this looks extraweird even more, due to iOS 9.1 beta 2 is the only version with this behaviour. Moreover, building app with XCode 7 from on same git revision gives no success crashing app - it works as expected. Has anybody experienced such behaviour after trying your release versions on iOS 9.0.1 beta 2? Want to have some feedbacks of SO community before file a bug to radar. Appreciate your help, guys.
P.S. I'd like to emphasize that the issue reproduces only on that particular binary. Building it again from the same sources in XCode 7 doesn't produce a crash. So please, don't suggest how to debug such kind of problem, how to set exception breakpoint etc.
EDIT
Since 9.1 release, it's no more reproducible.
As stated in comment to original question, there's no solution and no response on bug yet.
The openradar link: http://openradar.appspot.com/radar?id=6294934587965440
I'll be posting an updates here after the 9.1 release.
There are some empiric ways to come up with solution:
Override KVC setter setValue:forKey: and forbid empty string
key.
Use always the latest stable SDK to build.
But again, no actual response from Apple neither.
EDIT Since 9.1 release, it's no more reproducible.
Related
I implemented Dark Mode with the current beta version of Xcode in a relatively old app. I uploaded these to TestFlight for my testers. However, this crashes immediately for anyone who has the public beta of iOS 13.
I've integrated Crashlytics into the app, and the cause of these crashes is as follows:
UISearchDisplayController is no longer supported when using this version of iOS. Please migrate your application to UISearchController.
All UISearchDisplayController instances have already been replaced by the UISearchController. The app doesn't use the UISearchDisplayController anymore. There is no longer any links to the UISearchDisplayController. Nevertheless, these crashes continue to occur, but only from the installations of TestFlight.
If the app is installed directly with Xcode as a "Debug" or "Release" on an iPhone with the public beta, the crash does not occur.
Does anyone have a solution for this problem?
After receiving the same error and finding no references to UISearchDisplayController across our app, we realized we needed to search for and replace searchDisplayController from within one of our storyboards. That corrected the issue after resubmitting a beta to TestFlight.
It was working on simulator but all beta tester claimed it crashed. The problem was in story board. Search for these in your views.
*** Terminating app due to uncaught exception 'NSGenericException', reason: 'UISearchDisplayController is no longer supported when linking against this version of iOS. Please migrate your application to UISearchController.'
Successfully Runs locally, but crashed on testFlight app.
Fix:
I found UISearchDisplayController which stuck in one of the storyboard and wasn't used anymore. Search for the searchDisplayController directly into sourcecode of the storyboard and just removed it.
I know this is kind of a dupe, but I don't have enough reputation yet to comment on the original post and, while I don't have an answer, I do have more useful information (a concrete example). Moderators, feel free to move this to the proper location.
When compiling my code using the latest XCode 8 beta 6 (iOS 10 SDK), I get an exception "Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIDeviceRGBColor countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x600000071340'"
This happens during the call:
auto viewController = [[[UIViewController alloc] initWithNibName:#"ViewController" bundle:nil] autorelease];
I have isolated the problem by whittling down my project to the bare minimum that will compile and still exhibit the problem. You can download it here:
Example project
Note that I took out lots of code, nearly all classes are gone, which results in a lot of warnings (not errors) for nonexistent classes referenced from the xib. But that doesn't matter, the code still compiles and runs just fine with the iOS 9 SDK. After compiling with the iOS 10 sdk, however, it crashes both in the simulator and on devices running iOS 9.
You can work around the problem by changing "#if 0" into "#if 1" in the file "HackForUnrecognizedSelectorInIOS10.m". This adds a category defining the missing selectors for UIColor. But obviously you can't add that to shipping code, it's just a temporary stopgap measure to continue developing.
I filed a bug report (28153870). But if anyone has any more information on how to avoid this problem without ugly hacks, any information is welcome.
Thanks
Michel Colman
When I try to compile and run my project with the same configuration (XCode 8 beta 6, iOS 10 SDK), I encountered a similar issue, except that my error message was:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIDeviceRGBColor length]: unrecognized selector sent to instance 0x600000479280'
And I noticed that this issue only occurs when the view is init by using interface files, i.e. Xib and Nib. I solved this issue by:
Open your interface file, in the right panel, navigate to the File Inspector tab.
Change the attribute highlighted to "iOS 7.0 and Later" (or whatever iOS version later)
Then compile and run your project again, this should fix your issue, though I am not sure about the reason behind this. I tried the same with your sample project and it solves the issue too.
In my case, I needed to change the project deployment target to 8.0 in the product general settings. Thanks to the hint from the accepted answer!
I'm attempting to upload my first app to the appstore. It's built with ionic. Repo is here: https://github.com/irthos/rogo-app and is live here: https://irthos.github.io/rogo-app/
The email from apple said they tried it on a iPhone 4s:
May 17, 2015 at 4:06 PM From Apple
2.1 - Apps that crash will be rejected
2.1 Details
We were unable to review your app, as it crashed on launch on the
following device(s):
iPhone 5S running iOS 8.3
We have attached detailed crash logs to help troubleshoot this issue.
Finally, here's the ips log from Apple: http://a1837.phobos.apple.com/us/r30/Purple7/v4/30/c5/04/30c50456-c2c0-1148-8d60-f36fbb11ae26/temp..jwnucdaf.ips?downloadKey3=1432258092_57a71add8c408ca7ec7a907881e7a613
Thanks for any insight to this. I'll also post an issue on ionic's repo in case it's a bug.
Well, the crucial line is:
setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.'
Typically I would see this on a ViewController in a Storyboard where I changed the names of one of my IBOutlets in code but did not go and re-map the ViewController outlets on the storyboard.
Since I don't know what "ionic" is, I have no idea whether you are even using storyboards (or XIB's) or what tools you use but I would look at something UI related.
Just a guess though.
I've been making a today extension that downloads articles from a feed and display the latest ones.
The whole thing worked fine on iOS 8, still worked on iOS 8.1, then came iOS 8.1.2 and we started having complaints about the today extension not working anymore.
I tried debugging on iOS 8.1.2 devices, and before the extension even launch, it crashes with this error :
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot be nil (key: <__NSConcreteUUID 0x174027280> 5AFB07AB-5DCD-46FE-8D07-44DE0F3789F2)'
I have read this post about frequent bugs happening when developing a today extension : http://www.atomicbird.com/blog/ios-app-extension-tip
In his post, Tom Harrington says :
In iOS 8 (and other recent versions), enabling modules in Xcode's build settings means you don't need to explicitly list all the frameworks you want to use. They'll be found automatically.
But this isn't the case with NotificationCenter.framework, which Today extensions use. If you remove that from the build settings, you won't get any build warnings or errors. But when you try to load the extension, you'll get an exception from libextension.dylib and your extension won't load. The exception message is not enlightening:
2014-08-16 12:06:53.793 TodayTestExtension[41313:6111763] * Terminating
app due to uncaught exception 'NSInvalidArgumentException', reason: '*
setObjectForKey: object cannot be nil (key: <__NSConcreteUUID
0x7fd729422390> ED3B42F8-66CD-4CB0-BCD5-F3DBA6F34DB5)'
If you're doing a today extension, just leave that framework in the build settings. It shouldn't need to be there, but it does.
My extension does include NotificationCenter.framework in its build settings, but I suspect my problem might be similar in some way.
Anyone faced a similar problem? Any idea how to solve it?
This error also occurs if you use NSExtensionPrincipalClass inside "Info.plist" in order to define a base class (instead of using a storyboard) with the name of a ViewController which does not exist.
When using Swift, make sure to prefix the class with the module name (usually the name of the target) like "Module.MyViewController".
Eventually I tried to remove NotificationCenter.framework from my target and put it back, cleaned the project, and it's now working again. I guess the framework wasn't properly linked after all, though I could see it on my target with xcode. Also, I can't figure out why it did work, then stopped working with the arrival of 8.1.2.
I fixed this issue by adding the #objc attribute to the Swift class.
#objc(NotificationViewController)
class NotificationViewController: UIViewController, UNNotificationContentExtension {
...
}
Just experienced the same issue. For me, it was "Main Interface" property in "General settings" of the Keyboard target. It was blank, and i set it to my storyboard file and now it works like a charm.
My iOS app is crashing immediately without any debug info. I have a break point all objective-c exceptions.
Crashing on this line
return UIApplicationMain(argc, argv, nil, NSStringFromClass([STAppDelegate class]));
App was running fine for the past month and nothing was changed.
I cleaned are re-ran.
What is weird is it is crashing every other time I run so run once its good stop it and run again crashed .... repeat rinse same result... every other time.
I am getting closer after installing 4.6.2. Now it crashes everytime and I get this error."erminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named UIStoryboardUnwindSegueTemplate'"
This is an altogether different story, it looks like a problem similar to use autolayout on iOS version lower than 6.x...
You cannot use storyboard with iOS 5.x as deployment target.
Getting back to your original problem, Xcode 4.6.2 app crashes on every second run, it gets solved either updating to the latest XCode 4.6.3 or using GDB instead of LLDB. I suggest, however, to update to the latest version and hence use LLDB - by the way, it looks like the next XCode 5 will support exclusively LLDB.