Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Failure to use weak references resulted in occasional crashes #2371

@lxm1799

Description

@lxm1799

Location of error reporting method:requestNormal
Guess the reason for the error:

let pluginsWithCompletion: Moya.Completion = { result in
          let processedResult = self.plugins.reduce(result) { $1.process($0, target: target) }
          completion(processedResult)
}

I'm not sure if there are other places with similar issues...

Crash info:
5 Moya
$s4Moya0A8ProviderC13requestNormal_13callbackQueue8progress10completionAA11Cancellable_px_So17OS_dispatch_queueCSgyAA16ProgressResponseVcSgys6ResultOyAA0N0CAA0A5ErrorOGctFyAUcfU_ + 296
6 Moya
$s4Moya0A8ProviderC13requestNormal_13callbackQueue8progress10completionAA11Cancellable_px_So17OS_dispatch_queueCSgyAA16ProgressResponseVcSgys6ResultOyAA0N0CAA0A5ErrorOGctFyAPy10Foundation10URLRequestVATGcfU0_yAUcfU_ + 264
7 Moya
$s4Moya0A8ProviderC20sendAlamofireRequest33_29224DEABDDE279B92464CA1BE771359LL_6target13callbackQueue8progress10completionAA16CancellableTokenCqd___xSo17OS_dispatch_queueCSgyAA16ProgressResponseVcSgys6ResultOyAA0U0CAA0A5ErrorOGct0D00E0CRbd__AA11RequestableRd__lFySo17NSHTTPURLResponseCSg_10Foundation10URLRequestVSgA4_4DataVSgs0W0_pSgtcfU0_ + 724
8 Moya
$s4Moya0A8ProviderC20sendAlamofireRequest33_29224DEABDDE279B92464CA1BE771359LL_6target13callbackQueue8progress10completionAA16CancellableTokenCqd___xSo17OS_dispatch_queueCSgyAA16ProgressResponseVcSgys6ResultOyAA0U0CAA0A5ErrorOGct0D00E0CRbd__AA11RequestableRd__lFySo17NSHTTPURLResponseCSg_10Foundation10URLRequestVSgA4_4DataVSgs0W0_pSgtcfU0_TA + 120
9 Moya
$s9Alamofire11DataRequestC4MoyaE8response13callbackQueue17completionHandlerACXDSo17OS_dispatch_queueCSg_ySo17NSHTTPURLResponseCSg_10Foundation10URLRequestVSgAN0B0VSgs5Error_pSgtctFyAA0B8ResponseVyAtA7AFErrorOGcfU_Tm + 344
10 Moya
$s9Alamofire11DataRequestC4MoyaE8response13callbackQueue17completionHandlerACXDSo17OS_dispatch_queueCSg_ySo17NSHTTPURLResponseCSg_10Foundation10URLRequestVSgAN0B0VSgs5Error_pSgtctFyAA0B8ResponseVyAtA7AFErrorOGcfU0_TA + 16
11 Alamofire
$s9Alamofire15DownloadRequestC9_response33_EC9C8D8F662A60D9E8097A0A81210DC2LL5queue0D10Serializer17completionHandlerACXDSo012OS_dispatch_O0C_xyAA0B8ResponseVy16SerializedObjectQzAA7AFErrorOGctAA0buP8ProtocolRzlFyycfU_yyYbcfU1_yAA11RetryResultOcfU0_yycfU0_AA012JSONResponseP0C_Tg5TATm + 48
12 Alamofire
$sIeg_IeyB_TR + 28
13 libdispatch.dylib
__dispatch_call_block_and_release + 32
14 libdispatch.dylib
__dispatch_client_callout + 16
15 libdispatch.dylib
__dispatch_main_queue_drain.cold.5 + 812
16 libdispatch.dylib
__dispatch_main_queue_drain + 180
17 libdispatch.dylib
__dispatch_main_queue_callback_4CF + 44
18 CoreFoundation
_CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16
19 CoreFoundation
___CFRunLoopRun + 1980

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions