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

Having issues when downloading over fast network on slow devices #74

Open
christie-alphero opened this issue Jul 26, 2018 · 2 comments
Open

Comments

@christie-alphero
Copy link

In the MZDownload.swift
in the " func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didWriteData bytesWritten: Int64, totalBytesWritten: Int64, totalBytesExpectedToWrite: Int64)"

I am getting a bunch of crashes. It is always an index out of bounds exception on Line 210.

It seems as though while the download model is being updated asynchrounously, the download array is updated and the downloadingArray no longer contains the download model at the index specified.

@christie-alphero
Copy link
Author

I've looked into it a bit more, and adding the check just causes weird behaviour (although with no crashes).
Pulling the inner logic out of the async block seems to fix the issue. Is there a reason that the inner logic is wrapped in a async block?

@YogeshBhattGWL
Copy link

I am getting below kind of error:

Object 0x2821a1a40 deallocated with retain count 2, reference mav have escaped from deinit. 2023-05-22 13:52:43.944428+0530 Pilgrim_app_jos[64500:11735455] Object 0x2821a1a40 deallocated with retain count 2, reference mav have escaped from deinit

@christie-alphero Do you have Any idea why its happening?

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

2 participants