简体   繁体   English

使用afnetworking 3.0.4发生崩溃,[NSProgress setTotalUnitCount:],任何可以告诉我原因的人

[英]there is a crash use the afnetworking 3.0.4 , [NSProgress setTotalUnitCount:], anyone who can tell me the reason

After I upgrade AFNetworking to 3.0.4, there was a crash in my APP,but the crash not always occur, i don't find any information in stack overflow , here are some crash information, someone who can inform the reason ,thx 将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

Check out this post: https://github.com/AFNetworking/AFNetworking/issues/2597 看看这篇文章: https : //github.com/AFNetworking/AFNetworking/issues/2597

As I understand you have to hold a strong reference of: 据我了解,您必须牢记以下内容:

1: The Manager (AFHTTPSessionManager or AFURLSessionManager) 1:管理器(AFHTTPSessionManager或AFURLSessionManager)

2: NSProgress 2:NSProgress

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AFNetworking 3-如何初始化NSProgress - AFNetworking 3 - How initialize NSProgress 谁能告诉我该功能的影响? - who can tell me what the function's affect? 谁能告诉我为什么滚动之前不显示tableview数据? - Can anyone tell me why tableview data are not displaying until scroll? 谁能告诉我为什么addObject给出不稳定的结果? - Can anyone tell me why addObject is giving erratic results? 未知崩溃原因(附带CrashReport)SIGTRAP。 AFNetworking? - Unknown crash reason (with CrashReport attached) SIGTRAP. AFNetworking? 有没有人可以帮助我完成我的 Swift 项目? 我有一个 Firebase 错误 - Is there anyone who can help me with my Swift Project? Ive got an Firebase error 我在此Objective-C方法中发生内存泄漏,有人可以告诉我在哪里吗? - I have a memory leak in this objective-c method, can anyone tell me where? 谁能告诉我如何在Objective-c中将UTF-8值转换为UCS-2值? - Can anyone tell me how to convert UTF-8 value to UCS-2 value in Objective-c? (SwiftUI) 谁能告诉我为什么我的 NavigationView 在页脚中创建额外的 NavigationBar 和空白区域? (包括视频) - (SwiftUI) can anyone tell me why my NavigationView is creating extra NavigationBars and blank space in the footer? (video included) 如何为多个NSProgress使用observeValueForKeyPath? - How to use observeValueForKeyPath for several NSProgress?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM