Images return before available
#1
I've seen this for a while but thought I'd wait to see if it disappeared with all the cache updates. This might be more of a cache issue?

It looks like any image is returned before it has been cached (I'm guessing). I see this most with new episodes. The image is returned by the rpc but isn't availabl/generated so you get a 404 error. Refresh and it'll show if it's been generated ofc. So I guess it's doing:

Image is available at this address
Write it in DB
Download
Cache

I see some curl errors getting the images and I think it's those that are the problem and the reason for my supposition above.
Image
AWXi - Ajax web interface. Wiki
Reply
#2
No, it's doing:

Write the URL into the video/music database.
...
Cache at some point in the background:
1. Cache.
2. Update the textures database.
...

If you fetch over JSON-RPC before the caching has happened, then we:
1. Remove the queued caching job.
2. Cache.
3. Update the textures database.
4. Return the image.

If you fetch over JSON-RPC as caching is occurring, then we:
1. Wait for the job to finish.
2. Return the image.

At no time, therefore, should there be a problem. Ofcourse, that doesn't mean there's NOT a problem, but we'll need some logs and some clear steps to reproduce the problem to track it down.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
http://pastebin.com/dG1zcF0D I see you've commited the PR so I'll try that as well.

http://thetvdb.com/banners/episodes/79843/4386774.jpg is the image in question.

This one is with your image fix commit. http://pastebin.com/PSx7YmLM First time 404, 2nd attempt works.
Image
AWXi - Ajax web interface. Wiki
Reply
#4
From a quick scan it's doing exactly as it should - the image isn't cached yet, so we check whether the original image exists - curl is failing to stat the image in this case.

One thing you could try is removing the CFile::Exists() check at the end of CImageFile::Exists() (i.e. assume the original image exists if an image:// URL is available) - this might cut down on potential curl failures, but equally, will mean invalid URLs will say they exist, but the Open()/Read() calls will fail.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
If it's expected behaviour, I'll just deal with it. It just seems a bit confusing to offer a URL as available when it isn't.

It may be this just happens to me. If I try the same image that fails over and over, in a browser for example, it loads in as quickly as you would expect. In that top log you can see I tried reloading five or more times. If I get some time (ha!), I'll see if I can nail it down.
Image
AWXi - Ajax web interface. Wiki
Reply
#6
I seem to be getting the same problem over UPnP.... It would be really good to generate te thumb if its not already if requested by UPnP or RPC. Not sure how feasible that is though...
Reply

Logout Mark Read Team Forum Stats Members Help
Images return before available0