0

AFNetworking升级到3.0.4后,我的APP出现了crash,但并不总是出现crash,我在stackoverflow中没有找到任何信息,这里有一些crash信息,谁能告知原因,thx

Crashed: com.apple.main-thread
0  libobjc.A.dylib                0x181339b9c objc_msgSend + 28
1  Foundation                     0x1825aa3c4 -[NSObject(NSKeyValueObserverNotification) willChangeValueForKey:] + 324
2  Foundation                     0x18278d8d4 -[NSProgress _setValueForKeys:settingBlock:] + 264
3  Foundation                     0x18278dbc4 -[NSProgress setTotalUnitCount:] + 124
4  QCQ                     0x100408e08 -[AFURLSessionManagerTaskDelegate init] (AFURLSessionManager.m:141)
5  QCQ                     0x10040c230 -[AFURLSessionManager addDelegateForDataTask:uploadProgress:downloadProgress:completionHandler:] (AFURLSessionManager.m:621)
6  QCQ                     0x10040d1e0 -[AFURLSessionManager dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler:] (AFURLSessionManager.m:771)
7  QCQ                     0x10040d0b0 -[AFURLSessionManager dataTaskWithRequest:completionHandler:] (AFURLSessionManager.m:756)
8  CoreFoundation                 0x181cc8a60 __invoking___ + 144
9  CoreFoundation                 0x181bc0488 -[NSInvocation invoke] + 284
10 QCQ                     0x100493480 +[QCQService taskWithRequest:andBlock:andInvocation:cacheResponse:] (QCQService.m:316)
11 QCQ                     0x100493cc0 +[QCQService startDataTaskWithParameters:apiPath:HTTPMethod:cachePolicy:completionBlock:] (QCQService.m:397)
12 QCQ                     0x1002be060 +[QCQSystemSettingService noticeCenterDataWithBlock:] (QCQSystemSettingService.m:44)
13 QCQ                     0x10013dc88 -[QCQMoreViewController loadSystemNoticeCount] (QCQMoreViewController.m:97)
14 QCQ                     0x10013d9f0 -[QCQMoreViewController viewWillAppear:] (QCQMoreViewController.m:70)
15 UIKit                          0x186e39374 -[UIViewController _setViewAppearState:isAnimating:] + 628
16 UIKit                          0x186e390e8 -[UIViewController __viewWillAppear:] + 156
17 UIKit                          0x186f65c78 -[UITabBarController transitionFromViewController:toViewController:transition:shouldSetSelected:] + 876
18 UIKit                          0x186f658f8 -[UITabBarController transitionFromViewController:toViewController:] + 68
19 UIKit                          0x186f65730 -[UITabBarController _setSelectedViewController:] + 404
20 UIKit                          0x186f653fc -[UITabBarController setSelectedIndex:] + 136
21 QCQ                     0x1003e072c -[QCQMainViewController setSelectedIndex:] (QCQMainViewController.m:271)
22 QCQ                     0x1003e06cc -[QCQMainViewController tabBar:didSelectItem:] (QCQMainViewController.m:266)
23 UIKit                          0x187030a2c -[UITabBar _sendAction:withEvent:] + 312  
24 UIKit                          0x186e58be8 -[UIApplication sendAction:to:from:forEvent:] + 100
25 UIKit                          0x186e58b64 -[UIControl sendAction:to:forEvent:] + 80
26 UIKit                          0x186e40870 -[UIControl _sendActionsForEvents:withEvent:] + 436
27 UIKit                          0x187030738 -[UITabBar(Static) _buttonUp:] + 112
28 UIKit                          0x186e58be8 -[UIApplication sendAction:to:from:forEvent:] + 100
29 UIKit                          0x186e58b64 -[UIControl sendAction:to:forEvent:] + 80
30 UIKit                          0x186e40870 -[UIControl _sendActionsForEvents:withEvent:] + 436
31 UIKit                          0x186e58454 -[UIControl touchesEnded:withEvent:] + 572
32 UIKit                          0x186e10c0c _UIGestureRecognizerUpdate + 8988
33 CoreFoundation                 0x181c78728 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
34 CoreFoundation                 0x181c764cc __CFRunLoopDoObservers + 372
35 CoreFoundation                 0x181c768fc __CFRunLoopRun + 928
36 CoreFoundation                 0x181ba0c50 CFRunLoopRunSpecific + 384
37 GraphicsServices               0x183488088 GSEventRunModal + 180
38 UIKit                          0x186e8a088 UIApplicationMain + 204
39 QCQ                     0x100064fb0 main (main.m:16)
40 libdispatch.dylib              0x18173e8b8 (Missing)
4

2 回答 2

1

AFNetworking 已修复,您可以在此处查看https://github.com/AFNetworking/AFNetworking/issues/3580

于 2017-01-20T07:50:49.273 回答
0

查看这篇文章:https ://github.com/AFNetworking/AFNetworking/issues/2597

据我了解,您必须持有以下强有力的参考资料:

1:管理器(AFHTTPSessionManager 或 AFURLSessionManager)

2:NSProgress

于 2016-11-04T03:25:14.163 回答