Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash MZDownloadManager.swift line 180 #48

Open
appcelerate opened this issue Jun 21, 2017 · 4 comments
Open

Crash MZDownloadManager.swift line 180 #48

appcelerate opened this issue Jun 21, 2017 · 4 comments

Comments

@appcelerate
Copy link

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

@vishnuag05
Copy link

@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

@appcelerate
Copy link
Author

@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

@YogeshBhattGWL
Copy link

Any solution guys?
I am facing retain count error here

@tejua
Copy link

tejua commented Aug 4, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants