I'm using the 3.1.2 version of the SDK.
I have an app wherein I created a UITableViewCell in IB to display two lines of text per cell. When I run the app in the iPhone simulator, everything works exactly as expected; however, when I run the exact same code on my phone, the app crashes with the following error in the console:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:'
My iPhone has the 2.2.1 OS and I'm using the 2.2.1 version of the simulator. Also, the code works correctly on my other iPhone running the 3.0 OS when I'm using the latest SDK (3.1.3 beta 2).
My assumption, maybe incorrect, is that the code must be fundamentally correct and there is some nuance with the 2.2.1 OS.
Does this make sense? Has anyone run into this before?
Try to run the app on debug mode on device then check if it works. Because I am also facing this problem and this problem does not occur when running in debug mode.
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.
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.
I have an iOS app that runs fine on the simulator, but crashes on all devices with this error:
<Warning>: *** Assertion failure in -[UINib initWithNibName:directory:bundle:], /SourceCache/UIKit/UIKit-3318.16.14/UINib.m:98
Apr 13 23:24:52 Feifan-Zhous-iPad splashboardd[14537]
<Error>: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: (name != nil) && ([name length] > 0)'
The app is in Swift, running on Xcode 6.1.1. The device here is an iPad Mini 4,4 running iOS 8.1 (but the crash happens on all devices including iPhones, ranging from iOS 7.0 upwards).
Notable is the crash happens before the app launches (application:didFinishLaunchingWithOptions: never gets called) and an exception breakpoint in Xcode doesn't catch anything.
The app uses a Main.storyboard file as the Main Interface file. It is not red in the Copy Bundle Resources phase. The app isn't using initWithNibName:directory:bundle anywhere.
Has anyone run into this error and found a fix? Very little to work on
I have an iOS app that runs fine on the simulator, but crashes on all devices
It looks like it must be something with capitalization of a file name. I suppose that you have installed case insensitive file system on your mac so a simulator treats name "File" as "file" (and even "FILE") while iOS devices has case sensitive file systems so file names are case sensitive.
I suppose that you've set incorrectly class name for your initial view controller and it cannot be instantiated.
You are probably initializing a nib name in initWithNibName:directory:bundle which isn't ever being called.
Move the your initialization code from initWithNibName:directory:bundle to awakeFromNib.
I had the same issue, check in the rootViewController/InitialView if you are registering a nib file with a wrong file/reference name. Had that when I registered UICollectionViewCells in viewDidLoad while making a network call, didn't show where the crash was.
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.
I made a magazine iPad app so you can scroll through different slides to the left, right, down and up. It's all ready and accepted by the iTunes app store. Problem is, if someone downloads the app it closes directly after 1 seconds of loading.
Weird part is that i installed the app trough xCode and all works without any problems. My guess is that the app takes too much memory. I made a screenshot of the memory instrument:
But how can i release a Srollview if it must be loaded all the time?
Hope someone could push me in the right direction!
I have tested your app on my iPad2 with iOS 5.1.1, and it crash with the following message:
OxygenEvents[97151] <Error>: *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint'
*** First throw call stack:
(0x375c388f 0x31638259 0x375c3789 0x375c37ab 0x309de54d 0x309de6bb 0x309de423 0x3096f001 0x308dd3c7 0x307bac59 0x30730c17 0x10d5d5 0x30730c8b 0x109beb 0x30730c8b 0x3072f461 0x30721e87 0x307927d5 0x10960b 0x3072fcab 0x307297dd 0x306f7ac3 0x306f7567 0x306f6f3b 0x3771322b 0x37597523 0x375974c5 0x37596313 0x375194a5 0x3751936d 0x3072886b 0x30725cd5 0x10944f 0xf0050)
It is because you use "Autolayout" in your Interface Builder files (nib / xib files), which is an iOS 6.0 only feature.
To solve this, either disable Autolayout in all your xib files like this:
or simply make your app iOS 6.0 only by setting deployment target as iOS 6.0