Wrong previews on some NEF files

Started by muranod, December 23, 2017, 11:31:58 PM

Previous topic - Next topic

muranod

I saw an issue where someone encountered this a few years ago. Some of my NEF files are showing the the wrong preview and "Force Update" won't fix it. When I open the NEF files in AffinityPhoto and View NX-D, they both show the correct image. Also, the corresponding jpeg shows the correct image.

I only work with one database and have not copied it (except to make a copy for Imatch Anywhere). Anyone know how I might fix these images?

Mario

Define "wrong preview". Does IMatch show a different image? Or the wrong version of the NEF?
Which NEF WIC codec do you use (Help > Support > WIC Diagnosis).
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

muranod

#2
The preview is of a different image from somewhere else in the database. It seems fairly random. I had the FastPictureViewer codecs which were about 7 or 8 months old. I downloaded the lastest one and did a force update again. Some of the previews changed to the correct image, but some still show the wrong preview. I've run the forced update on these multiple times.
Current FPV version: 3.8.0.97. I have also run a database diagnosis and compact with no issues.

- update: I just copied out one of the nef files, renamed it, and copied it back and it came into the database with the correct preview. Looks like only a few dozen images, so I can fix them this way.

muranod

Strangely, force update worked on some of those files, but not all of them. Windows file manager showed the correct preview for the nef files.

I copied all the files to a desktop folder, delete the images in the database, and then copied them back into the folder. When they were re-imported into the database, the previews were correct.

Unfortunately, I'm finding other nef files (but not all) in the database with the same issue.


Mario

IMatch stores the cache image in the cache folder. The name of the cached image is derived from the unique image id assigned to the image when it first enters the database.
When you do a forced update, the existing cache image is deleted and then re-created from scratch. If the preview is still wrong, IMatch for whatever reason produces the wrong caceh file name - or uses the wrong name to retrieve the cached file later.

If you can reproduce this:

1. Switch IMatch to debug logging (Help > Support > ...)
2. Do a forced refresh of the file with the Shift+Ctrl+F5 keyboard shortcut.
3. ZIP and attach the log file. You can copy the log file via Help > Support > Copy Logfile.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

muranod

Will do. It's in the middle of a forced update for cache files now, though it looks like some are not changing. I will do that as soon as this completes. Thanks, Mario!

Jingo

I had this problem a few months ago.. but not for NEF files... these were JPG's.  Thumbnail and preview image showed a different item from the same folder than the thumbnails in the file window... a rescan fixed the problem but it did happen twice to me.  No solution except to rescan the files but something may be amiss someplace... no versioning or stacking on my image either.. just straight ole JPGs.

Mario

@Jingo

IMatch by default does no create cache images for JPEG files - it loads the original JPEG. This takes the entire cache generation and naming out of the loop for potential errors. In your case IMatch would have somehow have to load the wrong original file?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Jingo

Quote from: Mario on December 25, 2017, 08:50:30 AM
@Jingo

IMatch by default does no create cache images for JPEG files - it loads the original JPEG. This takes the entire cache generation and naming out of the loop for potential errors. In your case IMatch would have somehow have to load the wrong original file?

Hmm... so my issue is/was different... oh well.

Mario

Quote from: Jingo on December 25, 2017, 03:35:55 PM
Hmm... so my issue is/was different... oh well.

Seems so. It works like:

1. Is the file a JPEG?
2. If yes, is caching for JPEG off? (Default)
3. If yes, get the file name from the database and tell WIC/DirectX to load it.

The unique ID (OID) of the file and the file name is also logged to the log file (in Debug Logging Mode). If you again have such a problem, please retain the log. Check for the file name of the file IMatch should have loaded in the log. Maybe this gives use a hint.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Jingo

Quote from: Mario on December 25, 2017, 04:28:40 PM
Quote from: Jingo on December 25, 2017, 03:35:55 PM
Hmm... so my issue is/was different... oh well.

Seems so. It works like:

1. Is the file a JPEG?
2. If yes, is caching for JPEG off? (Default)
3. If yes, get the file name from the database and tell WIC/DirectX to load it.

The unique ID (OID) of the file and the file name is also logged to the log file (in Debug Logging Mode). If you again have such a problem, please retain the log. Check for the file name of the file IMatch should have loaded in the log. Maybe this gives use a hint.

Yes... thx Mario... don't want to hijack this thread - but I actually do use the cache option for JPG's because I was storing my images originally on a NAS.  I've since switch to local SSD drive storage for speed gains so perhaps do not need this turned on any longer (?).  I do recall when the issue happened, I checked the log and found the listed cache image that was being retrieved and verified it was the incorrect image... so my guess was somehow the GUID of the thumbnail was incorrectly linked to the cache image.  I'm pretty sure turning off the cache will ultimately solve the issue (though I have not seen it happen in a long time)...

muranod

Thought I posted again, but maybe I didn't save it.

did a search for all NEF files and mass rescan on the images that had the wrong preview. That fixed all of them, even in cases where an individual rescan did not fix them. In any case, all is working just fine now. Plus, I have updated codecs. :-)