通常应用程序效果很好,但我在Crashlytics中收到了问题。它发生在一天1-2次。适用于2k-3k用户。应用程序适用于iOS 7及更高版本。这里堆栈的应用程序崩溃的线程
Thread : Crashed: ACAccountStoreReply
0 JavaScriptCore 0x000000018546f418 WTFCrash + 72
1 JavaScriptCore 0x000000018546f410 WTFCrash + 64
2 WebCore 0x000000018d7f22a4 _WebTryThreadLock(bool) + 256
3 WebCore 0x000000018d7f3298 WebThreadLock + 104
4 UIKit 0x00000001871e2e30 -[UIWebView _webViewCommonInitWithWebView:scalesPageToFit:shouldEnableReachability:] + 140
5 UIKit 0x000000018732a418 -[UIWebView initWithCoder:] + 132
6 UIKit 0x000000018740b90c UINibDecoderDecodeObjectForValue + 816
7 UIKit 0x000000018740b5cc -[UINibDecoder decodeObjectForKey:] + 120
8 UIKit 0x0000000187357714 -[UIRuntimeConnection initWithCoder:] + 128
9 UIKit 0x000000018740b90c UINibDecoderDecodeObjectForValue + 816
10 UIKit 0x000000018740b874 UINibDecoderDecodeObjectForValue + 664
11 UIKit 0x000000018740b5cc -[UINibDecoder decodeObjectForKey:] + 120
12 UIKit 0x0000000187356cb8 -[UINib instantiateWithOwner:options:] + 952
13 UIKit 0x000000018729b878 -[UIViewController _loadViewFromNibNamed:bundle:] + 280
14 UIKit 0x0000000186f9c488 -[UIViewController loadViewIfRequired] + 88
15 UIKit 0x0000000186f9c3f4 -[UIViewController view] + 32
16 UIKit 0x000000018701b194 -[UIViewController viewControllerForRotation] + 68
17 UIKit 0x000000018701b0cc -[UIViewController _visibleView] + 84
18 UIKit 0x0000000187093614 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:animation:] + 4396
19 UIKit 0x0000000187091a9c -[UIViewController presentViewController:withTransition:completion:] + 5184
20 MYAPP 0x0000000100021fb8 -[RegularTweetsViewController didSelectContexMenuInCell:withURL:] (RegularTweetsViewController.m:516)
21 MYAPP 0x0000000100021ab4 __55-[RegularTweetsViewController tweetCellRetweetPressed:]_block_invoke233 (RegularTweetsViewController.m:476)
22 MYAPP 0x0000000100023af8 __74-[RegularTweetsViewController retweetWithData:andAccount:success:failure:]_block_invoke (RegularTweetsViewController.m:841)
23 libdispatch.dylib 0x0000000190ab4014 _dispatch_call_block_and_release + 24
24 libdispatch.dylib 0x0000000190ab3fd4 _dispatch_client_callout + 16
25 libdispatch.dylib 0x0000000190ab9654 _dispatch_async_redirect_invoke + 152
26 libdispatch.dylib 0x0000000190ab3fd4 _dispatch_client_callout + 16
27 libdispatch.dylib 0x0000000190abb2b8 _dispatch_root_queue_drain + 556
28 libdispatch.dylib 0x0000000190abb4fc _dispatch_worker_thread2 + 76
29 libsystem_pthread.dylib 0x0000000190c496bc _pthread_wqthread + 356
App在这里崩溃了。在这个功能中:
20 MYAPP 0x0000000100021fb8 -[RegularTweetsViewController didSelectContexMenuInCell:withURL:] (RegularTweetsViewController.m:516)
功能代码:
- (void) didSelectContexMenuInCell:(TweetCell *)tweetCell withURL:(NSURL *)url
{
NSIndexPath *indexPath = [self.tableView indexPathForCell:tweetCell];
if (indexPath != nil)
{//516 line **HERE CRASH**
TweetVMData *data = [self.viewModel dataForRowAtIndexPath:indexPath];
WebViewController *webController = [[WebViewController alloc] initWithURL:url];
[self presentViewController:webController animated:YES completion:nil];
data.openMenu = NO;
TweetsViewModel *viewModel = (TweetsViewModel *)self.viewModel;
viewModel.indexPathOfOpenMenu = nil;
viewModel.hasOpenMenu = NO;
}
}
我不知道为什么会这样。