iOS crash: -[UITextView(LinkInteraction) startInteractionWithLinkAtPoint:] - ios

According to crashlytics, a few users are experiencing crashes on the following line
-[UITextView(LinkInteraction) startInteractionWithLinkAtPoint:]
I can't replicate it at all. This might be an iOS 11 issue because that seems to be version it is crashing on.
Here is the complete crash log.
Fatal Exception: NSInternalInconsistencyException
0 CoreFoundation 0x1849fed8c __exceptionPreprocess
1 libobjc.A.dylib 0x183bb85ec objc_exception_throw
2 CoreFoundation 0x1849febf8 +[NSException raise:format:]
3 Foundation 0x1853eefa0 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
4 UIKit 0x18f2daf3c -[UITextView(LinkInteraction) startInteractionWithLinkAtPoint:]
5 UIKit 0x18ed4597c -[UITextGestureClusterLinkInteract smallDelayRecognizer:]
6 UIKit 0x18e7ea6e8 -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:]
7 UIKit 0x18ed573b4 _UIGestureRecognizerSendTargetActions
8 UIKit 0x18e94ce38 _UIGestureRecognizerSendActions
9 UIKit 0x18e7e9720 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:]
10 UIKit 0x18ed48bd4 _UIGestureEnvironmentUpdate
11 UIKit 0x18e7e34d8 -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:]
12 UIKit 0x18e7e3010 -[UIGestureEnvironment _updateGesturesForEvent:window:]
13 UIKit 0x18e7e2874 -[UIWindow sendEvent:]
14 UIKit 0x18e7e11d0 -[UIApplication sendEvent:]
15 UIKit 0x18efc2d1c __dispatchPreprocessedEventFromEventQueue
16 UIKit 0x18efc52c8 __handleEventQueueInternal
17 UIKit 0x18efbe368 __handleHIDEventFetcherDrain
18 CoreFoundation 0x1849a7404 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
19 CoreFoundation 0x1849a6c2c __CFRunLoopDoSources0
20 CoreFoundation 0x1849a479c __CFRunLoopRun
21 CoreFoundation 0x1848c4da8 CFRunLoopRunSpecific
22 GraphicsServices 0x1868a9020 GSEventRunModal
23 UIKit 0x18e8e1758 UIApplicationMain
24 MyApp 0x10441cc88 main (main.m:14)
25 libdyld.dylib 0x184355fc0 start
I've seen this stackoverflow post
UITextView startInteractionWithLinkAtPoint crash iOS 11 only
However, I don't want to disable drag and drop. Should I wait until Apple fixes this issue because this seems to be a bug on Apple's end.

Related

App with both Swift 3 and Objective-C crashes only on iPhone SE

