Issue renaming CR2 files

Started by Aubrey, June 09, 2021, 02:35:37 PM

Previous topic - Next topic

Aubrey

I cannot rename CR2 file.

Procedure followed:
Upload CR2 and associated jpg into a new folder.
Run IMatch and use Add Update Folders to load contents
Request renaming.
Message appears:
Error while renaming file (see renaming.jpg)

The jpg of this image renames without a problem. I don't see any write protection issues for CR2 files...

If I completely close IMatch (not just the database) and restart IMatch the CR2 files can then be renamed.

Looking at log file I see:
Attached is the log file (normal logging).
I see "Failed to load image with PTD2D. 80070005 - Access is denied." I suspect these refer to CR2 file loading
I can see the CR2 files in the file viewer

Ideas, suggestions?



Mario

IMatch can neither load the file via Windows Direct2D nor can it rename it.
Something (other application, virus checker, Windows, ...?) has the file locked.
Maybe the WIC codec or D2D driver has crashes or something.

Just reboot your system, then retry.

Aubrey

Rebooted.

I switched off virus checker.

Still same problem renaming CR2 files.
NEF files are fine

Resolution
I think I have now resolved the problem.
I loaded the Nikon WIC a while back

Upon removing this WIC the issue with CR2 renaming disappeared.

Bizarre!


Mario

Now that's strange.
Why should a NIKON WIC codec affect the Windows WIC codec for CANON CR2 formats?
I mean, I have seen strange things in my life, so I don't say that such things don't happen. But I would have no explanation for this.

IMatch uses the installed WIC codecs when processing RAW files (to extract the thumbnail, produce the cache image).
This part of WIC is pretty much a black box.
IMatch asks Windows WIC "Please load this RAW file and give me a 'handle'" and Windows picks the best-suited WIC codec. In case there are multiple WIC codecs for the same file format installed (e.g. the built-in NEF/NRW codec in Windows and the codec from NIKON), only Windows knows which codec it will choose.

IMatch then uses WIC functions to extract the thumbnail and/or preview and/or full RAW, depending on what's needed. Then IMatch releases the WIC handle, 'unloading' the file. This has been implemented using standard exception-safe behaviors, smart pointers etc. to ensure that, even if IMatch runs into an error, the file is always released.

Sometimes, users report that they cannot delete a file that has been loaded into the Viewer / Quick View panel shortly before. IMatch uses Windows WIC to load cache files (or the original files, in case of JPG).
I could never reproduce this, but I guess that Windows is locking the JPG for some time (?) beyond the use of IMatch - but only sometimes and on some computers. I have no idea.

Rebooting (or restarting IMatch) will remove these locks for sure. Why all this is linked to the NIKON WIC codec, no clue...
If you use NIKON RAW files, I'm sure the NIKON codec can produce better results than the generic Windows codec.

Aubrey

Quote from: Mario on June 09, 2021, 08:41:15 PM
Sometimes, users report that they cannot delete a file that has been loaded into the Viewer / Quick View panel shortly before. IMatch uses Windows WIC to load cache files (or the original files, in case of JPG).
only the cr2 files were locked, the associated jpg files could be renamed (I was shooting both jpg and raw)

Quote from: Mario on June 09, 2021, 08:41:15 PM
If you use NIKON RAW files, I'm sure the NIKON codec can produce better results than the generic Windows codec.

Tomorrow I'll reinstall Nikon WIC, and report back. I don't use Canon too often, so I might live with restarting IMatch so as to get better Nikon results.

Aubrey

Reinstalled Nikon codec.
CR2 renaming  working as expected  :D

Extract from Mario's earlier comment
Quote from: Mario on June 09, 2021, 08:41:15 PM
... I mean, I have seen strange things in my life, so I don't say that such things don't happen. But I would have no explanation for this.

Agreed!