I do not understand why I get this error:
On logout I call this:
-(void)logoutUser {
NSLog(#"Logging out user");
NSString *appDomain = [[NSBundle mainBundle] bundleIdentifier];
[[NSUserDefaults standardUserDefaults] removePersistentDomainForName:appDomain];
}
And before loading the HomeCollectionViewController I call this to check if NSUserDefaults exist in the Navigation controller wrapping it:
-(void)viewDidAppear:(BOOL)animated {
// Get the stored data before the view loads
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
//if values exist then already logged in else take to login screen
if([[[defaults dictionaryRepresentation] allKeys] containsObject:#"userId"]){
NSLog(#"userId found");
} else {
NSLog(#"userId NOT found");
StarterViewController *hc=[[UIStoryboard storyboardWithName:#"Main" bundle:nil] instantiateViewControllerWithIdentifier:#"Starter"];
[self presentViewController:hc animated:YES completion:nil];
}
}
This is the error:
2014-04-28 10:19:38.431 App[2675:60b] Warning: Attempt to present <HomeCollectionViewController: 0xba9dd10> on <SlidingMenuViewController: 0xba94200> whose view is not in the window hierarchy!
2014-04-28 10:19:38.443 App[2675:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** +[NSJSONSerialization dataWithJSONObject:options:error:]: value parameter is nil'
*** First throw call stack:
(
0 CoreFoundation 0x01dff1e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x01b7e8e5 objc_exception_throw + 44
2 CoreFoundation 0x01dfefbb +[NSException raise:format:] + 139
3 Foundation 0x018c4a42 +[NSJSONSerialization dataWithJSONObject:options:error:] + 92
4 Stand 0x00008769 -[HomeCollectionViewController getHomeData] + 297
5 Stand 0x000084a8 -[HomeCollectionViewController viewDidLoad] + 744
6 UIKit 0x0095d33d -[UIViewController loadViewIfRequired] + 696
7 UIKit 0x0095d5d9 -[UIViewController view] + 35
8 UIKit 0x00988509 -[UINavigationController rotatingSnapshotViewForWindow:] + 52
9 UIKit 0x00ccfe3c -[UIClientRotationContext initWithClient:toOrientation:duration:andWindow:] + 420
10 UIKit 0x00884c22 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 1495
11 UIKit 0x00884646 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 82
12 UIKit 0x00884518 -[UIWindow _setRotatableViewOrientation:updateStatusBar:duration:force:] + 117
13 UIKit 0x008845a0 -[UIWindow _setRotatableViewOrientation:duration:force:] + 67
14 UIKit 0x0088363a __57-[UIWindow _updateToInterfaceOrientation:duration:force:]_block_invoke + 120
15 UIKit 0x0088359c -[UIWindow _updateToInterfaceOrientation:duration:force:] + 400
16 UIKit 0x008842f3 -[UIWindow setAutorotates:forceUpdateInterfaceOrientation:] + 870
17 UIKit 0x008878e6 -[UIWindow setDelegate:] + 449
18 UIKit 0x00961b77 -[UIViewController _tryBecomeRootViewControllerInWindow:] + 180
19 UIKit 0x0087d474 -[UIWindow addRootViewControllerViewIfPossible] + 591
20 UIKit 0x0087d5ef -[UIWindow _setHidden:forced:] + 312
21 UIKit 0x0087d86b -[UIWindow _orderFrontWithoutMakingKey] + 49
22 UIKit 0x008883c8 -[UIWindow makeKeyAndVisible] + 65
23 UIKit 0x00838bc0 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 2097
24 UIKit 0x0083d667 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
25 UIKit 0x00851f92 -[UIApplication handleEvent:withNewEvent:] + 3517
26 UIKit 0x00852555 -[UIApplication sendEvent:] + 85
27 UIKit 0x0083f250 _UIApplicationHandleEvent + 683
28 GraphicsServices 0x03bbff02 _PurpleEventCallback + 776
29 GraphicsServices 0x03bbfa0d PurpleEventCallback + 46
30 CoreFoundation 0x01d7aca5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
31 CoreFoundation 0x01d7a9db __CFRunLoopDoSource1 + 523
32 CoreFoundation 0x01da568c __CFRunLoopRun + 2156
33 CoreFoundation 0x01da49d3 CFRunLoopRunSpecific + 467
34 CoreFoundation 0x01da47eb CFRunLoopRunInMode + 123
35 UIKit 0x0083cd9c -[UIApplication _run] + 840
36 UIKit 0x0083ef9b UIApplicationMain + 1225
37 Stand 0x0000948d main + 141
38 libdyld.dylib 0x0254b701 start + 1
39 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I think you have made an incorrect assumption as to the cause of the problem. Your HomeCollectionViewController is being loaded, so your user defaults isn't the problem. You can see from the stack trace that this view controller is calling a method getHomeData in its viewDidLoad method. It seems that getHomeData is attempting to retrieve some JSON data but the JSON string is nil - as per the exception message.
You need to investigate this method and work out what is going wrong with your JSON.
Related
My app is crashing upon running it with the following debug:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'NSConcreteMutableAttributedString initWithString:attributes:: nil value'
*** First throw call stack:
(
0 CoreFoundation 0x0000000102a83495 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x00000001027e299e objc_exception_throw + 43
2 CoreFoundation 0x0000000102a832ad +[NSException raise:format:] + 205
3 Foundation 0x00000001023d993e -[NSConcreteMutableAttributedString initWithString:attributes:] + 129
4 myApp 0x0000000100006da5 -[WelcomeViewController viewDidLoad] + 373
5 UIKit 0x000000010148559e -[UIViewController loadViewIfRequired] + 562
6 UIKit 0x0000000101485777 -[UIViewController view] + 29
7 UIKit 0x00000001017902e2 -[UIClientRotationContext initWithClient:toOrientation:duration:andWindow:] + 390
8 UIKit 0x00000001013cbffa -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 1109
9 UIKit 0x00000001013cbb9f -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 36
10 UIKit 0x00000001013cbaef -[UIWindow _setRotatableViewOrientation:updateStatusBar:duration:force:] + 101
11 UIKit 0x00000001013cadfe -[UIWindow _updateToInterfaceOrientation:duration:force:] + 377
12 UIKit 0x000000010148970a -[UIViewController _tryBecomeRootViewControllerInWindow:] + 147
13 UIKit 0x00000001013c5b1b -[UIWindow addRootViewControllerViewIfPossible] + 490
14 UIKit 0x00000001013c5c70 -[UIWindow _setHidden:forced:] + 282
15 UIKit 0x00000001013ceffa -[UIWindow makeKeyAndVisible] + 51
16 UIKit 0x000000010138ac98 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1788
17 UIKit 0x000000010138ea0c -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 660
18 UIKit 0x000000010139fd4c -[UIApplication handleEvent:withNewEvent:] + 3189
19 UIKit 0x00000001013a0216 -[UIApplication sendEvent:] + 79
20 UIKit 0x0000000101390086 _UIApplicationHandleEvent + 578
21 GraphicsServices 0x00000001047dd71a _PurpleEventCallback + 762
22 GraphicsServices 0x00000001047dd1e1 PurpleEventCallback + 35
23 CoreFoundation 0x0000000102a05679 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
24 CoreFoundation 0x0000000102a0544e __CFRunLoopDoSource1 + 478
25 CoreFoundation 0x0000000102a2e903 __CFRunLoopRun + 1939
26 CoreFoundation 0x0000000102a2dd83 CFRunLoopRunSpecific + 467
27 UIKit 0x000000010138e2e1 -[UIApplication _run] + 609
28 UIKit 0x000000010138fe33 UIApplicationMain + 1010
29 myApp 0x0000000100006b03 main + 115
30 libdyld.dylib 0x00000001033c25fd start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
The problem is that I know for a fact I never used NSConcreteMutableAttributedString I have checked and double checked my code to see if maybe I am missing something but I keep coming up blank, any ideas as to what can be done to fix this problem?
Update
I added an exception breakpoint which told me that the following line was causing my app to crash:
NSMutableAttributedString *thirdGreetingAttr = [[NSMutableAttributedString alloc] initWithString:thirdGreeting attributes:secondGreetingAttrs19];
self.welcomeUserLabel.attributedText = thirdGreetingAttr;
"Ok, odd" I think to myself, this was working just fine 2 weeks ago when I last touched this project, This is the complete code block:
NSDictionary *secondGreetingAttrs19 = [NSDictionary dictionaryWithObjectsAndKeys:fitnestFontBold, NSFontAttributeName, nil];
NSString *thirdGreeting = currentUser.username;
NSMutableAttributedString *thirdGreetingAttr = [[NSMutableAttributedString alloc] initWithString:thirdGreeting attributes:secondGreetingAttrs19];
self.welcomeUserLabel.attributedText = thirdGreetingAttr;
So I go ahead and comment out the 2 lines that are causing the issue, and the app runs just fine. I un-comment the lines back to how it was originally and to my surprise build runs JUST FINE :/ what??? Anyone know what could have happened here?
UPDATE
As the chosen answer says, I realized that this error was happening because my username property was returning a null value.
make sure your thirdGreeting(NSString *thirdGreeting = currentUser.username; ) is not nil value.
I think the thireGreeting is nil, you should change to
NSString *thirdGreeting = (currentUser.username.length>0) ? currentUser.username.length : #"";
I have some beginner trouble using xCode. Each time the app crash I find it hard to find the problem as I don't understand the log currently I seem to have a problem with a Array. I think it is a Array of which I deleted the class where it was in.
I would like to know how I should read this log :
2014-05-02 10:49:32.808 myCompany[2793:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
*** First throw call stack:
(
0 CoreFoundation 0x017f21e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x015718e5 objc_exception_throw + 44
2 CoreFoundation 0x017a4abc -[__NSArrayM insertObject:atIndex:] + 844
3 CoreFoundation 0x017a4760 -[__NSArrayM addObject:] + 64
4 UIKit 0x00794a4b PushNextClassForSettingIMP + 383
5 UIKit 0x00794838 __workaround10030904InvokeWithTarget_block_invoke + 29
6 UIKit 0x00284413 +[UIView _performCustomizableAppearanceModifications:] + 26
7 UIKit 0x00794810 workaround10030904InvokeWithTarget + 940
8 UIKit 0x0078ee71 +[_UIAppearance _applyInvocationsTo:window:matchingSelector:] + 3779
9 UIKit 0x0078f633 +[_UIAppearance _applyInvocationsTo:window:] + 55
10 UIKit 0x0029b5a3 -[UIView(Internal) _applyAppearanceInvocations] + 270
11 UIKit 0x0029c002 __88-[UIView(Internal) _performUpdatesForPossibleChangesOfIdiom:orScreen:traverseHierarchy:]_block_invoke + 65
12 UIKit 0x0029bf8f -[UIView(Internal) _performUpdatesForPossibleChangesOfIdiom:orScreen:traverseHierarchy:] + 204
13 UIKit 0x0029bebe -[UIView(Internal) _didChangeFromIdiom:onScreen:traverseHierarchy:] + 52
14 UIKit 0x003f44b7 -[UILabel(_UIAccessibilityButtonShapesSupportInternal) _didChangeFromIdiom:onScreen:traverseHierarchy:] + 73
15 UIKit 0x004ed776 -[UITabBarButtonLabel _didChangeFromIdiom:onScreen:traverseHierarchy:] + 73
16 UIKit 0x0029be82 -[UIView(Internal) _didChangeFromIdiomOnScreen:traverseHierarchy:] + 172
17 UIKit 0x0029b466 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1624
18 UIKit 0x0029b109 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 763
19 UIKit 0x00334458 -[UIControl _didMoveFromWindow:toWindow:] + 65
20 UIKit 0x0029b109 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 763
21 UIKit 0x004fad59 -[UITabBar(UITabBarPrivate) _didMoveFromWindow:toWindow:] + 65
22 UIKit 0x0029b109 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 763
23 UIKit 0x0029296f __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 158
24 UIKit 0x002927fb -[UIView(Hierarchy) _postMovedFromSuperview:] + 260
25 UIKit 0x0029ddd4 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1875
26 UIKit 0x00290dba -[UIView(Hierarchy) addSubview:] + 56
27 UIKit 0x00270406 -[UIWindow addRootViewControllerViewIfPossible] + 481
28 UIKit 0x002705ef -[UIWindow _setHidden:forced:] + 312
29 UIKit 0x0027086b -[UIWindow _orderFrontWithoutMakingKey] + 49
30 UIKit 0x0027b3c8 -[UIWindow makeKeyAndVisible] + 65
31 UIKit 0x0022bbc0 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 2097
32 UIKit 0x00230667 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
33 UIKit 0x00244f92 -[UIApplication handleEvent:withNewEvent:] + 3517
34 UIKit 0x00245555 -[UIApplication sendEvent:] + 85
35 UIKit 0x00232250 _UIApplicationHandleEvent + 683
36 GraphicsServices 0x037e7f02 _PurpleEventCallback + 776
37 GraphicsServices 0x037e7a0d PurpleEventCallback + 46
38 CoreFoundation 0x0176dca5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
39 CoreFoundation 0x0176d9db __CFRunLoopDoSource1 + 523
40 CoreFoundation 0x0179868c __CFRunLoopRun + 2156
41 CoreFoundation 0x017979d3 CFRunLoopRunSpecific + 467
42 CoreFoundation 0x017977eb CFRunLoopRunInMode + 123
43 UIKit 0x0022fd9c -[UIApplication _run] + 840
44 UIKit 0x00231f9b UIApplicationMain + 1225
45 myCompany 0x000043fd main + 141
46 libdyld.dylib 0x01e39701 start + 1
)
EDIT :
this caused the problem :
UIImage *tabBackground = [[UIImage imageNamed:#"image.PNG"]
resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
[[UITabBarItem appearance] setImage:tabBackground];
Still I don't understand why it can't just display the line of error like android. I found this by comment lining
I think you must follow up this tutorial, clearly mentioning about this
http://www.raywenderlich.com/10209/my-app-crashed-now-what-part-1
According to your log details,
You are trying to create array with nil objects.
Trying to insert nil object to array
both above will crash the app.
Enable zombies
Product->Edit Scheme->Diagnostics-> Click Enable Zombie Objects
You forgot to add nil at last index in array creation.
like this
NSArray *array = [NSArray arrayWithObjects:#"1",#"2"];
But it should be
NSArray *array = [NSArray arrayWithObjects:#"1",#"2",nil];
But If you are using NSMutableArray and add objects,then u should valid to nil condition like below.
if (myObjectToBeAddedToArray!=nil) {
[arrayMutable addObject:myObjectToBeAddedToArray];
}
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
I'm new to IOS programming. Today i tried implementing UITabBarController, but decided to remove it. Ever since that my app crashes. I'm sure that i've removed the right part of the app delegate since i used ctrl + z. I cant really seem to find out where the app is crashing and why?
Sourcecode:
http://www.codeviewer.org/view/code:3cc0
debugging:
2014-02-24 21:00:26.628 app[1307:70b] -[__NSArrayM objectForKeyedSubscript:]: unrecognized selector sent to instance 0xca716d0
2014-02-24 21:00:26.631 app[1307:70b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayM objectForKeyedSubscript:]: unrecognized selector sent to instance 0xca716d0'
*** First throw call stack:
(
0 CoreFoundation 0x02b235e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x028a68b6 objc_exception_throw + 44
2 CoreFoundation 0x02bc0903 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x02b1390b ___forwarding___ + 1019
4 CoreFoundation 0x02b134ee _CF_forwarding_prep_0 + 14
5 app 0x000627e9 -[MenuViewController viewDidLoad] + 16057
6 UIKit 0x01728318 -[UIViewController loadViewIfRequired] + 696
7 UIKit 0x017285b4 -[UIViewController view] + 35
8 UIKit 0x01752ca9 -[UINavigationController rotatingSnapshotViewForWindow:] + 52
9 UIKit 0x01a7ca60 -[UIClientRotationContext initWithClient:toOrientation:duration:andWindow:] + 420
10 UIKit 0x016582f2 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 1495
11 UIKit 0x01657d16 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 82
12 UIKit 0x01657be8 -[UIWindow _setRotatableViewOrientation:updateStatusBar:duration:force:] + 117
13 UIKit 0x01657c70 -[UIWindow _setRotatableViewOrientation:duration:force:] + 67
14 UIKit 0x01656d0a __57-[UIWindow _updateToInterfaceOrientation:duration:force:]_block_invoke + 120
15 UIKit 0x01656c6c -[UIWindow _updateToInterfaceOrientation:duration:force:] + 400
16 UIKit 0x016579c3 -[UIWindow setAutorotates:forceUpdateInterfaceOrientation:] + 870
17 UIKit 0x0165afb6 -[UIWindow setDelegate:] + 449
18 UIKit 0x0172c737 -[UIViewController _tryBecomeRootViewControllerInWindow:] + 180
19 UIKit 0x01650c1c -[UIWindow addRootViewControllerViewIfPossible] + 609
20 UIKit 0x01650d97 -[UIWindow _setHidden:forced:] + 312
21 UIKit 0x0165102d -[UIWindow _orderFrontWithoutMakingKey] + 49
22 UIKit 0x0165b89a -[UIWindow makeKeyAndVisible] + 65
23 app 0x00012ecf -[AppDelegate application:didFinishLaunchingWithOptions:] + 1391
24 UIKit 0x0160e355 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 309
25 UIKit 0x0160eb95 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1536
26 UIKit 0x016133a8 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
27 UIKit 0x0162787c -[UIApplication handleEvent:withNewEvent:] + 3447
28 UIKit 0x01627de9 -[UIApplication sendEvent:] + 85
29 UIKit 0x01615025 _UIApplicationHandleEvent + 736
30 GraphicsServices 0x0448c2f6 _PurpleEventCallback + 776
31 GraphicsServices 0x0448be01 PurpleEventCallback + 46
32 CoreFoundation 0x02a9ed65 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
33 CoreFoundation 0x02a9ea9b __CFRunLoopDoSource1 + 523
34 CoreFoundation 0x02ac977c __CFRunLoopRun + 2156
35 CoreFoundation 0x02ac8ac3 CFRunLoopRunSpecific + 467
36 CoreFoundation 0x02ac88db CFRunLoopRunInMode + 123
37 UIKit 0x01612add -[UIApplication _run] + 840
38 UIKit 0x01614d3b UIApplicationMain + 1225
39 app 0x0008f4fd main + 141
40 libdyld.dylib 0x030c370d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Did you removed UITabBarController also from your .xib file in Interface Builder?
Did you removed UITabBarController also from your .xib file in Interface Builder?
Check if object - in your case NSDictionary is kind of it's class and key is not null. For example:
- (void)fetchedDataAlerta:(NSData *)responseData {
NSError* error;
NSLog(#"RESP register %#", responseData);
if(responseData ) { //here you have recieved valid info. Without it, next line will crash
NSDictionary* json = [NSJSONSerialization options:kNilOptions error:&error];
In your case
NSData* rawBody2 = [response2 rawBody];
//here check if NSData is not null, nil and is valid add line
if (rawBody2) {
results2 = [NSJSONSerialization JSONObjectWithData:rawBody2 options:NSJSONReadingMutableContainers error:nil];
I have a lot of textfields and what I am trying to make them do is dismiss when the return key is used. In order for this to work you need to set the delegate of each textfield to self, like this [textfield setDelegate: self];. I have over 50 textfields in my project and in order to make it so they all dismiss I have to copy that line of code for each textfield. In the example below I used a for loop to try to shrink this down, but my project crashes and gives me this error when I try. Can someone tell me what im doing wrong and how i can fix this?
//.h
#interface InsertScheduleCGPS : UIViewController <UITextFieldDelegate>{
NSArray *Dayh;
IBOutlet UITextField *Day11;
}
#property(nonatomic, assign) id<UITextFieldDelegate> delegate;
#property (nonatomic,strong) NSArray *Dayh;
.
//.m
- (void)viewDidLoad
{
[super viewDidLoad];
Dayh = [NSArray arrayWithObjects:#"Day11", nil];
NSLog(#"euf");
for(int i=0; i<[self.Dayh count]; i++) {
NSLog(#"dd%#",[self.Dayh objectAtIndex:i]);
[[self.Dayh objectAtIndex:i] setDelegate: self];
}
- (BOOL)textFieldShouldReturn:(UITextField *)Day11 {
[[self view] endEditing:YES];
return NO;
}
ERROR:
2014-01-18 19:15:26.712 Swepple[64912:70b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFConstantString setDelegate:]: unrecognized selector sent to instance 0x144ec'
*** First throw call stack:
(
0 CoreFoundation 0x0183b5e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x015be8b6 objc_exception_throw + 44
2 CoreFoundation 0x018d8903 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x0182b90b ___forwarding___ + 1019
4 CoreFoundation 0x0182b4ee _CF_forwarding_prep_0 + 14
5 Swepple 0x0000bbd6 -[InsertScheduleCGPS viewDidLoad] + 4262
6 UIKit 0x00440318 -[UIViewController loadViewIfRequired] + 696
7 UIKit 0x004405b4 -[UIViewController view] + 35
8 UIKit 0x0044f361 -[UIViewController viewControllerForRotation] + 63
9 UIKit 0x00446f00 -[UIViewController _visibleView] + 84
10 UIKit 0x006d511a -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:animation:] + 5199
11 UIKit 0x0044c0fc -[UIViewController presentViewController:withTransition:completion:] + 6433
12 UIKit 0x0044c61f -[UIViewController presentViewController:animated:completion:] + 130
13 UIKit 0x0044c65f -[UIViewController presentModalViewController:animated:] + 56
14 UIKit 0x00870e16 -[UIStoryboardModalSegue perform] + 271
15 UIKit 0x0086107e -[UIStoryboardSegueTemplate _perform:] + 174
16 UIKit 0x00442280 -[UIViewController performSegueWithIdentifier:sender:] + 72
17 Swepple 0x000052d4 -[SecondViewController insert:] + 244
18 libobjc.A.dylib 0x015d0874 -[NSObject performSelector:withObject:withObject:] + 77
19 UIKit 0x0032e0c2 -[UIApplication sendAction:to:from:forEvent:] + 108
20 UIKit 0x0032e04e -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
21 UIKit 0x004260c1 -[UIControl sendAction:to:forEvent:] + 66
22 UIKit 0x00426484 -[UIControl _sendActionsForEvents:withEvent:] + 577
23 UIKit 0x00425733 -[UIControl touchesEnded:withEvent:] + 641
24 UIKit 0x0036b51d -[UIWindow _sendTouchesForEvent:] + 852
25 UIKit 0x0036c184 -[UIWindow sendEvent:] + 1232
26 UIKit 0x0033fe86 -[UIApplication sendEvent:] + 242
27 UIKit 0x0032a18f _UIApplicationHandleEventQueue + 11421
28 CoreFoundation 0x017c483f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
29 CoreFoundation 0x017c41cb __CFRunLoopDoSources0 + 235
30 CoreFoundation 0x017e129e __CFRunLoopRun + 910
31 CoreFoundation 0x017e0ac3 CFRunLoopRunSpecific + 467
32 CoreFoundation 0x017e08db CFRunLoopRunInMode + 123
33 GraphicsServices 0x037e09e2 GSEventRunModal + 192
34 GraphicsServices 0x037e0809 GSEventRun + 104
35 UIKit 0x0032cd3b UIApplicationMain + 1225
36 Swepple 0x0000e04d main + 141
37 libdyld.dylib 0x01d7c70d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
You probably meant
Dayh = [NSArray arrayWithObjects:Day11, nil];
At present, Dayh is an array containing the string "Day11", not the text field.
I've developed an iPhone App that crashes ONLY when i launch it on 64-bit simulator (for iPhone 5S), i return this error:
2013-10-29 16:36:18.377 IlNostroComune[7630:70b] * Terminating app
due to uncaught exception 'NSInvalidArgumentException', reason:
'Receiver () has no segue with
identifier 'mostraSuggerimenti''
In 32bit structure everything works fine, the SEGUE exist on storyboard and his name is correct.
My app was rejected cause this problem, how can i solve?
MY DETAILED ERROR REPORT:
2013-10-29 16:36:18.377 IlNostroComune[7630:70b] * Terminating app
due to uncaught exception 'NSInvalidArgumentException', reason:
'Receiver () has no segue with
identifier 'mostraSuggerimenti''
* First throw call stack: ( 0 CoreFoundation 0x00000001021d4795 exceptionPreprocess + 165 1 libobjc.A.dylib
0x0000000101db3991 objc_exception_throw + 43 2 UIKit
0x0000000100f70345 -[UIViewController
shouldPerformSegueWithIdentifier:sender:] + 0 3 IlNostroComune
0x000000010006f722 -[HomeViewController viewDidLoad] + 242 4 UIKit
0x0000000100f6e524 -[UIViewController loadViewIfRequired] + 562 5
UIKit 0x0000000100f8ebcd
-[UINavigationController _layoutViewController:] + 44 6 UIKit 0x0000000100f8f0dd -[UINavigationController
_updateScrollViewFromViewController:toViewController:] + 216 7 UIKit 0x0000000100f8f1dd
-[UINavigationController _startTransition:fromViewController:toViewController:] + 83 8 UIKit 0x0000000100f8ff87 -[UINavigationController
_startDeferredTransitionIfNeeded:] + 547 9 UIKit 0x0000000100f90a38 -[UINavigationController __viewWillLayoutSubviews]
+ 43 10 UIKit 0x00000001010a4929 -[UILayoutContainerView layoutSubviews] + 202 11 UIKit 0x0000000100ede4c7 -[UIView(CALayerDelegate) layoutSublayersOfLayer:]
+ 354 12 QuartzCore 0x000000010336fe82 -[CALayer layoutSublayers] + 151 13 QuartzCore 0x00000001033649e9 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE +
363 14 QuartzCore 0x000000010336fdb6
-[CALayer layoutIfNeeded] + 162 15 UIKit 0x0000000100f7e502 -[UIViewController
window:setupWithInterfaceOrientation:] + 264 16 UIKit
0x0000000100ebd50d -[UIWindow
_setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:]
+ 4360 17 UIKit 0x0000000100ebc3ff -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 36 18 UIKit 0x0000000100ebc34f
-[UIWindow _setRotatableViewOrientation:updateStatusBar:duration:force:] + 101 19 UIKit 0x0000000100ebb65e -[UIWindow
_updateToInterfaceOrientation:duration:force:] + 377 20 UIKit 0x0000000100f7228a -[UIViewController
_tryBecomeRootViewControllerInWindow:] + 147 21 UIKit 0x0000000100eb6447 -[UIWindow addRootViewControllerViewIfPossible] +
506 22 UIKit 0x0000000100eb6595
-[UIWindow _setHidden:forced:] + 275 23 UIKit 0x0000000100ebf662 -[UIWindow makeKeyAndVisible] + 51 24 UIKit
0x0000000100e7dae8 -[UIApplication
_callInitializationDelegatesForURL:payload:suspended:] + 1449 25 UIKit 0x0000000100e81608 -[UIApplication
_runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 660 26 UIKit 0x0000000100e9246b -[UIApplication handleEvent:withNewEvent:] + 3092 27 UIKit 0x0000000100e928de -[UIApplication sendEvent:] + 79 28 UIKit
0x0000000100e82cde _UIApplicationHandleEvent + 618 29
GraphicsServices 0x0000000103ea4bba
_PurpleEventCallback + 762 30 GraphicsServices 0x0000000103ea4681 PurpleEventCallback + 35 31 CoreFoundation
0x00000001021567b9
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 41 32 CoreFoundation 0x000000010215658e
__CFRunLoopDoSource1 + 478 33 CoreFoundation 0x000000010217fa53 __CFRunLoopRun + 1939 34 CoreFoundation
0x000000010217eed3 CFRunLoopRunSpecific + 467 35 UIKit
0x0000000100e80edd -[UIApplication _run] + 609 36 UIKit
0x0000000100e82a63 UIApplicationMain + 1010 37 IlNostroComune
0x0000000100038163 main + 115 38 libdyld.dylib
0x0000000102b205fd start + 1 39 ???
0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with
uncaught exception of type NSException