NSInvalidArgumentException: "Invalid Region" in MapKit app - iphone

I'm trying to set all latitudes and longitudes as coming from local database in google map with dropping annotations at there.The required values of lat and long come after clicking a button and on the next screen,there is another button which on clicking produce the same result.Luckily, I'm able to refresh the map with new annotations, but as I'm trying to go back the ipad app on device get crash with following crash message:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid Region '
* First throw call stack:
(0x382178bf 0x37d631e5 0x382175f5 0x3365539b 0x6b26b 0x6e6a7 0x64c81 0x63753 0x6a84d 0x38171435 0x31cda9eb 0x31cda9a7 0x31cda985 0x31cda6f5 0x31cdb02d 0x31cd950f 0x31cd8f01 0x31cbf4ed 0x31cbed2d 0x37f45df3 0x381eb553 0x381eb4f5 0x381ea343 0x3816d4dd 0x3816d3a5 0x37f44fcd 0x31ced743 0x355b 0x2fa4)
But, working well on simulator.

I believe you are using XCode 4, which has a known problem with not showing the crashlog stack properly. Please see this answer to enable showing the stack trace when you get an exception and then please resubmit the crash again. It may not be possible to help you with this issue without a proper exception stack.

Related

signal SIGABRT Error when trying to run xcode 5.0 app

