ios - 使用 afnetworking 3.0.4 时发生崩溃,[NSProgress setTotalUnitCount :], 谁能告诉我原因

标签 ios xcode afnetworking-3

我升级AFNetworking到3.0.4后,我的APP出现了崩溃,但崩溃并不总是发生,我在堆栈溢出中没有找到任何信息,这里有一些崩溃信息,有人可以告知原因,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)

最佳答案

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

关于ios - 使用 afnetworking 3.0.4 时发生崩溃,[NSProgress setTotalUnitCount :], 谁能告诉我原因,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37879356/

相关文章:

iphone - UIImageJPEGRepresentation 在视网膜显示屏上提供 2x 图像

ios - 为什么我的 iPhone 上没有收到任何通知?

ios - 按下主页按钮时启动主 ViewController

ios - 调整标签大小以适合值

ios - 如何检查用户是否连接到 WiFi?

ios - 在包含部署目标 iOS 7.0 及更早版本的应用程序中使用嵌入式框架

ios - Apple Mach-O 链接器错误 - 链接器命令失败,退出代码为 1

ios - 在 AFNetworking 3.0 中发送嵌套 NSMutableDictionary 作为 POST 请求的参数

ios - 如何从 NSURLSessionTask 获取响应字符串