Note: please don't mark this question as a duplicate, as I've searched the other similar questions but they are slightly different.
After submitting my app for review, it was rejected after it crashed on the app's first screen on an iPad Mini (iOS 11.2). This screen is just a basic registration page, and the app has never been rejected during review any time previously (and the page wasn't recently updated either). Unfortunately I don't have an iPad Mini, and I haven't experienced any crash in my simulator or physical iPhone devices.
Here is the reason for the crash (from what I've gathered, its most likely due to trying to access a variable that no longer exists in memory):
Exception Type: EXC_BAD_ACCESS (SIGKILL)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000020
And here is the thread that crashed:
Thread 0 name: tid_303 Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x00000001820fc1a0 objc_retain + 16 (objc-object.h:440)
1 AXRuntime 0x000000019249ee00 _AXElementForAXUIElementUniqueId + 208 (AXSimpleRuntimeManager.m:0)
2 AXRuntime 0x000000019249ed08 _UIAXElementForAXUIElementRef + 48 (AXSimpleRuntimeManager.m:402)
3 UIAccessibility 0x000000019427ae98 -[NSObject(UIAccessibilityAutomation) _accessibilityUserTestingSnapshotDescendantsWithAttributes:maxDepth:maxChildren:maxArrayCount:] + 1444 (UIAccessibilityAutomation.m:593)
4 UIAccessibility 0x000000019427cf08 -[NSObject(UIAccessibilityAutomation) _accessibilityUserTestingSnapshotWithOptions:] + 640 (UIAccessibilityAutomation.m:779)
5 UIAccessibility 0x0000000194250268 -[NSObject(AXPrivCategory) accessibilityAttributeValue:forParameter:] + 8836 (NSObjectAccessibility.m:4304)
6 UIAccessibility 0x000000019422fc80 _copyParameterizedAttributeValueCallback + 224 (UIAccessibilityRuntime.m:752)
7 AXRuntime 0x00000001924a6ad0 ___AXXMIGCopyParameterizedAttributeValue_block_invoke + 100 (AccessibilityPriv.m:1128)
8 AXRuntime 0x00000001924a6238 _handleNonMainThreadCallback + 60 (AccessibilityPriv.m:363)
9 AXRuntime 0x00000001924a6924 _AXXMIGCopyParameterizedAttributeValue + 344 (AccessibilityPriv.m:1127)
10 AXRuntime 0x00000001924a1220 _XCopyParameterizedAttributeValue + 380 (AccessibilityClientDefsServer.c:1160)
11 AXRuntime 0x00000001924b328c mshMIGPerform + 252 (MachServerHelper.c:448)
12 CoreFoundation 0x0000000182e3fe00 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56 (CFRunLoop.c:1998)
13 CoreFoundation 0x0000000182e3f504 __CFRunLoopDoSource1 + 440 (CFRunLoop.c:2135)
14 CoreFoundation 0x0000000182e3cfd8 __CFRunLoopRun + 2196 (CFRunLoop.c:3150)
15 CoreFoundation 0x0000000182d5cc58 CFRunLoopRunSpecific + 436 (CFRunLoop.c:3245)
16 GraphicsServices 0x0000000184c08f84 GSEventRunModal + 100 (GSEvent.c:2245)
17 UIKit 0x000000018c4b55c4 UIApplicationMain + 236 (UIApplication.m:3956)
18 MyAppiOS 0x0000000102346db0 wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 16494000 (/<unknown>:1)
19 MyAppiOS 0x00000001022b764c UIKit_UIApplication_Main_string___intptr_intptr + 15906380 (UIApplication.cs:79)
20 MyAppiOS 0x00000001022b760c UIKit_UIApplication_Main_string___string_string + 15906316 (UIApplication.cs:63)
21 MyAppiOS 0x00000001013bfc84 MyApp_iOS_Application_Main_string__ + 212100 (/<unknown>:1)
22 MyAppiOS 0x00000001016fd204 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 244
23 MyAppiOS 0x0000000103297148 mono_jit_runtime_invoke + 32551240 (mini-runtime.c:2768)
24 MyAppiOS 0x00000001032fe574 do_runtime_invoke + 32974196 (object.c:2862)
25 MyAppiOS 0x00000001033010e4 do_exec_main_checked + 32985316 (object.c:4690)
26 MyAppiOS 0x000000010327fb90 mono_jit_exec + 32455568 (driver.g.c:1036)
27 MyAppiOS 0x0000000103392da8 xamarin_main + 33582504 (monotouch-main.m:0)
28 MyAppiOS 0x00000001013bf178 main + 209272 (main.m:203)
29 libdyld.dylib 0x000000018287c56c start + 4
And then there are thousands of lines similar to these in the symbolicated crash log:
UIAccessibility: Trying pt: {660.00001764298941, 512.00013971327644}
UIAccessibility: Hit testing found: UIAccessibilityPickerComponent [0x127e7cba0] (null) {{0, 514.5}, {1024, 291}}
UIAccessibility: Is descendant of desired element
UIAccessibility: Received visible point {512, 660} for <UIPickerView: 0x1279d5da0; frame = (0 99; 1024 216); clipsToBounds = YES; layer = <CALayer: 0x1279d5d70>>
UIAccessibility: Checking visibility for UIAccessibilityPickerComponent [0x127e7cba0] (null) {{0, 514.5}, {1024, 291}}
UIAccessibility: Trying pt: {660.00001764298941, 512.00013971327644}
UIAccessibility: Element matched start element
UIAccessibility: Received visible point {512, 660} for UIAccessibilityPickerComponent [0x127e7cba0] (null) {{0, 514.5}, {1024, 291}}
UIAccessibility: Did post notification. notification: (4002) error:0 data:{
event = AnimationsNonActive;
}
UIAccessibility: Did post notification. notification: (4002) error:0 data:{
event = RunLoopIsIdle;
}
UIKit: NavBar: set identifier (null) <UINavigationBar: 0x1279ad2f0; frame = (0 20; 1024 96); autoresize = W; tintColor = UIExtendedSRGBColorSpace 0 0.478431 1 1; layer = <CALayer: 0x1279a4490>>
UIKit: NavBar: top most item <<UINavigationItem: 0x127b9ab00>: title:'Register'> <UINavigationBar: 0x1279ad2f0; frame = (0 20; 1024 96); autoresize = W; tintColor = UIExtendedSRGBColorSpace 0 0.478431 1 1; layer = <CALayer: 0x1279a4490>>
// Note: the line above is the last line that is shown, before showing the crashed thread information
I really don't know what to make of this log. I even checked any other callback methods that may be taking place during the time the first screen is shown, but I just can't figure it out (especially when I can't even get it to crash on my end). Any help would be really appreciated.
Related
I got the app crashed on the iOS Simulator 16.2 when layout 2 text fields horizontally.
Step by step to reproduce on iOS Simulator 16.2:
Environments:
Xcode 14.2
iOS 16.2
Simulator
Step 1: 2 text fields (UITextField) into a horizontal stackview with leading, trailing, top and bottom constraints.
Step 2: Set a long text for both of 2 text fields (appear three dots at the end of the textfield)
Step 3: click on the first text field
Step 4: click on the second text field
Result: The app is crashed at step 4
Error information:
2023-01-30 14:16:57.647873+0700 iOS16dot2TextFieldBug[18988:1850296] *** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 274.667]. Layer: <CALayer:0x60000281a600; position = CGPoint (0 0); bounds = CGRect (0 0; 199.667 48); delegate = <_UIEditMenuListView: 0x7f9bac61b960; frame = (-99.8333 -24; 199.667 48); alpha = 0; layer = <CALayer: 0x60000281a600>>; sublayers = (<CALayer: 0x6000028d3740>); opaque = YES; opacity = 0; shadowOpacity = 0.25; shadowOffset = CGSize (0 3); shadowRadius = 12>'
*** First throw call stack:
(
0 CoreFoundation 0x00007ff8004288ab __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007ff80004dba3 objc_exception_throw + 48
2 CoreFoundation 0x00007ff800428789 -[NSException initWithCoder:] + 0
3 QuartzCore 0x00007ff80897d05e -[CALayer setPosition:] + 388
4 UIKitCore 0x000000010a2d90f4 -[UIView setCenter:] + 253
5 UIKitCore 0x0000000109105c2a -[_UIEditMenuPresentation _displayMenu:reason:] + 1959
6 UIKitCore 0x0000000109105387 -[_UIEditMenuPresentation displayMenu:configuration:] + 81
7 UIKitCore 0x000000010a29772a __58-[UIEditMenuInteraction presentEditMenuWithConfiguration:]_block_invoke + 207
8 UIKitCore 0x000000010a299222 __80-[UIEditMenuInteraction _prepareMenuAtLocation:configuration:completionHandler:]_block_invoke + 87
9 UIKitCore 0x000000010a0085cb __133-[_UIContextMenuInteractionBasedTextContextInteraction _editMenuInteraction:menuForConfiguration:suggestedActions:completionHandler:]_block_invoke + 208
10 UIKitCore 0x000000010a008732 -[_UIContextMenuInteractionBasedTextContextInteraction _querySelectionCommandsForConfiguration:suggestedActions:completionHandler:] + 325
11 UIKitCore 0x000000010a0084da -[_UIContextMenuInteractionBasedTextContextInteraction _editMenuInteraction:menuForConfiguration:suggestedActions:completionHandler:] + 126
12 UIKitCore 0x000000010a29918f -[UIEditMenuInteraction _prepareMenuAtLocation:configuration:completionHandler:] + 296
13 UIKitCore 0x000000010a297485 -[UIEditMenuInteraction presentEditMenuWithConfiguration:] + 240
14 UIKitCore 0x000000010a008d6d -[_UIContextMenuInteractionBasedTextContextInteraction presentSelectionCommandsWithConfiguration:] + 94
15 UIKitCore 0x000000010a05cb6f -[UITextSelectionView _presentEditMenuWithPreferredDirection:replacements:] + 103
16 UIKitCore 0x000000010a05c792 -[UITextSelectionView _showCommandsWithReplacements:isForContextMenu:forDictation:arrowDirection:] + 1487
17 UIKitCore 0x000000010a05c157 __77-[UITextSelectionView _showCommandsWithReplacements:forDictation:afterDelay:]_block_invoke + 262
18 libdispatch.dylib 0x000000010246bf5b _dispatch_client_callout + 8
19 libdispatch.dylib 0x000000010246f164 _dispatch_continuation_pop + 836
20 libdispatch.dylib 0x0000000102486d2e _dispatch_source_invoke + 2198
21 libdispatch.dylib 0x000000010247cbc7 _dispatch_main_queue_drain + 1065
22 libdispatch.dylib 0x000000010247c790 _dispatch_main_queue_callback_4CF + 31
23 CoreFoundation 0x00007ff800387b1f __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
24 CoreFoundation 0x00007ff800382436 __CFRunLoopRun + 2482
25 CoreFoundation 0x00007ff8003816a7 CFRunLoopRunSpecific + 560
26 GraphicsServices 0x00007ff809cb128a GSEventRunModal + 139
27 UIKitCore 0x0000000109ccbad3 -[UIApplication _run] + 994
28 UIKitCore 0x0000000109cd09ef UIApplicationMain + 123
29 libswiftUIKit.dylib 0x0000000102a18c72 $s5UIKit17UIApplicationMainys5Int32VAD_SpySpys4Int8VGGSgSSSgAJtF + 98
30 iOS16dot2TextFieldBug 0x000000010223c908 $sSo21UIApplicationDelegateP5UIKitE4mainyyFZ + 104
31 iOS16dot2TextFieldBug 0x000000010223c897 $s21iOS16dot2TextFieldBug11AppDelegateC5$mainyyFZ + 39
32 iOS16dot2TextFieldBug 0x000000010223c988 main + 24
33 dyld 0x00000001025912bf start_sim + 10
34 ??? 0x0000000102375310 0x0 + 4332147472
)
libc++abi: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 274.667]. Layer: <CALayer:0x60000281a600; position = CGPoint (0 0); bounds = CGRect (0 0; 199.667 48); delegate = <_UIEditMenuListView: 0x7f9bac61b960; frame = (-99.8333 -24; 199.667 48); alpha = 0; layer = <CALayer: 0x60000281a600>>; sublayers = (<CALayer: 0x6000028d3740>); opaque = YES; opacity = 0; shadowOpacity = 0.25; shadowOffset = CGSize (0 3); shadowRadius = 12>'
terminating with uncaught exception of type NSException
CoreSimulator 857.14 - Device: iPhone 14 (BA2F723B-EEE6-48D0-89DD-9DAEC9E9A11E) - Runtime: iOS 16.2 (20C52) - DeviceType: iPhone 14
I just got this issue on iOS Simulator 16.2. Everything is normal on the lower than iOS 16.2.
Full of code here
I don't know this is an issue from iOS 16.2 or not.
Have you seen this issue? Please help me fix it if you can.
Thank you.
It certainly appears to be a bug.
One work-around is to add this in viewDidLoad() (or set in Storyboard):
[emailTextField, websiteTextField].forEach {
if let tf = $0 {
tf.autocorrectionType = .no
tf.spellCheckingType = .no
}
}
Your example is looking for "email" and "website" entries, so you probably don't want/need those anyway.
I got the app crashed on the iOS Simulator 16.2 when layout 2 text fields horizontally.
Step by step to reproduce on iOS Simulator 16.2:
Environments:
Xcode 14.2
iOS 16.2
Simulator
Step 1: 2 text fields (UITextField) into a horizontal stackview with leading, trailing, top and bottom constraints.
Step 2: Set a long text for both of 2 text fields (appear three dots at the end of the textfield)
Step 3: click on the first text field
Step 4: click on the second text field
Result: The app is crashed at step 4
Error information:
2023-01-30 14:16:57.647873+0700 iOS16dot2TextFieldBug[18988:1850296] *** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 274.667]. Layer: <CALayer:0x60000281a600; position = CGPoint (0 0); bounds = CGRect (0 0; 199.667 48); delegate = <_UIEditMenuListView: 0x7f9bac61b960; frame = (-99.8333 -24; 199.667 48); alpha = 0; layer = <CALayer: 0x60000281a600>>; sublayers = (<CALayer: 0x6000028d3740>); opaque = YES; opacity = 0; shadowOpacity = 0.25; shadowOffset = CGSize (0 3); shadowRadius = 12>'
*** First throw call stack:
(
0 CoreFoundation 0x00007ff8004288ab __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007ff80004dba3 objc_exception_throw + 48
2 CoreFoundation 0x00007ff800428789 -[NSException initWithCoder:] + 0
3 QuartzCore 0x00007ff80897d05e -[CALayer setPosition:] + 388
4 UIKitCore 0x000000010a2d90f4 -[UIView setCenter:] + 253
5 UIKitCore 0x0000000109105c2a -[_UIEditMenuPresentation _displayMenu:reason:] + 1959
6 UIKitCore 0x0000000109105387 -[_UIEditMenuPresentation displayMenu:configuration:] + 81
7 UIKitCore 0x000000010a29772a __58-[UIEditMenuInteraction presentEditMenuWithConfiguration:]_block_invoke + 207
8 UIKitCore 0x000000010a299222 __80-[UIEditMenuInteraction _prepareMenuAtLocation:configuration:completionHandler:]_block_invoke + 87
9 UIKitCore 0x000000010a0085cb __133-[_UIContextMenuInteractionBasedTextContextInteraction _editMenuInteraction:menuForConfiguration:suggestedActions:completionHandler:]_block_invoke + 208
10 UIKitCore 0x000000010a008732 -[_UIContextMenuInteractionBasedTextContextInteraction _querySelectionCommandsForConfiguration:suggestedActions:completionHandler:] + 325
11 UIKitCore 0x000000010a0084da -[_UIContextMenuInteractionBasedTextContextInteraction _editMenuInteraction:menuForConfiguration:suggestedActions:completionHandler:] + 126
12 UIKitCore 0x000000010a29918f -[UIEditMenuInteraction _prepareMenuAtLocation:configuration:completionHandler:] + 296
13 UIKitCore 0x000000010a297485 -[UIEditMenuInteraction presentEditMenuWithConfiguration:] + 240
14 UIKitCore 0x000000010a008d6d -[_UIContextMenuInteractionBasedTextContextInteraction presentSelectionCommandsWithConfiguration:] + 94
15 UIKitCore 0x000000010a05cb6f -[UITextSelectionView _presentEditMenuWithPreferredDirection:replacements:] + 103
16 UIKitCore 0x000000010a05c792 -[UITextSelectionView _showCommandsWithReplacements:isForContextMenu:forDictation:arrowDirection:] + 1487
17 UIKitCore 0x000000010a05c157 __77-[UITextSelectionView _showCommandsWithReplacements:forDictation:afterDelay:]_block_invoke + 262
18 libdispatch.dylib 0x000000010246bf5b _dispatch_client_callout + 8
19 libdispatch.dylib 0x000000010246f164 _dispatch_continuation_pop + 836
20 libdispatch.dylib 0x0000000102486d2e _dispatch_source_invoke + 2198
21 libdispatch.dylib 0x000000010247cbc7 _dispatch_main_queue_drain + 1065
22 libdispatch.dylib 0x000000010247c790 _dispatch_main_queue_callback_4CF + 31
23 CoreFoundation 0x00007ff800387b1f __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
24 CoreFoundation 0x00007ff800382436 __CFRunLoopRun + 2482
25 CoreFoundation 0x00007ff8003816a7 CFRunLoopRunSpecific + 560
26 GraphicsServices 0x00007ff809cb128a GSEventRunModal + 139
27 UIKitCore 0x0000000109ccbad3 -[UIApplication _run] + 994
28 UIKitCore 0x0000000109cd09ef UIApplicationMain + 123
29 libswiftUIKit.dylib 0x0000000102a18c72 $s5UIKit17UIApplicationMainys5Int32VAD_SpySpys4Int8VGGSgSSSgAJtF + 98
30 iOS16dot2TextFieldBug 0x000000010223c908 $sSo21UIApplicationDelegateP5UIKitE4mainyyFZ + 104
31 iOS16dot2TextFieldBug 0x000000010223c897 $s21iOS16dot2TextFieldBug11AppDelegateC5$mainyyFZ + 39
32 iOS16dot2TextFieldBug 0x000000010223c988 main + 24
33 dyld 0x00000001025912bf start_sim + 10
34 ??? 0x0000000102375310 0x0 + 4332147472
)
libc++abi: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 274.667]. Layer: <CALayer:0x60000281a600; position = CGPoint (0 0); bounds = CGRect (0 0; 199.667 48); delegate = <_UIEditMenuListView: 0x7f9bac61b960; frame = (-99.8333 -24; 199.667 48); alpha = 0; layer = <CALayer: 0x60000281a600>>; sublayers = (<CALayer: 0x6000028d3740>); opaque = YES; opacity = 0; shadowOpacity = 0.25; shadowOffset = CGSize (0 3); shadowRadius = 12>'
terminating with uncaught exception of type NSException
CoreSimulator 857.14 - Device: iPhone 14 (BA2F723B-EEE6-48D0-89DD-9DAEC9E9A11E) - Runtime: iOS 16.2 (20C52) - DeviceType: iPhone 14
I just got this issue on iOS Simulator 16.2. Everything is normal on the lower than iOS 16.2.
Full of code here
I don't know this is an issue from iOS 16.2 or not.
Have you seen this issue? Please help me fix it if you can.
Thank you.
It certainly appears to be a bug.
One work-around is to add this in viewDidLoad() (or set in Storyboard):
[emailTextField, websiteTextField].forEach {
if let tf = $0 {
tf.autocorrectionType = .no
tf.spellCheckingType = .no
}
}
Your example is looking for "email" and "website" entries, so you probably don't want/need those anyway.
My app crashed about 200 times per month on iOS 15, and I failed to solve it.
The crash reports shows like following:
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000001f12d313c
Thread 0 Crashed:
0 libsystem_platform.dylib 0x00000001f12d313c _os_unfair_lock_corruption_abort + 88
1 libsystem_platform.dylib 0x00000001f12cda20 _os_unfair_lock_lock_slow + 320
2 QuartzCore 0x000000018441c7c4 CA::Display::DisplayTimingsControl::granularity+ 100292 (unsigned int) + 40
3 QuartzCore 0x000000018456b99c CA::Display::DisplayLink::timer_status_callback+ 1472924 (_CADisplayTimer*, CADisplayTimerAction, unsigned long long, unsigned long long, void*) + 692
4 QuartzCore 0x000000018441b678 display_timer_callback+ 95864 (__CFMachPort*, void*, long, void*) + 272
5 CoreFoundation 0x00000001806bf390 __CFMachPortPerform + 176
6 CoreFoundation 0x0000000180702724 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 60
7 CoreFoundation 0x0000000180705f30 __CFRunLoopDoSource1 + 596
8 CoreFoundation 0x00000001806bfe0c __CFRunLoopRun + 2380
9 CoreFoundation 0x00000001806d33b8 CFRunLoopRunSpecific + 600
10 GraphicsServices 0x000000019c06338c GSEventRunModal + 164
11 UIKitCore 0x00000001830736a8 0x182b5a000 + 5346984
12 UIKitCore 0x0000000182df27f4 UIApplicationMain + 2092
13 IBUWireless 0x0000000104700584 main + 17796 (main.m:44)
14 (null) 0x00000001083d9a24 0x0 + 4433222180
I guess it's because a CADisPlayLink has been dealloced wrongly, but I can't figure out which one.
The source code of apple's lock is https://github.com/apple/darwin-libplatform/blob/main/src/os/lock.c
Is Apple's CADisplayLayer Opensourced? How can I fix this crash?
This crash occurs due to a dangling pointer. When any variable or object is trying to access an object that's already been deallocated, this crash occurs.
check code and trace line by line.
In my app,push to a view controller contains wkwebview and use long press gesture to show the select text menu,then pop the view controller make web view to dealloc.And then push to another web view controller,send a gesture to webview,then crashed.It's occurd on iOS 14 beta 2.I have report the bug to apple.It's exist some way workround?
Date/Time: 2020-07-13 18:46:00.715 +0800
OS Version: Mac OS X 10.15.5 (19F101)
Report Version: 12
Bridge OS Version: 4.5 (17P5300)
Anonymous UUID: DC589A65-FAD9-1105-69E1-F841F6FEE2E3
Sleep/Wake UUID: D3E2CB0D-6218-4CC0-85C5-86C8DAE0B4BC
Time Awake Since Boot: 240000 seconds
Time Since Wake: 33000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000022
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [50050]
VM Regions Near 0x22:
-->
__TEXT 000000010f792000-000000010f796000 [ 16K] r-x/r-x SM=COW /Users/USER/Library/Developer/CoreSimulator/Devices/4CDD359F-0A7E-4E13-A2CE-0DA825D90269/data/Containers/Bundle/Application/D19A53D4-CA61-4FCA-9F2D-ECAEA1A0D9C3/TestWebView.app/TestWebView
Application Specific Information:
CoreSimulator 725.10 - Device: iPhone 8 (4CDD359F-0A7E-4E13-A2CE-0DA825D90269) - Runtime: iOS 14.0 (18A5319g) - DeviceType: iPhone 8
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x0000000110d38b88 objc_retain + 8
1 com.apple.UIKitCore 0x00000001219ec716 -[UIInputResponderController prepareToMoveKeyboardForInputViewSet:animationStyle:] + 348
2 com.apple.UIKitCore 0x00000001219eacdf -[UIInputResponderController setKeyWindowSceneInputViews:animationStyle:] + 623
3 com.apple.UIKitCore 0x00000001219eaa45 -[UIInputResponderController setInputViews:animationStyle:] + 200
4 com.apple.UIKitCore 0x00000001219ec000 -[UIInputResponderController setInputViews:animated:] + 88
5 com.apple.UIKitCore 0x00000001219ec067 -[UIInputResponderController setInputViews:] + 68
6 com.apple.UIKitCore 0x00000001219e98a9 __74-[UIInputResponderController _reloadInputViewsForKeyWindowSceneResponder:]_block_invoke.605 + 30
7 com.apple.UIKitCore 0x00000001219e94b2 -[UIInputResponderController _reloadInputViewsForKeyWindowSceneResponder:] + 3982
8 com.apple.UIKitCore 0x00000001219e8507 -[UIInputResponderController _reloadInputViewsForResponder:] + 148
9 com.apple.UIKitCore 0x0000000121fdb741 -[UIResponder(UIResponderInputViewAdditions) reloadInputViews] + 133
10 com.apple.UIKitCore 0x0000000121fd6af9 -[UIResponder becomeFirstResponder] + 806
11 com.apple.UIKitCore 0x00000001224df189 -[UIView(Hierarchy) becomeFirstResponder] + 145
12 com.apple.WebKit 0x000000010fed7f9c -[WKContentView(WKInteraction) becomeFirstResponderForWebView] + 136
13 com.apple.WebKit 0x000000010fac30c8 -[WKWebView(WKViewInternalIOS) becomeFirstResponder] + 133
14 com.apple.UIKitCore 0x00000001222870b7 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) setFirstResponderIfNecessaryActivatingSelection:] + 195
15 com.apple.UIKitCore 0x00000001222881e7 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) checkEditabilityAndSetFirstResponderIfNecessary] + 376
16 com.apple.UIKitCore 0x0000000122257e63 -[UITextIndirectNonEditableInteraction willBeginGesture] + 128
17 com.apple.UIKitCore 0x0000000121e16573 -[_UIKeyboardBasedNonEditableTextSelectionInteraction oneFingerForcePan:] + 1339
18 com.apple.UIKitCore 0x0000000121aed683 -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] + 49
19 com.apple.UIKitCore 0x0000000121af7904 _UIGestureRecognizerSendTargetActions + 100
20 com.apple.UIKitCore 0x0000000121af41cb _UIGestureRecognizerSendActions + 294
21 com.apple.UIKitCore 0x0000000121af352a -[UIGestureRecognizer _updateGestureForActiveEvents] + 725
22 com.apple.UIKitCore 0x0000000121ae5a72 _UIGestureEnvironmentUpdate + 2652
23 com.apple.CoreFoundation 0x0000000110dfc277 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
24 com.apple.CoreFoundation 0x0000000110df6dae __CFRunLoopDoObservers + 487
25 com.apple.CoreFoundation 0x0000000110df72df __CFRunLoopRun + 1137
26 com.apple.CoreFoundation 0x0000000110df6aba CFRunLoopRunSpecific + 538
27 com.apple.GraphicsServices 0x00000001139fcdb3 GSEventRunModal + 139
28 com.apple.UIKitCore 0x0000000121fa27fe -[UIApplication _run] + 912
29 com.apple.UIKitCore 0x0000000121fa7e1e UIApplicationMain + 1570
30 jkl.TestWebView 0x000000010f793fa2 main + 114 (main.m:17)
31 libdyld.dylib 0x0000000119d4395d start + 1
Thread 1:
I met the same problem.
It seems -[UIInputViewSet restorableResponder] returns a wild pointer. This property is neither weak nor strong.
I added a symbol breakpoint to -[UIInputViewSet restorableResponder] and -[UIInputViewSet setRestorableResponder:], the assembly code shows they have neither store_weak nor store_strong code.
I used a workaround, hook -[UIInputViewSet restorableResponder] and return nil. Maybe it will cause another problem. But after testing it seems work well.
This is one crash log I've downloaded from iTunesConnect website.
Incident Identifier: 20D5CB0F-58BE-41E5-B3F6-9BC8091E518C
Hardware Model: iPhone4,1
Process: iPill [2006]
Path: /var/mobile/Applications/4567191D-1013-40F3-A02A-0B3C2552FCD3/iPill.app/iPill
Identifier: iPill
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2012-07-12 20:59:23.716 +0200
OS Version: iPhone OS 5.1.1 (9B206)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x3558688f __exceptionPreprocess + 163
1 libobjc.A.dylib 0x3792d259 objc_exception_throw + 33
2 CoreFoundation 0x354cf9db -[__NSArrayM objectAtIndex:] + 271
3 iPill 0x0008225b -[ProssimeDosi tableView:cellForRowAtIndexPath:] (ProssimeDosi.m:314)
4 UIKit 0x3301aefb -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 547
5 UIKit 0x33019fd9 -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1077
6 UIKit 0x33019763 -[UITableView layoutSubviews] + 207
7 UIKit 0x32fbdf37 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 183
8 CoreFoundation 0x354e51fb -[NSObject performSelector:withObject:] + 43
9 QuartzCore 0x323b5aa5 -[CALayer layoutSublayers] + 217
10 QuartzCore 0x323b56bd CA::Layer::layout_if_needed(CA::Transaction*) + 217
11 QuartzCore 0x323b9843 CA::Context::commit_transaction(CA::Transaction*) + 227
12 QuartzCore 0x323b957f CA::Transaction::commit() + 315
13 QuartzCore 0x323b14b9 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 57
14 CoreFoundation 0x3555ab1b __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 19
15 CoreFoundation 0x35558d57 __CFRunLoopDoObservers + 259
16 CoreFoundation 0x355590b1 __CFRunLoopRun + 761
17 CoreFoundation 0x354dc4a5 CFRunLoopRunSpecific + 301
18 CoreFoundation 0x354dc36d CFRunLoopRunInMode + 105
19 GraphicsServices 0x37178439 GSEventRunModal + 137
20 UIKit 0x32fe8cd5 UIApplicationMain + 1081
21 iPill 0x000799b7 main (main.m:16)
22 iPill 0x0007996c 0x78000 + 6508
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x35e3c32c __pthread_kill + 8
1 libsystem_c.dylib 0x32988208 pthread_kill + 48
2 libsystem_c.dylib 0x32981298 abort + 88
3 libc++abi.dylib 0x3593ef64 abort_message + 40
4 libc++abi.dylib 0x3593c346 _ZL17default_terminatev + 18
5 libobjc.A.dylib 0x3792d350 _objc_terminate + 140
6 libc++abi.dylib 0x3593c3be _ZL19safe_handler_callerPFvvE + 70
7 libc++abi.dylib 0x3593c44a std::terminate() + 14
8 libc++abi.dylib 0x3593d81e __cxa_rethrow + 82
9 libobjc.A.dylib 0x3792d2a2 objc_exception_rethrow + 6
10 CoreFoundation 0x354dc506 CFRunLoopRunSpecific + 398
11 CoreFoundation 0x354dc366 CFRunLoopRunInMode + 98
12 GraphicsServices 0x37178432 GSEventRunModal + 130
13 UIKit 0x32fe8cce UIApplicationMain + 1074
14 iPill 0x000799b0 main (main.m:16)
15 iPill 0x00079964 0x78000 + 6500
I've pasted only thread 0 because it seems it is the one which crashed.
This is all new to me and I have no idea how to interpret this log and solve the problem.
I've tested my App on my iPhones 4 and 4s and on a 3GS of a friend of mine and we didn't see any crash.
Now I'm getting 1 star reviews from some people saying iPill is crashing a lot.
Any help will be really appreciated.
Thanks.
I'd say to start in your tables cellForRowAtIndexpath method.
I'd hazard a guess that there's an issue with your data model and it's calling data from an array that is empty.
Just from this crashlog it looks as if you're having an out-of-bounds problem triggered by line 314 of ProssimeDosi.m due to something requesting more data than is available.
See the accepted answer here for a more elaborate explanation: Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSMutableArray objectAtIndex:]: index 1 beyond bounds [0 .. 0]'