bool _WebTryThreadLock(bool), 0xf0d4e50:

崩溃信息打印:

2014-01-17 17:36:47.932 BuyBuyring[32900:9413] bool _WebTryThreadLock(bool), 0xf0d4e50: Tried to obtain the web lock from a thread other than the main thread or the web thread. This may be a result of calling to UIKit from a secondary thread. Crashing now...
1   _ZL17_WebTryThreadLockb
2   WebThreadLock
3   -[UITextRangeImpl isEmpty]
4   -[UITextRange(UITextSelectionAdditions) _isCaret]
5   -[UITextSelectionView setCaretBlinks:]
6   -[UIKeyboardImpl setCaretBlinks:]
7   -[UIKeyboardImpl setDelegate:force:]
8   -[UIPeripheralHost(UIKitInternal) _reloadInputViewsForResponder:]
9   -[UINavigationController navigationTransitionView:didStartTransition:]
10  -[UINavigationTransitionView transition:fromView:toView:]
11  -[UINavigationTransitionView transition:toView:]
12  -[UINavigationController _startTransition:fromViewController:toViewController:]
13  -[UINavigationController _startDeferredTransitionIfNeeded]
14  -[UINavigationController pushViewController:transition:forceImmediate:]
15  -[UINavigationController pushViewController:animated:]
2014-01-17 17:36:48.114 BuyBuyring[32900:707] (
        {
        merchant =         (
        );
        product = "<ProductItem: 0xf028d30>";
    }
)
16  -[RootViewController searchDelegateMetod:]
17  -[NSThread main]
18  __NSThread__main__
19  _pthread_start
20  thread_start
(lldb)

刚开始不知道这是什么原因,百度了一下,说是在线程中更新了UI界面,崩溃在这里(下图):











然后在调用searchdelegate的方法那里发现自己写错了(粗心啊),本来想要写下面的第一段代码,竟写成了第二段代码:

[self.delegate performSelector:@selector(searchDelegateMetod:) withObject:[dataarray objectAtIndex:indexPath.row]];

[self.delegate performSelectorInBackground:@selector(searchDelegateMetod:) withObject:[dataarray objectAtIndex:indexPath.row]];

所以就出现上面的错误了,呵呵

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。