遇到奇怪的错误:"DOMException 105"在IOS应用中.寻找有关如何在我的代码中找到错误的指导 [英] Hitting strange error: "DOMException 105" in IOS app. Looking for guidance on how to locate the bug in my code

查看:51
本文介绍了遇到奇怪的错误:"DOMException 105"在IOS应用中.寻找有关如何在我的代码中找到错误的指导的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在任何地方都找不到此错误的引用!

Having trouble finding any reference to this error - anywhere!

每次都在同一时间发生-就像我单击UITableView行元素一样.下面是堆栈跟踪-有人可以提供有关问题可能是什么和/或如何查找错误的任何建议吗?

It happens at the same point every time - just as I click on a UITableView row element. Below is the stack trace - can someone provide any suggestions as to what the problem might be and/or how to go about finding the bug?

谢谢!

    2016-11-04 10:12:56.096 Golf W[51137:9704786] *** Terminating app due to uncaught exception 'DOMException', reason: '*** DOMException 105'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000010d51b34b __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x000000010cf7c21e objc_exception_throw + 48
    2   CoreFoundation                      0x000000010d51b299 -[NSException raise] + 9
    3   WebCore                             0x0000000111f50072 _ZN7WebCore17raiseDOMExceptionEi + 370
    4   WebCore                             0x0000000111f5008e _ZN7WebCore23raiseTypeErrorExceptionEv + 14
    5   WebCore                             0x0000000111ed842e -[DOMRange setStart:offset:] + 158
    6   UIKit                               0x000000010a319143 -[UIWebDocumentView text] + 292
    7   UIKit                               0x000000010a09a56a _UIViewDescriptionAppendTextIfApplicable + 96
    8   UIKit                               0x000000010a09a71d -[UIView(UIDebugging) description] + 147
    9   CoreFoundation                      0x000000010d4f0d4a -[NSArray descriptionWithLocale:indent:] + 362
    10  Foundation                          0x00000001096ce3be _NSDescriptionWithLocaleFunc + 66
    11  CoreFoundation                      0x000000010d459407 __CFStringAppendFormatCore + 10983
    12  CoreFoundation                      0x000000010d4568f7 _CFStringCreateWithFormatAndArgumentsAux2 + 263
    13  AccessibilityUtilities              0x000000011e001cd7 _AXStringForArgs + 333
    14  UIAccessibility                     0x000000011ea0b908 -[UIView(UIAccessibilityElementTraversal) _accessibilitySubviewsForGettingElementsWithOptions:] + 199
    15  UIAccessibility                     0x000000011ea0c761 -[UIView(UIAccessibilityElementTraversal) _addAccessibilityElementsAndOrderedContainersWithOptions:toCollection:] + 743
    16  UIAccessibility                     0x000000011ea0c7ec -[UIView(UIAccessibilityElementTraversal) _addAccessibilityElementsAndOrderedContainersWithOptions:toCollection:] + 882
    17  UIAccessibility                     0x000000011ea0c7ec -[UIView(UIAccessibilityElementTraversal) _addAccessibilityElementsAndOrderedContainersWithOptions:toCollection:] + 882
    18  UIAccessibility                     0x000000011ea0c7ec -[UIView(UIAccessibilityElementTraversal) _addAccessibilityElementsAndOrderedContainersWithOptions:toCollection:] + 882
    19  UIAccessibility                     0x000000011ea0c7ec -[UIView(UIAccessibilityElementTraversal) _addAccessibilityElementsAndOrderedContainersWithOptions:toCollection:] + 882
    20  UIAccessibility                     0x000000011ea0c7ec -[UIView(UIAccessibilityElementTraversal) _addAccessibilityElementsAndOrderedContainersWithOptions:toCollection:] + 882
    21  UIAccessibility                     0x000000011ea0c7ec -[UIView(UIAccessibilityElementTraversal) _addAccessibilityElementsAndOrderedContainersWithOptions:toCollection:] + 882
    22  UIAccessibility                     0x000000011ea0c7ec -[UIView(UIAccessibilityElementTraversal) _addAccessibilityElementsAndOrderedContainersWithOptions:toCollection:] + 882
    23  UIAccessibility                     0x000000011ea0c7ec -[UIView(UIAccessibilityElementTraversal) _addAccessibilityElementsAndOrderedContainersWithOptions:toCollection:] + 882
    24  UIAccessibility                     0x000000011ea0c7ec -[UIView(UIAccessibilityElementTraversal) _addAccessibilityElementsAndOrderedContainersWithOptions:toCollection:] + 882
    25  UIAccessibility                     0x000000011ea0ccef +[UIView(UIAccessibilityElementTraversal) _accessibilityElementsAndContainersDescendingFromViews:options:sorted:] + 472
    26  UIAccessibility                     0x000000011ea0d0ed -[UIApplication(UIAccessibilityElementTraversal) _accessibilityViewChildrenWithOptions:referenceWindow:] + 128
    27  UIAccessibility                     0x000000011ea0b13e -[NSObject(UIAccessibilityElementTraversal) _accessibilityEnumerateSiblingsWithParent:options:usingBlock:] + 896
    28  UIAccessibility                     0x000000011ea093d4 -[NSObject(UIAccessibilityElementTraversal) _accessibilityElementsInDirectionWithCount:options:] + 723
    29  UIAccessibility                     0x000000011ea16903 -[NSObject(AXPrivCategory) accessibilityAttributeValue:forParameter:] + 1360
    30  UIAccessibility                     0x000000011ea024ae _copyParameterizedAttributeValueCallback + 211
    31  AXRuntime                           0x000000011e140cbc _AXXMIGCopyParameterizedAttributeValue + 216
    32  AXRuntime                           0x000000011e13b6a5 _XCopyParameterizedAttributeValue + 447
    33  AXRuntime                           0x000000011e14a545 mshMIGPerform + 266
    34  CoreFoundation                      0x000000010d4acf89 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
    35  CoreFoundation                      0x000000010d4acf01 __CFRunLoopDoSource1 + 465
    36  CoreFoundation                      0x000000010d4a5045 __CFRunLoopRun + 2389
    37  CoreFoundation                      0x000000010d4a4494 CFRunLoopRunSpecific + 420
    38  GraphicsServices                    0x0000000110352a6f GSEventRunModal + 161
    39  UIKit                               0x0000000109fd3f34 UIApplicationMain + 159
    40  Golf W                           0x00000001087f766f main + 111
    41  libdyld.dylib                       0x000000010e71168d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

