-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Loads of "invalid context 0x0" #1203
Comments
can you check the url of the images that produce this console warning? find one and load it in your browser. does it load? please share a url |
@cytryn any updates |
This is an example of URL: It load perfectly on browser and on the app also... |
@cytryn can you try your image on the demo project. i just tried it in the simulator and got no warnings at all. |
Just tested and still get the same errors. @mythodeia have you tried using the same code block? |
@mythodeia actually I have just downloaded the demo project and cannot run because I am getting some errors: clang: error: no such file or directory: '/Users/acytryn/Downloads/iOS/SDWebImage-master/Vendors/libwebp/src/dsp/upsampling_sse2.c' |
you need to clone the repo then do a pod install in the tests folder. then remove all sample urls and add only yours and debug |
Did it, in the example it is doing fine, no warnings even with the code block that I used in my code. I just tested in my code passing nil to the imageURL, I still get tons of warnings... But if I remove the image download block I get no warnings at all.... so it is pretty much this code block that is causing the warnings, but why? |
are you using the latest code from this library? EDIT: @cytryn use this:
|
I'm having a similar issue. I get this error messages: : CGBitmapContextCreate: unsupported parameter combination: 8 integer bits/component; 16 bits/pixel; 1-component color space; kCGImageAlphaPremultipliedFirst; 224 bytes/row. It appears than when this error is triggered, the image isn't displayed. I tried to isolate the problem by using the Demo example, and I think I found something. I can consistently reproduce this error with images with "Color space: Gray". Here are 3 examples you can use: https://danbooru.donmai.us/data/preview/1a3183f5ee226e8af06d8faf0244e079.jpg Let me know if you need more examples. Edit: I forgot to mention, I'm working with an iPhone 6, iOS 8.4, Xcode 6.4, iOS SDK 8.4 and target iOS 8.0 |
@livyathan i will take a look at it later on. thanks for reporting it |
@livyathan |
from a bit more research those images have i will try and implement a solution for these kind of images but until then you can remove the bitmap info i told you above and it will show the images |
I tried the solution, and it works, but only for those types of images, the normal images (with color space RGB) now throw a similar error, even the images from the demo will throw an error. I didn't noticed this error until I updated the library with the latest version today, I was using a 2-3 month old version, so I related the problem to the library, and not the sources of the images. I don't know much about this, but if you say that these images cannot be decoded, at least consider adding a validation. I hope you can find a better solution. Thank you. |
@livyathan can you replace the whole method
|
@mythodeia I just tried the code on the demo app and it seems to be working fine, I can see every image without errors. I'm using a mixture of RGB and Gray images at the same time. I can test the code on my app but that will take a little longer, I'll try to report back tomorrow. |
@livyathan thanks |
@mythodeia I tested the changes on my app today and it's working great, I cannot reproduce the error anymore. I hope you can add the changes to the main branch Again, thank you for the help. |
Great! |
Should this be reopened until the fix is applied? |
PR merged |
@mythodeia I've tried the code you posted here and it removes the warnings. Thanks!!! |
@mythodeia still getting the errors. Asked my colleague and he told me that our images are using SRGB color space |
with which version are you getting errors? if neither the code in this post above nor the code in this pull request #1236 fixes it for you then please share an image so i can test |
Can't seem to find the version of the repo, but I cloned it 4 days ago. Will update the build and get back to you |
@mythodeia updated to the latest commit, still having the issues. try this url: |
@Takdol |
Ok will do. |
hey @mythodeia, I've tried the url in the demo project and no problems there. It's working fine now. THANKS! |
@Takdol 👍 |
Hello, I have a same problem with with image http://alfa-dev.allychat.ru/static/upload/cf2ea3bf-3f29-4c93-a063-ffa686ca4445.png |
open your
with this
|
Thx for answer, it solved my problem, |
I test with new SDWebImage like top show , but some error also exit . For example :: CGBitmapContextCreate: unsupported parameter combination: 8 integer bits/component; 40 bits/pixel; 4-component color space; kCGImageAlphaPremultipliedFirst; 1024 bytes/row. |
@A1314 if you put your urls in the demo project do you have the same issue? Please share the urls after you tried with the demo project and had the same issues |
@mythodeia my url is " http://joke.luckyamy.com/api/?cat=pic&p=2&ap=joke&ver=1.7" , but I don't know which's the picture |
@mythodeia Thanks |
@A1314 i tried the urls in the json export you provided (the thumbnails only) and none give me the warning of 'invalid context...'. Please if you find the url try it on the demo project first and then share it here by the way you can use this to add the raw json and produce a readable text so you can extract the urls |
ok,I test angain.of course ,if I find this problem in the future,I will share it here first. |
👍 |
Hi, when I implemented SDWebImage I got many and many of this error:
<Error>: CGContextScaleCTM: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.
I am loading images to set as the background of my UITableViewCells on my cellForRowAtIndexPath:
Reading some stackoverflow topics I have found that some people said that this is an iOS 7 problem that would eventually disappear. But I am using iOS 8 simulator and the error is still there.
The text was updated successfully, but these errors were encountered: