photools.com Community

IMatch Discussion Boards => General Discussion and Questions => Topic started by: Jingo on October 17, 2017, 02:10:18 PM

Title: It happened again: Thumbnail correct but incorrect preview display from cache
Post by: Jingo on October 17, 2017, 02:10:18 PM
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:

(https://vgy.me/xmlQ2J.png)

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?
Title: Re: It happened again: Thumbnail correct but incorrect preview display from cache
Post by: Mario on October 17, 2017, 06:10:31 PM
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....
Title: Re: It happened again: Thumbnail correct but incorrect preview display from cache
Post by: Jingo on October 17, 2017, 08:21:11 PM
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...
Title: Re: It happened again: Thumbnail correct but incorrect preview display from cache
Post by: 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?
Title: Re: It happened again: Thumbnail correct but incorrect preview display from cache
Post by: Jingo on October 17, 2017, 08:42:09 PM
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.
Title: Re: It happened again: Thumbnail correct but incorrect preview display from cache
Post by: sinus on October 17, 2017, 09:07:54 PM
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.
Title: Re: It happened again: Thumbnail correct but incorrect preview display from cache
Post by: Jingo on October 17, 2017, 09:23:17 PM
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.
Title: Re: It happened again: Thumbnail correct but incorrect preview display from cache
Post by: Jingo on October 17, 2017, 09:33:54 PM
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!



Title: Re: It happened again: Thumbnail correct but incorrect preview display from cache
Post by: sinus on October 17, 2017, 09:45:14 PM
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.
Title: Re: It happened again: Thumbnail correct but incorrect preview display from cache
Post by: 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!
Title: Re: It happened again: Thumbnail correct but incorrect preview display from cache
Post by: sinus on October 18, 2017, 01:32:42 AM
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