MZDownloadManager icon indicating copy to clipboard operation
MZDownloadManager copied to clipboard

Crash MZDownloadManager.swift line 180

Open appcelerate opened this issue 7 years ago • 4 comments

looks like this happends when the user press the home button and opens the app after a few minutes again.

specialized MZDownloadManager.(URLSession(URLSession, downloadTask : URLSessionDownloadTask, didWriteData : Int64, t

Crashed: com.apple.main-thread 0 MZDownloadManager 0x1010e8538 specialized MZDownloadManager.(URLSession(URLSession, downloadTask : URLSessionDownloadTask, didWriteData : Int64, totalBytesWritten : Int64, totalBytesExpectedToWrite : Int64) -> ()).(closure #1) (MZDownloadManager.swift:180) 1 MZDownloadManager 0x1010ec1fc partial apply for MZDownloadManager.(URLSession(URLSession, downloadTask : URLSessionDownloadTask, didWriteData : Int64, totalBytesWritten : Int64, totalBytesExpectedToWrite : Int64) -> ()).(closure #1) (MZDownloadManager.swift) 2 libdispatch.dylib 0x1804fe9e0 _dispatch_call_block_and_release + 24 3 libdispatch.dylib 0x1804fe9a0 _dispatch_client_callout + 16 4 libdispatch.dylib 0x1805035e8 _dispatch_main_queue_callback_4CF + 996 5 CoreFoundation 0x1815f50c8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 6 CoreFoundation 0x1815f2ce4 __CFRunLoopRun + 1572 7 CoreFoundation 0x181522da4 CFRunLoopRunSpecific + 424 8 GraphicsServices 0x182f8c074 GSEventRunModal + 100 9 UIKit 0x1877dd058 UIApplicationMain + 208

appcelerate avatar Jun 21 '17 08:06 appcelerate

@appcelerate I am also facing same issue , I believe its because you have started so many downloads and during this function some downloads may be finished . I tried this dint get the error after - if self.downloadingArray.count > index { self.downloadingArray[index] = downloadModel } else { for (index, downloadModel) in self.downloadingArray.enumerated() { if downloadTask.isEqual(downloadModel.task) { self.downloadingArray[index] = downloadModel } } }

Let me know if its @mzeeshanid appropriate to use. @mzeeshanid I believe you havent used synchronization for delegate functions

vishnuag05 avatar Jun 26 '17 06:06 vishnuag05

@vishnuag05 thanks for reply,

but i configured it that you can only download one file. If its completed u can download an other one.

And what do u mean with

I believe you havent used synchronization for delegate functions

Regards Dennis

appcelerate avatar Jul 03 '17 09:07 appcelerate

Any solution guys? I am facing retain count error here

YogeshBhattGWL avatar May 22 '23 08:05 YogeshBhattGWL

@appcelerate @vishnuag05 getting same issue after changes Any other solution ?

tejua avatar Aug 04 '23 05:08 tejua