It happened again: Thumbnail correct but incorrect preview display from cache

Started by Jingo, October 17, 2017, 02:10:18 PM

Previous topic - Next topic

Jingo

Hi Mario - I could not locate my original discussion about this - but it appears my cache files have become "unlinked" to the corresponding thumbnails in the DB again.  Screenshot below shows the problem:



If I update the cache it fixes the problem... but this is the 3rd time this has happened (same db/same path in IM).

Log file attached.. any thoughts?

Mario

I cannot tell from your screen shots (no icons)...do you use versioning of some kind?

The file name of the cache file is the unique ID of the image (the OID). The only way for IMatch not grabbing the "<fileid>.jpg" cache is when there is a proxy image used....
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Jingo

Hi Mario - I do not use any type of versioning.. these are straight JPGs stored on a local NAS with the cache on local hard drive.  This happened a few months ago... and now it is back.  Its not all folders.. just certain ones.  I suppose I will just rebuild the entire cache and see what happens moving forward.  More concerning is why I cannot get the MapApp to store GPS data...

Mario

You can see the file OID and the cache file name with these variables

{File.OID|cast:int}
{File.CacheFileName}

Do they match?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Jingo

Quote from: Mario on October 17, 2017, 08:34:37 PM
You can see the file OID and the cache file name with these variables

{File.OID|cast:int}
{File.CacheFileName}

Do they match?

Wow.. even weirder then.. they do match!

67090
E:\photools.com\previewcache\8EF3810B-3F63-4B0C-B38C-00A2E120A15B\67\67090.jpg

However, the image cache for 67090.jpg is incorrect... it is not for the 67090 thumbnail but instead for image #67125.  The image cache for 67125.jpg is the image for 67173.. and on it goes for all the images in that folder.

sinus

The cache - folder is of course correct?
I had sometimes troubles, if I did copy a DB, because IM created then a new cache-folder. But this happend some time ago. Maybe I did something wrong, at least you should check this.
Best wishes from Switzerland! :-)
Markus

Jingo

Thx Markus... yes, I confirmed the preview cache is in place as it always had been: E:\photools.com\previewcache\<GUID>

It just seems really random... I'm just going to rebuild the entire cache and go from there... I don't even really need the cache since I'm only storing JPG's in my database.. but figured if I ever include another format, at least it is on already.  Also, figure the local cache file is going to be lots faster than the NAS drive for access.

Jingo

Found the original thread here... from back in May.. https://www.photools.com/community/index.php?topic=6527.msg45182  - of course, that was an older folder.. this folder of images was just created from C1 and imported into IM in August... so, it happened again.  The thumb and cache preview disconnect are random... one might be 10 images off while another is 100 images off. 

I guess I'll keep debug logging on the next time I do an import (or watched folder import) to see if we can catch it "in the act".. in the meantime, I will rebuild all the cache previews.. that is going to take some time!




sinus

I had this "phenomen" also 2-3 times in the last half year.
But I have never digged deeper  :-[  I was always in a hurry, pressed Shift Ctrl F5 and choosed a "Force update".

Then the problem was solved.
I have no clue, what this can be. I thought always, I must have messed up something.
The next time, when this happens, I will be more carefully.
Best wishes from Switzerland! :-)
Markus

Jingo

Thx Markus - yeah.. pretty sure there is a timing issue or something here when the preview cache items are generated.  The guid's to cache ids are getting link correctly - but the images are not generating to that same id #.  I'm sure it is a needle in the haystack type of situation...  perhaps a debug log when it happens again will help Mario!

sinus

Quote from: Jingo on October 17, 2017, 09:49:40 PM
Thx Markus - yeah.. pretty sure there is a timing issue or something here when the preview cache items are generated.  The guid's to cache ids are getting link correctly - but the images are not generating to that same id #.  I'm sure it is a needle in the haystack type of situation...  perhaps a debug log when it happens again will help Mario!

Yep, Andy, exactly. Lets hope, we find this needle once.  :D
Best wishes from Switzerland! :-)
Markus