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

Unclear error message keep popping up #4

Open
gouen95 opened this issue Jan 4, 2019 · 3 comments
Open

Unclear error message keep popping up #4

gouen95 opened this issue Jan 4, 2019 · 3 comments

Comments

@gouen95
Copy link

gouen95 commented Jan 4, 2019

When I am downloading an image, these error keep popping up in my console log. And btw one question.. is there image caching support?

2019-01-04 17:33:41.219260+0800 ImageIOSwift_Example[33707:774797] [0x7b9c0000a800] Decoding: C0 0x017901F4 0x0000354A 0x11111100 0x00000000 60928
2019-01-04 17:33:41.219493+0800 ImageIOSwift_Example[33707:774797] [0x7b9c0000a800] Options: 377x500 [FFFFFFFF,FFFFFFFF] 00024060
2019-01-04 17:33:42.219564+0800 ImageIOSwift_Example[33707:774797] [0x7b9c00000000] Decoding failed with error code -1

@davbeck
Copy link
Owner

davbeck commented Jan 9, 2019

Does decoding actually fail? If not, I would guess that this is just os_log garbage from the system (ImageIO, and not ImageIOSwift).

With regards to caching, yes. NSCache is used by the shared downloader to avoid loading the same image into memory multiple times, and the URLSession cache is used to avoid downloading the same image multiple times, which is persisted between launches and follows the servers rules.

@gouen95
Copy link
Author

gouen95 commented Jan 9, 2019

I see, the decoding didn't actually fail and everything is downloaded perfectly.

Regarding the caching problem, I've made an example youtube video to demonstrate the problem. First, I did a simultaneous download of same url image. After the download is done, and then I click on one of the cell, I will pass the url to second page and try to display the image using the shared downloader.
But it seemed like I need to download again.

@davbeck
Copy link
Owner

davbeck commented Jul 15, 2019

Are you sure it’s completely finished downloading? If it’s a progressive jpeg it may still be loading more details. And if it doesn’t quit finish, it will start over like this. You can see that happening in the example app as well.

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