I get CALayer NAN crash. I’ve a scroll view, two textfields (as an example A and B) inside and inside the scroll view under the 2 textfields, I’ve a tableView which goes so as to add textfields dynamically (say C and D).
Steps: Once I click on on A it opens a brand new controller and click on on deciding on an possibility, an API will get referred to as and on the primary display (of the scrollView and A and B textfields), tableview provides two textfields C and D. Once I click on on C, then once more on textfield A, it crashes.
Under are the crash logs –
*** Terminating app attributable to uncaught exception 'CALayerInvalidGeometry', motive: 'CALayer place accommodates NaN: [nan 428.667]. Layer: <CALayer:0x600001fb0220; place = CGPoint (0 0); bounds = CGRect (0 0; 92.6667 47); delegate = <_UIEditMenuListView: 0x7fd1ed2ba900; body = (-46.3333 -23.5; 92.6667 47); alpha = 0; layer = <CALayer: 0x600001fb0220>>; sublayers = (<CALayer: 0x600001fbd900>); opaque = YES; opacity = 0; shadowOpacity = 0.25; shadowOffset = CGSize (0 3); shadowRadius = 12>'
*** First throw name stack:
(
0 CoreFoundation 0x000000011b1f68ab __exceptionPreprocess + 242
1 libobjc.A.dylib 0x000000011500dba3 objc_exception_throw + 48
2 CoreFoundation 0x000000011b1f6789 -[NSException initWithCoder:] + 0
3 QuartzCore 0x000000011409c05e -[CALayer setPosition:] + 388
4 UIKitCore 0x000000012eeb00f4 -[UIView setCenter:] + 253
5 UIKitCore 0x000000012dcdcc2a -[_UIEditMenuPresentation _displayMenu:reason:] + 1959
6 UIKitCore 0x000000012dcdc387 -[_UIEditMenuPresentation displayMenu:configuration:] + 81
7 UIKitCore 0x000000012ee6e72a __58-[UIEditMenuInteraction presentEditMenuWithConfiguration:]_block_invoke + 207
8 UIKitCore 0x000000012ee70222 __80-[UIEditMenuInteraction _prepareMenuAtLocation:configuration:completionHandler:]_block_invoke + 87
9 UIKitCore 0x000000012ebdf5cb __133-[_UIContextMenuInteractionBasedTextContextInteraction _editMenuInteraction:menuForConfiguration:suggestedActions:completionHandler:]_block_invoke + 208
10 UIKitCore 0x000000012ebdf732 -[_UIContextMenuInteractionBasedTextContextInteraction _querySelectionCommandsForConfiguration:suggestedActions:completionHandler:] + 325
11 UIKitCore 0x000000012ebdf4da -[_UIContextMenuInteractionBasedTextContextInteraction _editMenuInteraction:menuForConfiguration:suggestedActions:completionHandler:] + 126
12 UIKitCore 0x000000012ee7018f -[UIEditMenuInteraction _prepareMenuAtLocation:configuration:completionHandler:] + 296
13 UIKitCore 0x000000012ee6e485 -[UIEditMenuInteraction presentEditMenuWithConfiguration:] + 240
14 UIKitCore 0x000000012ebdfd6d -[_UIContextMenuInteractionBasedTextContextInteraction presentSelectionCommandsWithConfiguration:] + 94
15 UIKitCore 0x000000012ec33b6f -[UITextSelectionView _presentEditMenuWithPreferredDirection:replacements:] + 103
16 UIKitCore 0x000000012ec33792 -[UITextSelectionView _showCommandsWithReplacements:isForContextMenu:forDictation:arrowDirection:] + 1487
17 UIKitCore 0x000000012ec33157 __77-[UITextSelectionView _showCommandsWithReplacements:forDictation:afterDelay:]_block_invoke + 262
18 libdispatch.dylib 0x0000000117d4bf5b _dispatch_client_callout + 8
19 libdispatch.dylib 0x0000000117d4f164 _dispatch_continuation_pop + 836
20 libdispatch.dylib 0x0000000117d66d2e _dispatch_source_invoke + 2198
21 libdispatch.dylib 0x0000000117d5cbc7 _dispatch_main_queue_drain + 1065
22 libdispatch.dylib 0x0000000117d5c790 _dispatch_main_queue_callback_4CF + 31
23 CoreFoundation 0x000000011b155b1f __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
24 CoreFoundation 0x000000011b150436 __CFRunLoopRun + 2482
25 CoreFoundation 0x000000011b14f6a7 CFRunLoopRunSpecific + 560
26 GraphicsServices 0x000000011f05728a GSEventRunModal + 139
27 UIKitCore 0x000000012e8a2ad3 -[UIApplication _run] + 994
28 UIKitCore 0x000000012e8a79ef UIApplicationMain + 123
29 libswiftUIKit.dylib 0x000000011c5a1c72 $s5UIKit17UIApplicationMainys5Int32VAD_SpySpys4Int8VGGSgSSSgAJtF + 98
30 U App 0x0000000102c08b78 $s12U_AppySpySpys4Int8VGGXEfU_ + 168
31 U App 0x0000000102c08ed0 _swift_se0333_UnsafeMutablePointer_withMemoryRebound + 800
32 U App 0x0000000102c08a79 essential + 185
33 dyld 0x0000000111a2d2bf start_sim + 10
34 ??? 0x00000002096bd310 0x0 + 8747995920
)
libc++abi: terminating with uncaught exception of kind NSException
Clicking on UITextFields causes the above crash and it occurs each time.
I checked for code which can provide me undefined values (equivalent to divide by 0, and so forth.) however did not discover any options.
I attempted every little thing and it has been 2 weeks already, any assist is de facto appreciated!