About
Calling makeAssetDownloadTask in AVAssetDownloadURLSession causes a low frequency crash.
Description
Our application has the feature to asynchronously download StreamingVideo in a background thread.
When our application makes downloadTask, there is a low probability that it will crash.
I don't know what caused this. Has anyone seen this before?
I'm finding information for a solution.
Thanks for your help.
I did read Posting a Crash Report.
Crash log
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 3
Last Exception Backtrace:
0 CoreFoundation 0x1b9ab5e88 __exceptionPreprocess + 164 (NSException.m:202)
1 libobjc.A.dylib 0x1b2def8d8 objc_exception_throw + 60 (objc-exception.mm:356)
2 CFNetwork 0x1bad41038 -[__NSURLBackgroundSession _onqueue_AVAssetDownloadTaskForURLAsset:URL:destinationURL:assetTitle:assetArtworkData:options:downloadConfiguration:enableSPIDelegateCallbacks:] + 1624 (BackgroundSession.mm:1314)
3 CFNetwork 0x1bad409c4 __117-[__NSURLBackgroundSession AVAssetDownloadTaskForURLAsset:assetTitle:assetArtworkData:options:downloadConfiguration:]_block_invoke + 56 (BackgroundSession.mm:1198)
4 CFNetwork 0x1bac5aa5c __68-[__NSURLBackgroundSession performBlockOnQueueAndRethrowExceptions:]_block_invoke + 616 (BackgroundSession.mm:800)
5 libdispatch.dylib 0x1c1085fdc _dispatch_client_callout + 20 (object.m:560)
6 libdispatch.dylib 0x1c1095574 _dispatch_lane_barrier_sync_invoke_and_complete + 56 (queue.c:1023)
7 CFNetwork 0x1bac8679c -[__NSURLBackgroundSession performBlockOnQueueAndRethrowExceptions:] + 176 (BackgroundSession.mm:778)
8 CFNetwork 0x1bad4094c -[__NSURLBackgroundSession AVAssetDownloadTaskForURLAsset:assetTitle:assetArtworkData:options:downloadConfiguration:] + 172 (BackgroundSession.mm:1197)
9 OURAPP 0x104449f4c VideoDownloading.start(progressHandler:completion:) + 984 (VideoDownloading.swift:79)
10 OURAPP 0x104185410 closure #1 in closure #1 in DownloadVideoTask.execute() + 288 (DownloadVideoTask.swift:39)
11 libswift_Concurrency.dylib 0x1c3e29ce8 $ss31withCheckedThrowingContinuation8function_xSS_yScCyxs5Error_pGXEtYaKlFySccyxsAC_pGXEfU_TA + 164 (CheckedContinuation.swift:296)
12 libswift_Concurrency.dylib 0x1c3e29dfc $ss30withUnsafeThrowingContinuationyxySccyxs5Error_pGXEYaKlF + 228 (PartialAsyncTask.swift:284)
13 libswift_Concurrency.dylib 0x1c3e29b41 $ss31withCheckedThrowingContinuation8function_xSS_yScCyxs5Error_pGXEtYaKlFTQ0_ + 1 (CheckedContinuation.swift:295)
14 OURAPP 0x10418529d (1) await resume partial function for closure #1 in DownloadVideoTask.execute() + 1 (DownloadVideoTask.swift:38)
15 OURAPP 0x104185649 (1) await resume partial function for partial apply for closure #1 in DownloadVideoTask.execute() + 1 (<compiler-generated>:0)
16 libswift_Concurrency.dylib 0x1c3e3fec9 $ss27withTaskCancellationHandler9operation8onCancelxxyYaKXE_yyYbXEtYaKlFTQ1_ + 1 (TaskCancellation.swift:40)
17 OURAPP 0x104185095 (3) await resume partial function for DownloadVideoTask.execute() + 1 (DownloadVideoTask.swift:37)
18 OURAPP 0x1043da2bd (1) await resume partial function for closure #2 in closure #2 in SingleVideoDownloadImpl.start() + 1 (SingleVideoDownloadImpl.swift:115)
19 OURAPP 0x1043db00d (1) await resume partial function for partial apply for closure #2 in closure #2 in SingleVideoDownloadImpl.start() + 1
20 libswift_Concurrency.dylib 0x1c3e6c3a1 completeTaskWithClosure(swift::AsyncContext*, swift::SwiftError*) + 1 (Task.cpp:458)
from xccrashpoint
OS Ver
iOS14 ~ iOS16
I don't see any particular bias.
Devices
iPhone8 ~ iPhone13
I don't see any particular bias.
It hasn't happened yet on iPhone 14.