I am getting #560 NSInvalidArgumentException error as shown below;
-[_NSObserverList setCursorPosition:]: unrecognized selector sent to instance 0x1702a6ea0
CoreFoundation ___exceptionPreprocess
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x1854f21c0 __exceptionPreprocess
1 libobjc.A.dylib 0x183f2c55c objc_exception_throw
2 CoreFoundation 0x1854f9278 __methodDescriptionForSelector
3 CoreFoundation 0x1854f6278 ___forwarding___
4 CoreFoundation 0x1853f059c _CF_forwarding_prep_0
5 UIKit 0x18b830418 -[_UIKeyboardTextSelectionController selectTextWithGranularity:atPoint:executionContext:]
6 UIKit 0x18b8304b0 -[_UIKeyboardTextSelectionController selectTextWithGranularity:atPoint:completionHandler:]
7 UIKit 0x18b895928 -[_UIKeyboardBasedNonEditableTextSelectionGestureController oneFingerForcePan:]
8 UIKit 0x18b91b59c -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:]
9 UIKit 0x18b91eca4 _UIGestureRecognizerSendTargetActions
10 UIKit 0x18b4e02e8 _UIGestureRecognizerSendActions
11 UIKit 0x18b37e828 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:]
12 UIKit 0x18b90ece8 _UIGestureEnvironmentUpdate
13 CoreFoundation 0x18549f7dc __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
14 CoreFoundation 0x18549d40c __CFRunLoopDoObservers
15 CoreFoundation 0x18549d89c __CFRunLoopRun
16 CoreFoundation 0x1853cc048 CFRunLoopRunSpecific
17 GraphicsServices 0x186e52198 GSEventRunModal
18 UIKit 0x18b3b82fc -[UIApplication _run]
19 UIKit 0x18b3b3034 UIApplicationMain
20 MyAppName 0x100050054 main (main.m:16)
21 libdispatch.dylib 0x1843b05b8 (Missing)
Can anyone please suggest me what can be the issue?
This kind of NSInvalidArgumentException, especially because it's on a private class, is probably due to a Zombie object. You are sending a message "setCursorPosition:" to an object that no longer exist, but another one is in it's place. In this case "_NSObserverList".
Try running with the "Zombie Objects" diagnostics objects to trace down which is the object that should receive that message but was gone. That option keeps the objects in memory when they are released, but marked as zombies.
Related
The first view controller of my project crashed when segue'd to from another view controller - but not when it loads. I get this error message:
2016-01-05 20:06:33.836 collaboration[48812:1788623] -[collaboration.createAccountViewController loginExisting:]: unrecognized selector sent to instance 0x796cc950
2016-01-05 20:06:33.849 collaboration[48812:1788623] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[collaboration.createAccountViewController loginExisting:]: unrecognized selector sent to instance 0x796cc950'
*** First throw call stack:
(
0 CoreFoundation 0x00396a14 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x022c5e02 objc_exception_throw + 50
2 CoreFoundation 0x0039fd63 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x002dd6bd ___forwarding___ + 1037
4 CoreFoundation 0x002dd28e _CF_forwarding_prep_0 + 14
5 libobjc.A.dylib 0x022da0b5 -[NSObject performSelector:withObject:withObject:] + 84
6 UIKit 0x00df7b79 -[UIApplication sendAction:to:from:forEvent:] + 118
7 UIKit 0x00df7af8 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 64
8 UIKit 0x00f978f8 -[UIControl sendAction:to:forEvent:] + 79
9 UIKit 0x00f97c78 -[UIControl _sendActionsForEvents:withEvent:] + 408
10 UIKit 0x00f96c7e -[UIControl touchesEnded:withEvent:] + 714
11 UIKit 0x00e74182 -[UIWindow _sendTouchesForEvent:] + 1095
12 UIKit 0x00e75220 -[UIWindow sendEvent:] + 1159
13 UIKit 0x00e19f93 -[UIApplication sendEvent:] + 266
14 UIKit 0x00def668 _UIApplicationHandleEventQueue + 7802
15 CoreFoundation 0x002b06ff __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
16 CoreFoundation 0x002a638b __CFRunLoopDoSources0 + 523
17 CoreFoundation 0x002a57a8 __CFRunLoopRun + 1032
18 CoreFoundation 0x002a50e6 CFRunLoopRunSpecific + 470
19 CoreFoundation 0x002a4efb CFRunLoopRunInMode + 123
20 GraphicsServices 0x07075664 GSEventRunModal + 192
21 GraphicsServices 0x070754a1 GSEventRun + 104
22 UIKit 0x00df5bfa UIApplicationMain + 160
23 collaboration 0x00085a3c main + 140
24 libdyld.dylib 0x039bca21 start + 1
25 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
As you can see, it cites the variable 'loginExisting' as the issue, however loginExisting is not a variable on in any of my scripts (it was before but has since been removes). How can I 'refresh' XCode so that it forgets about the absent variable? I have tried restarting my machine and cleaning XCode but have had not success.
Thank you for your help.
Go to your storyboard that's crashing and right click the yellow icon at the top of the ViewController.
After right clicking, look towards the bottom where it says "Received actions" and delete all of the actions pertaining to the loginExisting method.
This is one of many possible culprits, but this tends to be the most common.
EDIT: It's also possible that you have a property (IBOutlet) connected to the storyboard that no longer exists which will throw an error.
I have a camera app on the app store that uses GPUImage to take pictures and record videos. I am getting crash reports that says its crashing for a lot of users with the error
Fatal Exception: NSRangeException
*** -[NSArray| objectAtIndex:]: index 0 beyond bounds for empty array
The crash report says the crash occurs in the GPUImageStillCamera.m class at line 283. Below is the crash report. I appreciate your help in advance.
Thread : Fatal Exception: NSRangeException
0 CoreFoundation 6484558552 __exceptionPreprocess
1 libobjc.A.dylib 6783221988 objc_exception_throw
2 CoreFoundation 6483393332 CFRunLoopRemoveTimer
3 Selfie 4297468448 -[GPUImageStillCamera capturePhotoProcessedUpToFilter:withImageOnGPUHandler:] (GPUImageStillCamera.m:283)
4 Selfie 4297465636 -[GPUImageStillCamera capturePhotoAsImageProcessedUpToFilter:withOrientation:withCompletionHandler:] (GPUImageStillCamera.m:171)
5 Selfie 4295826452 +[SEMediaCapture captureImageFromCamera:withFilter:completion:] (SEMediaCapture.m:39)
6 Selfie 4296216108 -[SEViewController takePicture] (SEViewController.m:595)
7 Selfie 4296201380 -[SEViewController tappedToTakeAPicture:] (SEViewController.m:216)
8 UIKit 6564311152 _UIGestureRecognizerSendActions
9 UIKit 6562842292 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:]
10 UIKit 6567498636 ___UIGestureRecognizerUpdate_block_invoke662
11 UIKit 6562595864 _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks
12 UIKit 6562588612 _UIGestureRecognizerUpdate
13 UIKit 6562834476 -[UIWindow _sendGesturesForEvent:]
14 UIKit 6562832100 -[UIWindow sendEvent:]
15 UIKit 6562648352 -[UIApplication sendEvent:]
16 UIKit 6565405368 _UIApplicationHandleEventFromQueueEvent
17 UIKit 6562641460 _UIApplicationHandleEventQueue
18 CoreFoundation 6484263488 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
19 CoreFoundation 6484260068 __CFRunLoopDoSources0
20 CoreFoundation 6484252052 __CFRunLoopRun
21 CoreFoundation 6483382996 CFRunLoopRunSpecific
22 GraphicsServices 6645217020 GSEventRunModal
23 UIKit 6563065664 UIApplicationMain
24 Selfie 4296168708 main (main.m:15)
25 libdyld.dylib 6790212104 start
I included crashlytics in my ios app and distributed it via enterprise. Crashlytics keeps on reporting below crash daily regarding Reachability. I googled, but didn't get what causing this crash.
Fatal Exception: NSInvalidArgumentException
-[__NSMallocBlock__ reachabilityChanged:]: unrecognized selector sent to instance 0x1c5cdfc0
Thread : Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x316642a3 __exceptionPreprocess + 162
1 libobjc.A.dylib 0x3252297f objc_exception_throw + 30
2 CoreFoundation 0x31667e07 -[NSObject(NSObject) doesNotRecognizeSelector:] + 170
3 CoreFoundation 0x31666531 ___forwarding___ + 392
4 CoreFoundation 0x315bdf68 _CF_forwarding_prep_0 + 24
5 CoreFoundation 0x315b5037 _CFXNotificationPost + 1426
6 Foundation 0x3319ed91 -[NSNotificationCenter postNotificationName:object:userInfo:] + 72
7 Foundation 0x331a2853 -[NSNotificationCenter postNotificationName:object:] + 30
8 0x0005aee9 ReachabilityCallback (Reachability.m:94)
9 SystemConfiguration 0x30f5f161 reachPerform + 924
10 CoreFoundation 0x31639683 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
11 CoreFoundation 0x31638ee9 __CFRunLoopDoSources0 + 212
12 CoreFoundation 0x31637cb7 __CFRunLoopRun + 646
13 CoreFoundation 0x315aaebd CFRunLoopRunSpecific + 356
14 CoreFoundation 0x315aad49 CFRunLoopRunInMode + 104
15 GraphicsServices 0x393a82eb GSEventRunModal + 74
16 UIKit 0x38e662f9 UIApplicationMain + 1120
17 0x00076f2f main (main.m:16)
18 libdyld.dylib 0x350bab20 start
It looks like you're registering a reachability observer which is being deallocated but not removing itself as an observer before that happens. So, when the reachability notification is posted later it is sent to a deallocated instance (i.e. random memory location) and you get a crash.
All observers (whether of reachability or any other notification with NSNotificationCenter) should remove themselves as an observer before they are deallocated.
I was messing with my storyboard with no code involved and got this error after I connected "Terms of use" button to a view controller. It was working fine before this action.
-I created and connected a class to Terms of Use View Controller
-I used action push segue to connect
2014-01-22 17:26:45.434 Project[1162:a0b] -[AboutViewController termsOfUseButton:]: unrecognized selector sent to instance 0x8c89d40
2014-01-22 17:26:45.437 Project[1162:a0b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[AboutViewController termsOfUseButton:]: unrecognized selector sent to instance 0x8c89d40'
*** First throw call stack:
(
0 CoreFoundation 0x0173b5e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x014be8b6 objc_exception_throw + 44
2 CoreFoundation 0x017d8903 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x0172b90b ___forwarding___ + 1019
4 CoreFoundation 0x0172b4ee _CF_forwarding_prep_0 + 14
5 libobjc.A.dylib 0x014d0874 -[NSObject performSelector:withObject:withObject:] + 77
6 UIKit 0x0022e0c2 -[UIApplication sendAction:to:from:forEvent:] + 108
7 UIKit 0x0022e04e -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
8 UIKit 0x003260c1 -[UIControl sendAction:to:forEvent:] + 66
9 UIKit 0x00326484 -[UIControl _sendActionsForEvents:withEvent:] + 577
10 UIKit 0x00325733 -[UIControl touchesEnded:withEvent:] + 641
11 UIKit 0x0026b51d -[UIWindow _sendTouchesForEvent:] + 852
12 UIKit 0x0026c184 -[UIWindow sendEvent:] + 1232
13 UIKit 0x0023fe86 -[UIApplication sendEvent:] + 242
14 UIKit 0x0022a18f _UIApplicationHandleEventQueue + 11421
15 CoreFoundation 0x016c483f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
16 CoreFoundation 0x016c41cb __CFRunLoopDoSources0 + 235
17 CoreFoundation 0x016e129e __CFRunLoopRun + 910
18 CoreFoundation 0x016e0ac3 CFRunLoopRunSpecific + 467
19 CoreFoundation 0x016e08db CFRunLoopRunInMode + 123
20 GraphicsServices 0x036909e2 GSEventRunModal + 192
21 GraphicsServices 0x03690809 GSEventRun + 104
22 UIKit 0x0022cd3b UIApplicationMain + 1225
23 Project 0x00003a9d main + 141
24 libdyld.dylib 0x01d77725 start + 0
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
(Lame but I found the solution after I finished writing the question)
The reason for this error is I created an IBAction-UIButton method on touch up inside.
I deleted that code and hoped the traces were deleted.
It seems it wasnt, I had to unconnect the touch up inside by clicking the X in red squared spot.
I would try recreating the button and the segue, maybe you changed the IBOutlet name by accident or any other thing.
GL HF
2011-04-20 18:38:41.347 RIE[1683:607] -[UICGColor _shouldContinuePlaybackInBackground]: unrecognized selector sent to instance 0x28db10
2011-04-20 18:38:41.417 RIE[1683:607] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UICGColor _shouldContinuePlaybackInBackground]: unrecognized selector sent to instance 0x28db10'
*** Call stack at first throw:
(
0 CoreFoundation 0x342ed64f __exceptionPreprocess + 114
1 libobjc.A.dylib 0x35570c5d objc_exception_throw + 24
2 CoreFoundation 0x342f11bf -[NSObject(NSObject) doesNotRecognizeSelector:] + 102
3 CoreFoundation 0x342f0649 ___forwarding___ + 508
4 CoreFoundation 0x34267180 _CF_forwarding_prep_0 + 48
5 MediaPlayer 0x344628b7 -[MPMoviePlayerViewController _moviePlayerViewController_applicationDidEnterBackgroundNotification:] + 42
6 Foundation 0x333b5183 _nsnote_callback + 142
7 CoreFoundation 0x342bc20f __CFXNotificationPost_old + 402
8 CoreFoundation 0x34256eeb _CFXNotificationPostNotification + 118
9 Foundation 0x333b25d3 -[NSNotificationCenter postNotificationName:object:userInfo:] + 70
10 UIKit 0x36364d01 -[UIApplication _handleApplicationSuspend:eventInfo:] + 500
11 UIKit 0x362feaf9 -[UIApplication handleEvent:withNewEvent:] + 1916
12 UIKit 0x362fe215 -[UIApplication sendEvent:] + 44
13 UIKit 0x362fdc53 _UIApplicationHandleEvent + 5090
14 GraphicsServices 0x33e58e77 PurpleEventCallback + 666
15 CoreFoundation 0x342c4a97 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
16 CoreFoundation 0x342c683f __CFRunLoopDoSource1 + 166
17 CoreFoundation 0x342c760d __CFRunLoopRun + 520
18 CoreFoundation 0x34257ec3 CFRunLoopRunSpecific + 230
19 CoreFoundation 0x34257dcb CFRunLoopRunInMode + 58
20 GraphicsServices 0x33e5841f GSEventRunModal + 114
21 GraphicsServices 0x33e584cb GSEventRun + 62
22 UIKit 0x36328d69 -[UIApplication _run] + 404
23 UIKit 0x36326807 UIApplicationMain + 670
24 Motor Show 0x0000219b main + 70
25 Motor Show 0x00002150 start + 40
)
terminate called after throwing an instance of 'NSException'
Program received signal: “SIGABRT”.
Hard to say given just the stack trace, but I would suggest the following:
Implement applicationWillResignActive: in your UIApplicationDelegate to ensure that video playback is paused or stopped before the application enters the background.
Create a custom UIApplication subclass to use in your app, and override the _handleApplicationSuspend:eventInfo: method so that it returns without propagating the event to other classes further down the chain.
Figure out how to unregister your MPMoviePlayerViewController component from the notification center so that it does not receive the 'ApplicationDidEnterBackgroundNotification'.