I'm developing an app using both Swift 3 and Objective-C.
I keep getting the following crash only on iPhone SE:
Fatal Exception: NSInvalidArgumentException
-[_TtGCs26_SwiftDeferredNSDictionarySSP__ length]: unrecognized selector sent to instance 0x17022b880
This is the stack trace:
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x18d6aefe0 __exceptionPreprocess
1 libobjc.A.dylib 0x18c110538 objc_exception_throw
2 CoreFoundation 0x18d6b5ef4 __methodDescriptionForSelector
3 CoreFoundation 0x18d6b2f54 ___forwarding___
4 CoreFoundation 0x18d5aed4c _CF_forwarding_prep_0
5 UIKit 0x193cdac38 -[UIButton _updateTitleView]
6 UIKit 0x193856be4 -[UIButton tintColorDidChange]
7 UIKit 0x193cf4e40 -[_UITintColorVisitor _visitView:]
8 UIKit 0x193cf5524 _UIViewVisitorEntertainVisitors
9 UIKit 0x193cf4658 _UIViewVisitorRecursivelyEntertainDescendingVisitors
10 UIKit 0x193cf4708 _UIViewVisitorRecursivelyEntertainDescendingVisitors
11 UIKit 0x193cf3fa4 _UIViewVisitorEntertainDescendingTrackingVisitors
12 UIKit 0x1937db964 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke
13 Foundation 0x18e0e8a7c -[NSISEngine withBehaviors:performModifications:]
14 UIKit 0x1937db76c -[UIView(Hierarchy) _postMovedFromSuperview:]
15 UIKit 0x1937e7668 -[UIView(Internal) _addSubview:positioned:relativeTo:]
16 UIKit 0x1937e6f84 -[UIView(Hierarchy) addSubview:]
17 UIKit 0x193ac4c84 -[UIView _setTraitStorageSubviews:]
18 Foundation 0x18e0c364c -[NSObject(NSKeyValueCoding) setValue:forKey:]
19 UIKit 0x193addfe0 -[UIView(CALayerDelegate) setValue:forKey:]
20 UIKit 0x193c63fb8 -[_UIRelationshipTraitStorage applyRecordsMatchingTraitCollection:]
21 UIKit 0x193c62968 -[NSObject(_UITraitStorageAccessors) _applyTraitStorageRecordsForTraitCollection:]
22 UIKit 0x193ac87cc -[UIView _traitCollectionDidChangeFromOldCollection:toNewCollection:scaleDidChange:]
23 UIKit 0x193ac88f0 -[UIView _wrappedProcessDidChangeRecursivelyFromOldTraits:toCurrentTraits:scaleDidChange:forceNotification:]
24 UIKit 0x194140340 -[UIView(AdditionalLayoutSupport) _withUnsatisfiableConstraintsLoggingSuspendedIfEngineDelegateExists:]
25 UIKit 0x193ac8b54 -[UIView _processDidChangeRecursivelyFromOldTraits:toCurrentTraits:forceNotification:]
26 UIKit 0x1937dd00c -[UIView(CALayerDelegate) layoutSublayersOfLayer:]
27 QuartzCore 0x1909cd274 -[CALayer layoutSublayers]
28 QuartzCore 0x1909c1de8 CA::Layer::layout_if_needed(CA::Transaction*)
29 QuartzCore 0x1909c1ca8 CA::Layer::layout_and_display_if_needed(CA::Transaction*)
30 QuartzCore 0x19093d34c CA::Context::commit_transaction(CA::Transaction*)
31 QuartzCore 0x1909643ac CA::Transaction::commit()
32 QuartzCore 0x190964e78 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*)
33 CoreFoundation 0x18d65c9a8 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
34 CoreFoundation 0x18d65a630 __CFRunLoopDoObservers
35 CoreFoundation 0x18d65aa7c __CFRunLoopRun
36 CoreFoundation 0x18d58ada4 CFRunLoopRunSpecific
37 GraphicsServices 0x18eff4074 GSEventRunModal
38 UIKit 0x193845058 UIApplicationMain
39 <MyApp> 0x10004fc5c main (main.m:14)
40 libdyld.dylib 0x18c59959c start
Does anybody know what could be the cause of this kind of crashes?
Thanks.

iOS - Can't trace this crash error

I'm using Crashlytics 3.6.0 and I've been getting a couple of crash reports lately that I can't read/understand. They seem to only happen on iOS 8 (can't confirm this 100% though).
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x197fcfbd0 objc_msgSend + 16
1 UIKit 0x18c035c60 -[UIControl _sendActionsForEvents:withEvent:] + 124
2 UIKit 0x18c293e7c -[UISwitch _handleLongPressNL:] + 424
3 UIKit 0x18c1af508 _UIGestureRecognizerSendActions + 276
4 UIKit 0x18c048050 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 580
5 UIKit 0x18c4b420c ___UIGestureRecognizerUpdate_block_invoke662 + 60
6 UIKit 0x18c00c530 _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 292
7 UIKit 0x18c00a8dc _UIGestureRecognizerUpdate + 2504
8 UIKit 0x18c0461f8 -[UIWindow _sendGesturesForEvent:] + 1044
9 UIKit 0x18c045898 -[UIWindow sendEvent:] + 660
10 UIKit 0x18c018fa8 -[UIApplication sendEvent:] + 264
11 infinight 0x1003ebe00 -[IBGMethodSwizzler sendEvent:] (IBGMethodSwizzler.m:103)
12 UIKit 0x18c2b7f58 _UIApplicationHandleEventFromQueueEvent + 14992
13 UIKit 0x18c017510 _UIApplicationHandleEventQueue + 1616
14 CoreFoundation 0x18781e9ec __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
15 CoreFoundation 0x18781dc90 __CFRunLoopDoSources0 + 264
16 CoreFoundation 0x18781bd40 __CFRunLoopRun + 712
17 CoreFoundation 0x1877490a4 CFRunLoopRunSpecific + 396
18 GraphicsServices 0x1908eb5a4 GSEventRunModal + 168
19 UIKit 0x18c07e3c0 UIApplicationMain + 1488
20 infinight 0x10013af44 main (main.m:16)
21 libdyld.dylib 0x19862aa08 start + 4
Could anyone help me identify the error? I can't reproduce the error -- it doesn't happen on my device or on the simulator. But I've been getting a fair amount of crash reports like these in the last couple of days from test users.
This was an error that only occured on iOS 8. To reproduce the error, I downloaded the iOS 8.1 simulator and found the error. To get the exact error message, I went to Edit Scheme and Enabled Zombie Objects. That showed me the exact error message:
*** -[NamedUISwitch _sendActionsForEvents:withEvent:]: message sent to deallocated instance

GPUImage index out of bounds crash

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

Moving Swift iOS app to support Apple TV as a new Target

