App Crashes (Sometimes) when Home Button is Pressed - ios

I am really confused as to why this is happening.
Since this happened randomly
Here is the stacktrace, I have not been able to figure it out.
Please help
Thanks
2015-03-30 15:12:50.817 MarcoApp[1857:23629] -[NSIBPrototypingLayoutConstraint finishedLoading]: unrecognized selector sent to instance 0x7f929ccc8cf0
2015-03-30 15:12:50.908 MarcoApp[1857:23629] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSIBPrototypingLayoutConstraint finishedLoading]: unrecognized selector sent to instance 0x7f929ccc8cf0'
*** First throw call stack:
(
0 CoreFoundation 0x000000010aa74a75 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010a333bb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010aa7bd1d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x000000010a9d39dc ___forwarding___ + 988
4 CoreFoundation 0x000000010a9d3578 _CF_forwarding_prep_0 + 120
5 CoreFoundation 0x000000010aa447fc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
6 CoreFoundation 0x000000010a944204 _CFXNotificationPost + 2484
7 Foundation 0x0000000109e8ddf8 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
8 UIKit 0x000000010b73baa7 -[UIApplication _handleApplicationDectivationWithScene:shouldForceExit:transitionContext:completion:] + 1054
9 UIKit 0x000000010b748833 __88-[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:]_block_invoke + 87
10 UIKit 0x000000010b7487cd -[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:] + 349
11 UIKit 0x000000010b73345a -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:] + 486
12 FrontBoardServices 0x00000001115ae243 __31-[FBSSerialQueue performAsync:]_block_invoke + 16
13 CoreFoundation 0x000000010a9a9c7c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
14 CoreFoundation 0x000000010a99f9c5 __CFRunLoopDoBlocks + 341
15 CoreFoundation 0x000000010a99f785 __CFRunLoopRun + 2389
16 CoreFoundation 0x000000010a99ebc6 CFRunLoopRunSpecific + 470
17 GraphicsServices 0x000000010e89ca58 GSEventRunModal + 161
18 UIKit 0x000000010b735580 UIApplicationMain + 1282
19 MarcoApp 0x0000000109184afe top_level_code + 78
20 MarcoApp 0x0000000109184bda main + 42
21 libdyld.dylib 0x000000010ee2b145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

hard to tell without seeing your code but "unrecognized selector sent to instance" implies you have a method the requires a selector (name of a function) as a parameter and that methods got an invalid selector (the name of the function is wrong).

not sure but ther is any method in
- (void)applicationWillResignActive:(UIApplication *)application
which does not have selector thats why you app crash

Related

Unity Firebase Xcode Messaging. First game start error

Firebase Unity SDK v.3.0.3
Unity 5.4.2f2
Xcode 8.3
I create a iOS build. When first start the game, you receive the following error.
2017-06-05 15:51:32.503767+0700 tacticool[1549:942648] -[UIApplication messaging:didRefreshRegistrationToken:]: unrecognized selector sent to instance 0x14f79ce0
2017-06-05 15:51:32.589532+0700 tacticool[1549:942648] Uncaught exception: NSInvalidArgumentException: -[UIApplication messaging:didRefreshRegistrationToken:]: unrecognized selector sent to instance 0x14f79ce0
(
0 CoreFoundation 0x1c2c3b55 <redacted> + 152
1 libobjc.A.dylib 0x1b54b067 objc_exception_throw + 38
2 CoreFoundation 0x1c2c8fd1 <redacted> + 0
3 CoreFoundation 0x1c2c70c3 <redacted> + 696
4 CoreFoundation 0x1c1efdc8 _CF_forwarding_prep_0 + 24
5 tacticool 0x00a66b4b -[FIRMessaging defaultInstanceIDTokenWasRefreshed:] + 162
6 CoreFoundation 0x1c26fdb9 <redacted> + 10
7 CoreFoundation 0x1c26f6f9 <redacted> + 382
8 CoreFoundation 0x1c26f4e1 <redacted> + 40
9 CoreFoundation 0x1c2ca309 <redacted> + 1242
10 CoreFoundation 0x1c1d30f5 _CFXNotificationPost + 540
11 Foundation 0x1cb70bab <redacted> + 450
12 CoreFoundation 0x1c27f803 <redacted> + 20
13 CoreFoundation 0x1c27da55 <redacted> + 282
14 CoreFoundation 0x1c27df2d <redacted> + 1124
15 CoreFoundation 0x1c1d11af CFRunLoopRunSpecific + 470
16 CoreFoundation 0x1c1d0fd1 CFRunLoopRunInMode + 104
17 GraphicsServices 0x1d97bb41 GSEventRunModal + 80
18 UIKit 0x21552e13 UIApplicationMain + 150
19 tacticool 0x000f0b9b main + 202
20 libdyld.dylib 0x1b9be4eb <redacted> + 2
)
2017-06-05 15:51:32.591642+0700 tacticool[1549:942648] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIApplication messaging:didRefreshRegistrationToken:]: unrecognized selector sent to instance 0x14f79ce0'
*** First throw call stack:
(0x1c2c3b3d 0x1b54b067 0x1c2c8fd1 0x1c2c70c3 0x1c1efdc8 0xa66b4b 0x1c26fdb9 0x1c26f6f9 0x1c26f4e1 0x1c2ca309 0x1c1d30f5 0x1cb70bab 0x1c27f803 0x1c27da55 0x1c27df2d 0x1c1d11af 0x1c1d0fd1 0x1d97bb41 0x21552e13 0xf0b9b 0x1b9be4eb)
libc++abi.dylib: terminating with uncaught exception of type NSException
Do I miss something in XCode? Or have something to check in Unity?

IOS Swift, Google SignIn run time error at GIDSignIn.sharedInstance().clientID

I am trying to implement Google SignIn in my iOS project and getting runtime error at line:
GIDSignIn.sharedInstance().clientID = "mysecrectkey.apps.googleusercontent.com"
in AppDelegate. Error I am getting is something like below. I followed each step which is mentioned in following link and still no luck.
http://www.theappguruz.com/blog/integrate-google-signin-sdk-in-ios-application-using-swift
I tried adding -ObjC in Other Linker Flags section as well. Please help me to figure this out. Thanks
2016-10-09 17:16:57.754 GoogleLoginTest1[8996:611837] -[__NSDictionaryI gtm_httpArgumentsString]: unrecognized selector sent to instance 0x618000071a80
2016-10-09 17:16:57.758 GoogleLoginTest1[8996:611837] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryI gtm_httpArgumentsString]: unrecognized selector sent to instance 0x618000071a80'
*** First throw call stack:
(
0 CoreFoundation 0x000000010ce2234b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010c46621e objc_exception_throw + 48
2 CoreFoundation 0x000000010ce91f34 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x000000010cda7c15 ___forwarding___ + 1013
4 CoreFoundation 0x000000010cda7798 _CF_forwarding_prep_0 + 120
5 GoogleLoginTest1 0x000000010bb4272e -[GSDK_GTMSessionFetcherSessionDelegateDispatcher .cxx_destruct] + 11318
6 GoogleLoginTest1 0x000000010bb44551 -[GSDK_GTMSessionFetcherSessionDelegateDispatcher .cxx_destruct] + 19033
7 GoogleLoginTest1 0x000000010bb43fc4 -[GSDK_GTMSessionFetcherSessionDelegateDispatcher .cxx_destruct] + 17612
8 GoogleLoginTest1 0x000000010bb223ed _TFC16GoogleLoginTest111AppDelegate11applicationfTCSo13UIApplication29didFinishLaunchingWithOptionsGSqGVs10DictionaryVSC29UIApplicationLaunchOptionsKeyP____Sb + 685
9 GoogleLoginTest1 0x000000010bb22594 _TToFC16GoogleLoginTest111AppDelegate11applicationfTCSo13UIApplication29didFinishLaunchingWithOptionsGSqGVs10DictionaryVSC29UIApplicationLaunchOptionsKeyP____Sb + 180
10 UIKit 0x000000010da4068e -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 290
11 UIKit 0x000000010da42013 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4236
12 UIKit 0x000000010da483b9 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1731
13 UIKit 0x000000010da45539 -[UIApplication workspaceDidEndTransaction:] + 188
14 FrontBoardServices 0x00000001131ac76b __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
15 FrontBoardServices 0x00000001131ac5e4 -[FBSSerialQueue _performNext] + 189
16 FrontBoardServices 0x00000001131ac96d -[FBSSerialQueue _performNextFromRunLoopSource] + 45
17 CoreFoundation 0x000000010cdc7311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
18 CoreFoundation 0x000000010cdac59c __CFRunLoopDoSources0 + 556
19 CoreFoundation 0x000000010cdaba86 __CFRunLoopRun + 918
20 CoreFoundation 0x000000010cdab494 CFRunLoopRunSpecific + 420
21 UIKit 0x000000010da43db6 -[UIApplication _run] + 434
22 UIKit 0x000000010da49f34 UIApplicationMain + 159
23 GoogleLoginTest1 0x000000010bb24cdf main + 111
24 libdyld.dylib 0x000000010fc4d68d start + 1
25 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
have you added Other linker flag : -OjcC

NSURL URLWithString gives error: unrecognized selector sent to instance

In my new app I have to external links. One in the view that only is shown the very first time the app is started and one in tab3. The link in tab3 is working, but the link in the initial screen is giving a crash, while exactly the same code is used.
Code for ViewController.h
- (IBAction)findAllyId;
Code for ViewController.m
- (IBAction)findAllyId {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"http://youtu.be/H_AguOLEHW8"]];
}
Error log after pressing the Button that is linked to this findAllyId
2015-03-13 19:03:30.666 Friend codes for Kingdom Age[89581:40810062] -[ViewController findAllyId]: unrecognized selector sent to instance 0x7facaa694530
2015-03-13 19:03:30.674 Friend codes for Kingdom Age[89581:40810062] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ViewController findAllyId]: unrecognized selector sent to instance 0x7facaa694530'
*** First throw call stack:
(
0 CoreFoundation 0x000000010e141a75 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010dddabb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010e148d1d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x000000010e0a09dc ___forwarding___ + 988
4 CoreFoundation 0x000000010e0a0578 _CF_forwarding_prep_0 + 120
5 UIKit 0x000000010c430a22 -[UIApplication sendAction:to:from:forEvent:] + 75
6 UIKit 0x000000010c537e50 -[UIControl _sendActionsForEvents:withEvent:] + 467
7 UIKit 0x000000010c53721f -[UIControl touchesEnded:withEvent:] + 522
8 UIKit 0x000000010c476b68 -[UIWindow _sendTouchesForEvent:] + 735
9 UIKit 0x000000010c477493 -[UIWindow sendEvent:] + 683
10 UIKit 0x000000010c443fb1 -[UIApplication sendEvent:] + 246
11 UIKit 0x000000010c451227 _UIApplicationHandleEventFromQueueEvent + 17700
12 UIKit 0x000000010c42c23c _UIApplicationHandleEventQueue + 2066
13 CoreFoundation 0x000000010e076c91 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
14 CoreFoundation 0x000000010e06cb5d __CFRunLoopDoSources0 + 269
15 CoreFoundation 0x000000010e06c194 __CFRunLoopRun + 868
16 CoreFoundation 0x000000010e06bbc6 CFRunLoopRunSpecific + 470
17 GraphicsServices 0x000000010fc5aa58 GSEventRunModal + 161
18 UIKit 0x000000010c42f580 UIApplicationMain + 1282
19 Friend codes for Kingdom Age 0x000000010b9f9d83 main + 115
20 libdyld.dylib 0x000000010e6af145 start + 1
21 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Again, exactly the same code (with a different URL) is working in another screen of the app, with a click on a button.

Signal 1 SIGARBT Crash (PlaySound?)

I started getting this error when I tried to make a button play a sound. I'm not getting a code errors (Red or Yellow markers) but my app crashes when I click the button.
Here's what the console outputs:
2014-05-12 20:24:59.866 ReAct[4511:60b] -[ViewController PlayAudioBUtton:]: unrecognized selector sent to instance 0x9059280
2014-05-12 20:24:59.875 ReAct[4511:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ViewController PlayAudioBUtton:]: unrecognized selector sent to instance 0x9059280'
*** First throw call stack:
(
0 CoreFoundation 0x01c6c1e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x019eb8e5 objc_exception_throw + 44
2 CoreFoundation 0x01d09243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x01c5c50b ___forwarding___ + 1019
4 CoreFoundation 0x01c5c0ee _CF_forwarding_prep_0 + 14
5 libobjc.A.dylib 0x019fd880 -[NSObject performSelector:withObject:withObject:] + 77
6 UIKit 0x006ad3b9 -[UIApplication sendAction:to:from:forEvent:] + 108
7 UIKit 0x006ad345 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
8 UIKit 0x007aebd1 -[UIControl sendAction:to:forEvent:] + 66
9 UIKit 0x007aefc6 -[UIControl _sendActionsForEvents:withEvent:] + 577
10 UIKit 0x007ae243 -[UIControl touchesEnded:withEvent:] + 641
11 UIKit 0x006ecddd -[UIWindow _sendTouchesForEvent:] + 852
12 UIKit 0x006ed9d1 -[UIWindow sendEvent:] + 1117
13 UIKit 0x006bf5f2 -[UIApplication sendEvent:] + 242
14 UIKit 0x006a9353 _UIApplicationHandleEventQueue + 11455
15 CoreFoundation 0x01bf577f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
16 CoreFoundation 0x01bf510b __CFRunLoopDoSources0 + 235
17 CoreFoundation 0x01c121ae __CFRunLoopRun + 910
18 CoreFoundation 0x01c119d3 CFRunLoopRunSpecific + 467
19 CoreFoundation 0x01c117eb CFRunLoopRunInMode + 123
20 GraphicsServices 0x031ac5ee GSEventRunModal + 192
21 GraphicsServices 0x031ac42b GSEventRun + 104
22 UIKit 0x006abf9b UIApplicationMain + 1225
23 ReAct 0x000020cd main + 141
24 libdyld.dylib 0x02996701 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
I think it's due to the first description:
"Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ViewController PlayAudioBUtton:]: unrecognized selector sent to instance 0x9059280'"
But I'm unsure of what this means because I am new to Xcode and iOS coding alike.
Any help is greatly appreciated.

My application crashed because SIGABRT happened

I used 'Detail - Master Application' of Apple's example file.
I edited its 'Main-iPhone.storyboard'like this image.
And happened this error to my application.
2013-12-14 15:13:12.960 IFST[2448:70b] -[UITabBarController topViewController]: unrecognized selector sent to instance 0x8a6c290
2013-12-14 15:13:12.963 IFST[2448:70b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITabBarController topViewController]: unrecognized selector sent to instance 0x8a6c290'
*** First throw call stack:
(
0 CoreFoundation 0x01aa15e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x018248b6 objc_exception_throw + 44
2 CoreFoundation 0x01b3e903 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x01a9190b ___forwarding___ + 1019
4 CoreFoundation 0x01a914ee _CF_forwarding_prep_0 + 14
5 IFST 0x00004d40 -[AppDelegate application:didFinishLaunchingWithOptions:] + 848
6 UIKit 0x0058c355 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 309
7 UIKit 0x0058cb95 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1536
8 UIKit 0x005913a8 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
9 UIKit 0x005a587c -[UIApplication handleEvent:withNewEvent:] + 3447
10 UIKit 0x005a5de9 -[UIApplication sendEvent:] + 85
11 UIKit 0x00593025 _UIApplicationHandleEvent + 736
12 GraphicsServices 0x039042f6 _PurpleEventCallback + 776
13 GraphicsServices 0x03903e01 PurpleEventCallback + 46
14 CoreFoundation 0x01a1cd65 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
15 CoreFoundation 0x01a1ca9b __CFRunLoopDoSource1 + 523
16 CoreFoundation 0x01a4777c __CFRunLoopRun + 2156
17 CoreFoundation 0x01a46ac3 CFRunLoopRunSpecific + 467
18 CoreFoundation 0x01a468db CFRunLoopRunInMode + 123
19 UIKit 0x00590add -[UIApplication _run] + 840
20 UIKit 0x00592d3b UIApplicationMain + 1225
21 IFST 0x0000592d main + 141
22 libdyld.dylib 0x020df70d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
and SIGABRT.
Why did happened it?
Please tell me.
Your crash log gives you the answer:
2013-12-14 15:13:12.963 IFST[2448:70b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITabBarController topViewController]: unrecognized selector sent to instance 0x8a6c290'
Somewhere you're sending topViewController to the tab bar controller. It's not a navigation controller, so this method is not appropriate. Maybe selectedViewController is the one you're looking for.

Resources