Sorry to ask, I have tried everything I have read online, but I keep getting the SIGABRT Error when I try to run an app.
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char *argv[])
{
#autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
Error code comes up beside the return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
line.
The debugger just states
2013-10-18 10:29:45.270 Black History Month[733:c07] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x903f770> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.'
*** First throw call stack:
(0x14a3052 0xea3d0a 0x14a2f11 0x9b3032 0x924f7b 0x924eeb 0x93fd60 0x23291a 0x14a4e1a 0x140e821 0x23146e 0x233010 0x1314a 0x13461 0x127c0 0x21743 0x221f8 0x15aa9 0x138dfa9 0x14771c5 0x13dc022 0x13da90a 0x13d9db4 0x13d9ccb 0x122a7 0x13a9b 0x2712 0x2685)
terminate called throwing an exception
I have tried producing a couple different apps and always get this error so cannot release, I have now tried a simple uiwebview app and the same thing keeps happening. I have tried running on many different deployement targets with no successful outcomes.
I have tried resetting the simulator, restarting both xcode the simulator, and computer multiple times, turned off auto layout for the xib file. No luck. Any ideas?
Thanks in advance
This has nothing to do with Xcode. Your application has thrown a run time exception. Since the exception is not caught anywhere it is poped upto main. Set an exception to All Breakpoint to figure out whats wrong. If your app worked in Xcode 4 then check the iOS deployment target. I suspect it has to do with iOS 7 which is default target in Xcode 5.
I also had this error. After spending so much time, I found how to fix it. First of all go the console and see where is the error (mine was related to storyboards and its code) The way I fixed my error was by going in story board. Below the iPhone screen, there will be small yellow button. Right click on it and you will see that is causing error. Delete(x) it if there is yellow error sign.
If this does not fix your error then try to make new project and then replace its blank files with old files of your old project. I had same error in very beginning and by doing this program run without any error.
Other people suggests by restarting your laptop and running it again, reseting the iOS simulator, or changing iOS debugger (however this does not work in latest x code since there is only one debugger)
Hope this helps
From the error message
[<UIApplication 0x903f770> setValue:forUndefinedKey:]: this class is
not key value coding-compliant for the key view.
one can see that you try to set the view property on an instance of UIApplication,
but UIApplication does not have a view property.
To find the point where the error occurs, set a breakpoint on
"All Objective-C Exceptions".
I also had this error. After spending so much time, I found how to fix it. First >of all go the console and see where is the error (mine was related to storyboards >and its code) The way I fixed my error was by going in story board. Below the >iPhone screen, there will be small yellow button. Right click on it and you will >see that is causing error. Delete(x) it if there is yellow error sign.
I would +1 Viraj's answer, but I don't have the reputation. I can verify that in a Swift project in X-Code 6, this solution works. My problem was:
My app ran great on the initial view controller and on the 2nd screen, but upon trying to load the third view controller, my app would crash and return the "SIGABRT" error.
The Fix was indeed to go to the screen where my app was crashing, right click on the yellow icon (which is ABOVE the view in my version of X Code). I had two IB Outlets assigned to views, which did not have connections to the code. I did not need them too (they were old), so I deleted both from within the Outlets inspector in the right sided attributes inspector.

iPhone exception handling crash my app

I am new on ios and i am following a tutorial to develop a calculator.
When i build my project it succeds, but on run time it crashes and throwa an exception:
`2012-09-19 10:03:51.469 AhsanCalculator[325:f803] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<ViewController 0x6d59870> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key pushOperand.'
*** First throw call stack:
My code is here if you need more detail. Tell me what you need and i will give you all the details.
Xcode = 4.3.3
5.1 iPhone simulator
Please help to solve this issue
The crash occurred for you is because, in your xib you have linked/connected some wrong objects, i mean a UITextField to a UITextView or some thing like that.
When you open Xib right clicking on the files owner object, it shows some of the IBOutlets connected with a warning icon, delete those and connect to the right/correct one.
This will clear your crash, and works fine.
As you are new to iOS development, here are some link to learn about what to when a crash appears in the project,
Its is by Raywenderlich, here it is a 2 part tutorial part 1 and part 2.

Error from CALayerArray in tableView

I've got an app that has been out for sometime, but we are seeing some issues now when running on iOS 5.0 & up. The crash happens when a user selects a cell in a tableview. The tableview is toggling a checkmark on or off so that the end user can select items from a list to refine a query. Everything worked great from version 3 & 4, but then it just broke when iOS 5 came out.
This is actually an app that I inherited from another developer when I took this job, so there is no telling how deep this problem runs. I did find that if I changed the way he was displaying the checkmark that it fix the problem, but then the checkmark would disappear as soon as I scrolled it off screen in the view.
The console is showing the following error. Any advice would be most appreciated.
-[CALayerArray row]: unrecognized selector sent to instance 0x796db410
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CALayerArray row]: unrecognized selector sent to instance 0x796db410'
This looks like a typical case of an overreleased object. To debug this kind of problem you could use the allocations instrument with the NSZombie detection enabled.

iOS how to debug crashes without a stack trace like : [__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array?

I'm trying to dismiss a modal view controller and am getting the following error:
* Terminating app due to uncaught exception 'NSRangeException', reason: '* -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'
At one point I spent 4 hours trying to debug such error. Can anyone tell me if there's a way to look at stack traces for such errors to understand which object caused the incorrect access?
Thank you!
if you are running in the debugger, then absolutely you should be able to see the actual line that the exception is being thrown on.
add an exception breakpoint by clicking the breakpoints tab at the top of the left pane, then click the plus sign at the lower left. Add an exception breakpoint.
In Xcode 4 you can set an exception breakpoint in the breakpoint editor. Every time an exception is thrown (or caught depending on how you set it up), your application will pause on the line that threw the exception.

Universal application error

I'm trying to realize an universal application (for iPhone/iPad), and I'd like to use the same UIViewController to set up the behaviour for both of the devices.
I got a surprising error at launch time, which is :
2010-07-15 11:31:03.420 AppUniverselle[2761:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x7000670> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key myLabel.'
2010-07-15 11:31:03.421 AppUniverselle[2761:207] Stack: (
29291611,
2421585161,
...
2727445,
2764719,
8884,
8738
)
I can't figure out where I failed. Furthermore, to avoid any typo problem, I restarted the project, but it ends on the same error.
The main surprising point is that the application works fine on the iPad simulator, but not on the iPhone one. Perhap's there is a problem with the iPhone simulator ?
Does someone know the answer of this question or ever heard about that kind of problem ?
It looks like you have an outlet called myLabel in your NIB file, but there's no such outlet in your view controller instance.