推荐答案

在加载Web视图时启用VoiceOver时,我遇到了同样的问题.看起来好像是在完全加载之前引用了Webview中的内容.为了阻止此崩溃的发生,我只是隐藏了可访问性元素,直到加载Webview之后.确保将ViewController设置为 UIWebViewDelegate .然后:

I had the same issue when VoiceOver was on while loading a webview. It seemed like it was referencing the content in the webview before it was fully loaded. To stop this crash from happening, I simply hid the accessibility elements until after the webview was loaded. Be sure to set the ViewController as the UIWebViewDelegate. Then:

ObjC示例:

-(void)viewDidLoad {
   [super viewDidLoad];

   [self.view setAccessibilityElementsHidden:YES];
}

-(void)webViewDidFinishLoad:(UIWebView*)webView {
   [self.view setAccessibilityElementsHidden:NO];
}

快速示例:(您应该使用WKWebView,所以下面为您提供示例).确保将ViewController设置为 WKNavigationDelegate

Swift example: (You should be using WKWebView so I'll give you an example of that below). Be sure to set the ViewController as WKNavigationDelegate

override func viewDidLoad() {
   super.viewDidLoad()

   view.accessibilityElementsHidden = true
}

func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
   view.accessibilityElementsHidden = false
}

希望有帮助.

这篇关于遇到奇怪的错误:"DOMException 105"在IOS应用中.寻找有关如何在我的代码中找到错误的指导的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