Maybe somebody can help, I'm trying to move my app to facilitate a new target for the Apple TV.
I create the new Storyboard and linked everything the same way as it has been in the iOS application. When I'm trying to start the application I get the following exception, after the AppDelegate is executed (before it goes into the viewDidLoad of the initial controller.
Any ideas?
2015-09-19 12:24:44.629 App TV[46733:3797033] *** Terminating app due to uncaught exception 'CALayerInvalid', reason: 'layer <CATransformLayer: 0x7fc1e0d51fc0> is a part of cycle in its layer tree'
*** First throw call stack:
(
0 CoreFoundation 0x000000010e850105 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010f271deb objc_exception_throw + 48
2 CoreFoundation 0x000000010e85003d +[NSException raise:format:] + 205
3 QuartzCore 0x0000000111d2f74a _ZN2CA5Layer30ensure_transaction_recursivelyEPNS_11TransactionE + 102
4 QuartzCore 0x0000000111d2f795 _ZN2CA5Layer30ensure_transaction_recursivelyEPNS_11TransactionE + 177
5 QuartzCore 0x0000000111d2f795 _ZN2CA5Layer30ensure_transaction_recursivelyEPNS_11TransactionE + 177
6 QuartzCore 0x0000000111d2f795 _ZN2CA5Layer30ensure_transaction_recursivelyEPNS_11TransactionE + 177
7 QuartzCore 0x0000000111d37439 _ZN2CA5Layer15insert_sublayerEPNS_11TransactionEP7CALayerm + 389
8 QuartzCore 0x0000000111d3782a -[CALayer addSublayer:] + 193
9 UIKit 0x000000010d2ce424 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1512
10 UIKit 0x000000010d5b1b56 -[UIButton initWithCoder:] + 1424
11 UIKit 0x000000010d79dd62 UINibDecoderDecodeObjectForValue + 705
12 UIKit 0x000000010d79da98 -[UINibDecoder decodeObjectForKey:] + 278
13 UIKit 0x000000010d5d1315 -[UIRuntimeConnection initWithCoder:] + 134
14 UIKit 0x000000010d5d1a77 -[UIRuntimeEventConnection initWithCoder:] + 60
15 UIKit 0x000000010d79dd62 UINibDecoderDecodeObjectForValue + 705
16 UIKit 0x000000010d79df23 UINibDecoderDecodeObjectForValue + 1154
17 UIKit 0x000000010d79da98 -[UINibDecoder decodeObjectForKey:] + 278
18 UIKit 0x000000010d5d0555 -[UINib instantiateWithOwner:options:] + 1255
19 UIKit 0x000000010d3ad7f2 -[UIViewController _loadViewFromNibNamed:bundle:] + 381
20 UIKit 0x000000010d3ae11e -[UIViewController loadView] + 178
21 UIKit 0x000000010d3ae47d -[UIViewController loadViewIfRequired] + 139
22 UIKit 0x000000010d3aec7e -[UIViewController view] + 27
23 UIKit 0x000000010d289484 -[UIWindow addRootViewControllerViewIfPossible] + 61
24 UIKit 0x000000010d289b81 -[UIWindow _setHidden:forced:] + 302
25 UIKit 0x000000010d29b558 -[UIWindow makeKeyAndVisible] + 43
26 UIKit 0x000000010d216063 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4131
27 UIKit 0x000000010d21c5a8 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1755
28 UIKit 0x000000010d219783 -[UIApplication workspaceDidEndTransaction:] + 188
29 FrontBoardServices 0x000000011097b7ac -[FBSSerialQueue _performNext] + 192
30 FrontBoardServices 0x000000011097bb1a -[FBSSerialQueue _performNextFromRunLoopSource] + 45
31 CoreFoundation 0x000000010e77c1b1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
32 CoreFoundation 0x000000010e7720dc __CFRunLoopDoSources0 + 556
33 CoreFoundation 0x000000010e771593 __CFRunLoopRun + 867
34 CoreFoundation 0x000000010e770fa8 CFRunLoopRunSpecific + 488
35 UIKit 0x000000010d2190d5 -[UIApplication _run] + 402
36 UIKit 0x000000010d21de09 UIApplicationMain + 171
37 App TV 0x000000010d0b8fdd main + 109
38 libdyld.dylib 0x00000001149699e9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Funny thing happening, apparently the new Apple TV (4th Gen / tvOS v9.0) can't handle 'Word Wrap' on a button, after setting it to 'Truncate Middle' it starts up fine. Maybe an issue in the beta.
On Xcode 7.2 I had this same error caused by setting the Line Break on a button to 'Character Wrap'. Changing to 'Truncate Middle' stopped the crash.
You can be notified where the exception occurs by activating Exception Breakpoints, then you will be able to see what happens.
You can do so by going on the Breakpoint navigator on Xcode, then on the Plus button at the bottom left.

Code no longer working in OS4.3 but fine in 5.0 (used to work fine)

Weird error. My code was written in Xcode 3, and it loaded fine in 4.4 without errors.
Recently, it started not working in OS 4.3 or below, but fine in 5.0 and 5.1. I've done a few weeks of updating my app, so I have no idea where it went out of whack (I was using the current simulator 5.1 when testing, so I didn't even think to try the others after each trial).
Here is my error log, but I can't figure out whats causing the crash. It should note that I get "location services not available" when launching in 4.3 or below, but not in 5.0 and above. It crashes about the time I try to load a view that has a table. Here is my debugger info... any ideas?
> 2012-09-03 05:43:39.582 Diners[7811:12203] [-[MapViewController viewDidLoad] /Users/user/Documents/Source Code/Working Projects/Diners/Classes/MapViewController.m:48]
bootstrap_look_up failed (44e)
2012-09-03 05:43:42.997 Diners[7811:12203] [-[StripClubsAppDelegate i3fSplashViewBrickDidRemoveFromSuperview:] /Users/user/Documents/Source Code/Working Projects/Diners/Classes/StripClubsAppDelegate.m:77]
2012-09-03 05:43:49.883 Diners[7811:12203] -[UITapGestureRecognizer initWithCoder:]: unrecognized selector sent to instance 0x5fe01b0
2012-09-03 05:43:49.950 Diners[7811:12203] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITapGestureRecognizer initWithCoder:]: unrecognized selector sent to instance 0x5fe01b0'
*** Call stack at first throw:
(
0 CoreFoundation 0x014585a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x01205313 objc_exception_throw + 44
2 CoreFoundation 0x0145a0bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x013c9966 ___forwarding___ + 966
4 CoreFoundation 0x013c9522 _CF_forwarding_prep_0 + 50
5 UIKit 0x0061c9fd UINibDecoderDecodeObjectForValue + 2592
6 UIKit 0x0061d6ac -[UINibDecoder decodeObjectForKey:] + 398
7 UIKit 0x0053293e -[UIRuntimeConnection initWithCoder:] + 153
8 UIKit 0x00532ee7 -[UIRuntimeEventConnection initWithCoder:] + 64
9 UIKit 0x0061c9fd UINibDecoderDecodeObjectForValue + 2592
10 UIKit 0x0061c2f5 UINibDecoderDecodeObjectForValue + 792
11 UIKit 0x0061d6ac -[UINibDecoder decodeObjectForKey:] + 398
12 UIKit 0x00531c36 -[UINib instantiateWithOwner:options:] + 804
13 UIKit 0x00533ab7 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
14 UIKit 0x003e9628 -[UIViewController _loadViewFromNibNamed:bundle:] + 70
15 UIKit 0x003e7134 -[UIViewController loadView] + 120
16 UIKit 0x003e700e -[UIViewController view] + 56
17 UIKit 0x003e5482 -[UIViewController contentScrollView] + 42
18 UIKit 0x003f5f25 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 48
19 UIKit 0x003f4555 -[UINavigationController _layoutViewController:] + 43
20 UIKit 0x003f5870 -[UINavigationController _startTransition:fromViewController:toViewController:] + 524
21 UIKit 0x003f032a -[UINavigationController _startDeferredTransitionIfNeeded] + 266
22 UIKit 0x003f7562 -[UINavigationController pushViewController:transition:forceImmediate:] + 932
23 UIKit 0x003f01c4 -[UINavigationController pushViewController:animated:] + 62
24 Diners 0x00002c83 -[MapViewController goToListByState] + 275
25 UIKit 0x003374fd -[UIApplication sendAction:to:from:forEvent:] + 119
26 UIKit 0x003c7799 -[UIControl sendAction:to:forEvent:] + 67
27 UIKit 0x003c9c2b -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
28 UIKit 0x003c8a1c -[UIControl touchesBegan:withEvent:] + 277
29 UIKit 0x0035bd41 -[UIWindow _sendTouchesForEvent:] + 395
30 UIKit 0x0033cc37 -[UIApplication sendEvent:] + 447
31 UIKit 0x00341f2e _UIApplicationHandleEvent + 7576
32 GraphicsServices 0x01a2e992 PurpleEventCallback + 1550
33 CoreFoundation 0x01439944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
34 CoreFoundation 0x01399cf7 __CFRunLoopDoSource1 + 215
35 CoreFoundation 0x01396f83 __CFRunLoopRun + 979
36 CoreFoundation 0x01396840 CFRunLoopRunSpecific + 208
37 CoreFoundation 0x01396761 CFRunLoopRunInMode + 97
38 GraphicsServices 0x01a2d1c4 GSEventRunModal + 217
39 GraphicsServices 0x01a2d289 GSEventRun + 115
40 UIKit 0x00345c93 UIApplicationMain + 1160
41 Diners 0x0000203d main + 125
42 Diners 0x00001fb5 start + 53
)
terminate called throwing an exception(lldb)
It seems that you add a gesture recognizer using interface builder, this feature is only available for ios5 and more.

Resources