在我的生产版本中出现未知崩溃

时间:2019-05-30 07:22:42

标签: ios swift nsoperationqueue

  

第0行在#1中的闭合   CreateProductViewController.createProductApiCall(withName :)崩溃:   NSOperationQueue 0x2829cc5c0(QOS:已审核)EXC_BREAKPOINT   0x0000000100ce5d58

这是我从架构获取的崩溃日志:

0                           0x100ce5d58 closure #1 in CreateProductViewController.creteProductApiCall(withName:) (<compiler-generated>)
1                           0x10099f3a0 closure #1 in WebManager.makePOSTCall(params:path:success:failure:) (<compiler-generated>)
2                           0x10099eb20 thunk for @escaping @callee_guaranteed (@guaranteed Data?, @guaranteed NSURLResponse?, @guaranteed Error?) -> () (<compiler-generated>)
3  CFNetwork                      0x18bdd4688 __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke + 32
4  CFNetwork                      0x18bde8220 __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 176
5  Foundation                     0x18c264f68 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16
6  Foundation                     0x18c171420 -[NSBlockOperation main] + 72
7  Foundation                     0x18c170908 -[__NSOperationInternal _start:] + 740
8  Foundation                     0x18c266cec __NSOQSchedule_f + 272
9  libdispatch.dylib              0x18b240a38 _dispatch_call_block_and_release + 24
10 libdispatch.dylib              0x18b2417d4 _dispatch_client_callout + 16
11 libdispatch.dylib              0x18b1e6018 _dispatch_continuation_pop$VARIANT$mp + 412
12 libdispatch.dylib              0x18b1e56dc _dispatch_async_redirect_invoke + 600
13 libdispatch.dylib              0x18b1f202c _dispatch_root_queue_drain + 372
14 libdispatch.dylib              0x18b1f28d0 _dispatch_worker_thread2 + 128
15 libsystem_pthread.dylib        0x18b4211b4 _pthread_wqthread + 464
16 libsystem_pthread.dylib        0x18b423cd4 start_wqthread + 4

这是我来自createProductApiCall(withName :)函数的代码

SwiftAppDelegate?.showHud(self, withText: nil)
var parameters = [String:AnyObject]()
parameters[KJSON.KUSER_ID] = UtilityClassSwift.getCurrentUserId() as AnyObject
parameters[KYEARBOOK_ID] = self.strofMasterYearbookId as AnyObject
parameters[KBOOK_NAME] = productName as AnyObject
if categoryType == .Photobook {
    if arrOfPhotoBookSizeData.count > selectedIndexPhotobookSize {
        parameters[KJSON.KSIZE_ID] = arrOfPhotoBookSizeData[selectedIndexPhotobookSize].sizeId as AnyObject
    }
}
if !strOfVoucherCode.isEmpty {
    parameters[KVOUCHER_CODE] = strOfVoucherCode as AnyObject
    if arrOfPhotoBookSizeData.count > selectedIndexPhotobookSize {
        parameters[KJSON.KSIZE_ID] = arrOfPhotoBookSizeData[selectedIndexPhotobookSize].sizeId as AnyObject
    }
}
let saveBookApi = REST_SERVICE_MAIN_URL + KYEARBOOK_SAVE_URL
WebManager.sharedInstance.makePOSTCall(params: parameters, path: saveBookApi, success: { (response) -> (Void) in
    if let data = response{}
})

0 个答案:

没有答案