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.
Related
I have try to video call using QuickBlox from web page to iOS app but when I am call from web immediately iOS app crash with as below log.
[3553:77957] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFConstantString count]: unrecognized selector sent to instance 0x10e546c78'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23c7127e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff513fbb20 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23c91fd4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x00007fff23c75c4c ___forwarding___ + 1436
4 CoreFoundation 0x00007fff23c77f78 _CF_forwarding_prep_0 + 120
5 libswiftFoundation.dylib 0x000000010f8849f5 $sSD10FoundationE26_forceBridgeFromObjectiveC_6resultySo12NSDictionaryC_SDyxq_GSgztFZ + 709
6 libswiftFoundation.dylib 0x000000010f8789e3 $sSD10FoundationE36_unconditionallyBridgeFromObjectiveCySDyxq_GSo12NSDictionaryCSgFZ + 67
7 ProjectDemo 0x000000010d71912a $s15ProjectDemo6HomeVCC20didReceiveNewSession_8userInfoySo12QBRTCSessionC_SDyS2SGSgtFTo + 138
8 CoreFoundation 0x00007fff23c7820c __invoking___ + 140
9 CoreFoundation 0x00007fff23c753af -[NSInvocation invoke] + 319
10 CoreFoundation 0x00007fff23c75684 -[NSInvocation invokeWithTarget:] + 68
11 Quickblox 0x000000010e4cb67e qb_jid + 89448
12 libdispatch.dylib 0x000000010fb97dd4 _dispatch_call_block_and_release + 12
13 libdispatch.dylib 0x000000010fb98d48 _dispatch_client_callout + 8
14 libdispatch.dylib 0x000000010fba6de6 _dispatch_main_queue_callback_4CF + 1500
15 CoreFoundation 0x00007fff23bd4049 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
16 CoreFoundation 0x00007fff23bceca9 __CFRunLoopRun + 2329
17 CoreFoundation 0x00007fff23bce066 CFRunLoopRunSpecific + 438
18 GraphicsServices 0x00007fff384c0bb0 GSEventRunModal + 65
19 UIKitCore 0x00007fff48092d4d UIApplicationMain + 1621
20 ProjectDemo 0x000000010d75a98b main + 75
21 libdyld.dylib 0x00007fff5227ec25 start + 1
22 ??? 0x0000000000000001 0x0 + 1
)
2020-09-01 09:56:40:474 ProjectDemo[3553:1260b] SEND: <a xmlns="urn:xmpp:sm:3" h="2"/>
libc++abi.dylib: terminating with uncaught exception of type NSException
Most likely, the issue is related to outdated Javascript SDK.
Per our check, your Javascript SDK version is 2.8.1. Please update SDK to the latest version 2.12.9: https://github.com/QuickBlox/quickblox-javascript-sdk
Also, make sure that you are using the latest iOS SDK version 2.17.4: https://github.com/QuickBlox/quickblox-ios-sdk
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.
I got a crash from Fabric,the stack is below:
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 6806634868 objc_release + 20
1 libsystem_blocks.dylib 6813456656 _Block_release + 256
2 libobjc.A.dylib 6806640420 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 564
3 CoreFoundation 6529519172 _CFAutoreleasePoolPop + 28
4 UIKit 6605817924 _wrapRunLoopWithAutoreleasePoolHandler + 76
5 CoreFoundation 6530394704 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
6 CoreFoundation 6530382300 __CFRunLoopDoObservers + 360
7 CoreFoundation 6530383292 __CFRunLoopRun + 836
8 CoreFoundation 6529519780 CFRunLoopRunSpecific + 396
9 GraphicsServices 6682260900 GSEventRunModal + 168
10 UIKit 6606283712 UIApplicationMain + 1488
11 Spec 4297532060 main (main.m:15)
12 libdyld.dylib 6813280776 start + 4
I don't know why it would be _Block_release after (anonymous namespace)::AutoreleasePoolPage::pop(void*). Is it possible that a block was added to autoreleasepool?if possible, why the block crashed at release and it not crashed at invoke?
Ok,I had resolve this bug.The reason for the crash was that I had hook the function objectAtIndex for NSMutableArray.And If user switch from background,the app would get a crash -[UIKeyboardLayoutStar release]: message sent to deallocated.
So remove the hook code will resolve this bug.
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'.
Can anyone help me make sense of the crash log below? It came from Apple after inquiring further about a crash my app had. They rejected the app because of this crash, but I have never once been able to make it occur on my end or with 10+ beta testers. So basically, it is only occurring for them for some reason. It looks like it has to do with presenting a view, but that's weird because, like I said, this view is coming up perfectly fine.
Mar 11 14:46:09 unknown StageBloc[2309] <Error>: *** Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '-[AccountOverviewViewController popupViewController]: unrecognized selector sent to instance 0x2c7820'
*** Call stack at first throw:
(
0 CoreFoundation 0x3291964f __exceptionPreprocess + 114
1 libobjc.A.dylib 0x36b5cc5d objc_exception_throw + 24
2 CoreFoundation 0x3291d1bf -[NSObject(NSObject) doesNotRecognizeSelector:] + 102
3 CoreFoundation 0x3291c649 ___forwarding___ + 508
4 CoreFoundation 0x32893180 _CF_forwarding_prep_0 + 48
5 AppName 0x0004b56d -[TTBaseViewController shouldAutorotateToInterfaceOrientation:] + 36
6 UIKit 0x35b0dead -[UIViewController _isSupportedInterfaceOrientation:] + 48
7 UIKit 0x35b76e51 -[UIViewController _preferredInterfaceOrientationGivenCurrentOrientation:] + 68
8 UIKit 0x35b75f07 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 794
9 UIKit 0x35b756f7 -[UIViewController presentModalViewController:withTransition:] + 2378
10 UIKit 0x35b74cd7 -[UIViewController presentModalViewController:animated:] + 58
11 StageBloc 0x00009bb1 -[StageBlocViewController loginSuccessful] + 196
12 StageBloc 0x00004c21 -[StageBlocAppDelegate successfulAttempt:] + 288
13 CoreFoundation 0x32886f03 -[NSObject(NSObject) performSelector:withObject:] + 22
14 AppName 0x0002aa75 -[ASIHTTPRequest reportFinished] + 60
15 CoreFoundation 0x32886f03 -[NSObject(NSObject) performSelector:withObject:] + 22
16 Foundation 0x325707a9 __NSThreadPerformPerform + 268
17 CoreFoundation 0x328f0a79 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
18 CoreFoundation 0x328f275f __CFRunLoopDoSources0 + 382
19 CoreFoundation 0x328f34eb __CFRunLoopRun + 230
20 CoreFoundation 0x32883ec3 CFRunLoopRunSpecific + 230
21 CoreFoundation 0x32883dcb CFRunLoopRunInMode + 58
22 GraphicsServices 0x30b2b41f GSEventRunModal + 114
23 GraphicsServices 0x30b2b4cb GSEventRun + 62
24 UIKit 0x35af9d69 -[UIApplication _run] + 404
25 UIKit 0x35af7807 UIApplicationMain + 670
26 AppName 0x00002ae1 main + 48
27 AppName 0x00002aac start + 40
)
This had to do with forgetting to add some required built variables to my project that the Three20 libraries use. I didn't notice it because you can't run App Store release builds locally.