Problem with version relation

Started by banzai, August 20, 2023, 01:39:37 PM

Previous topic - Next topic

banzai

Hi there,

I recently switched from shooting just raw to raw+jpg. I import files x.cr3 and x_preview.jpg. I created a new version relation for those files. I already have a version definition for the final JPGs (x.cr3 -> x.jpg).

But somehow this does not work out, I hope these two screenshots explain my problem:
2023-08-20 13_05_10-NVIDIA GeForce Overlay DT.png2023-08-20 13_11_53-NVIDIA GeForce Overlay DT.png

As this is the first time I have a problem like this, I suspect that I'm overlooking something obvious, but couldn't find it yet...
Any help is appreciated.

thrinn

For my understanding:
  • Your first version rule should only catch x_preview.JPG (for a given master x.CR3), correct?
  • Your second version rule should only catch x.corrected.JPG (plus additional numbers). Correct?
  • But you problem is: In the File Window, it looks as if the_preview file was catched by the second rule?

Did you try to refresh the relations (F4, R)? I take it that you made some changes in the rules, so maybe the changed rules were simply not applied?

I can not detect any apparent error in you rules. What does {File.Relations} in total show? Only the second rule? Or both?
Thorsten
Win 10 / 64, IMatch 2018, IMA

banzai

Quote
  • Your first version rule should only catch x_preview.JPG (for a given master x.CR3), correct?
Correct.

Quote
  • Your second version rule should only catch x.corrected.JPG (plus additional numbers). Correct?
Yes. ".corrected" is optional and "-N" also, so x.JPG should match, x-1.JPG, x-2.JPG (etc.) and x.corrected.JPG. But not x_preview.JPG.

Quote
  • But you problem is: In the File Window, it looks as if the_preview file was catched by the second rule?
Exactly.

I tried the refresh relations command several times, but didn't help so far.

"{File.Relations}" shows only the second rule.

banzai

Ok, I played around a bit more and found this:
- "Refresh relations" with only the current directory (730 files, 365xCR3, 365xJPG) selected, did not help (but the shortly visible progress window clearly showed "processing 730 files")
- Now I selected the parent directory (13k Files) and refreshed and voila, correct relation!

This is reproducible:
- I renamed one file from x_preview.JPG to x.jpg
- Again the refresh with just the current directory selected did not apply the correct rule.
- But selecting the parent dir does. With renaming the file between x_preview.jpg and x.jpg, I can reproduce this every time.

Mario

Check on which level you let IMatch search for versions.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

banzai

QuoteCheck on which level you let IMatch search for versions.
I never changed this from the default, so it is set to "Master folder plus one level down".
I have all my versions in the same folder as the master, so I changed this to "Master folder only", should save some performance I guess.

But it didn't change the behavior I see (selected parent folder works, only current folder does not).

Mario

If the versions are not found unless you go up a folder level and run "refresh relations" from there, the typical explanation is that the folder you're running the refresh on does not contain the masters.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

banzai

QuoteIf the versions are not found unless you go up a folder level and run "refresh relations" from there, the typical explanation is that the folder you're running the refresh on does not contain the masters.
Nope, my masters and versions are side by side directly in the same folder.

sinus

Habe you tried this with another folder and a subfolder? Just to be sure, Computers are sometimes a Puzzle. 
Best wishes from Switzerland! :-)
Markus

Mario

Quote from: banzai on August 22, 2023, 10:40:16 PMNope, my masters and versions are side by side directly in the same folder.
Then I have no explanation for this mystery.
From experience and the stable track record of version detection (no changes for over two years in the code) I would say it is something with your rules or file system layout causing this.

If you enable debug logging, you can see in the log file after you refreshed the relations how many masters were detected and how many versions. If no versions are detected, your rules did not grab  any files.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

banzai

QuoteHabe you tried this with another folder and a subfolder? Just to be sure, Computers are sometimes a Puzzle. 
Today I finally found the time to try this.
This time I used another folder, deeper in my folder structure, with a NEF master and a JPG version.
I renamed the JPG (which previously matched the "final image" rule) so that it now matches the "preview image" rule.
Again, refreshing relations when only the current folder was selected, did not change the version assignment.
But this time, going to the parent folder also didn't help. Neither the parent of the parent folder.
I had to go up three folders until refreshing the relations really changed the version assignment. This third parent contained a decent amount of images (around 8k), opposed to the deeper folders, where 45 images was the maximum.

This weekend I will hopefully find more time to do what Mario suggested, enable Debug logging and play around more. Perhaps I can find more hints on what the problem is. I will report back.

banzai

I have now enabled debug logging, but tbh, this didn't reveal much to me.

When I do a relations refresh while only the folder with the renamed file is selected, I see this:
08.27 12:07:00+    0 [775C] 50  I>      #FindRelated: 3 masters, 8 definitions, 2 links found. 18 files analyzed.
(The folder only contains 3 files, one master and two versions). There are more lines in the log, but I can't see a connection to relations in these lines.

When I do the same with the folder 3 levels upwards, I see a similar line, just with much bigger numbers (number of reported masters corresponds to number of images in that folder structure). I also can see that all my relations get listed in the log (twice). And ofc a lot more lines, many related to caching etc. but no information which did tell me much.


In another try I went to my small Test-DB which I used for my keyword duplication problem. I cleaned the version definitions so that only two rules exist which match slightly different filenames.
Only two images in the DB at c:\temp\test_pics.

Here I noticed that apparently already on renaming the file, IMatch tries to update relations, cause I got this in the log when doing the rename:
08.27 12:19:19+    0 [7AA8] 50  I>      #FindRelated: 2 masters, 2 definitions, 1 links found. 4 files analyzed.

But in this DB, I found no way to correctly update the version relation after renaming. The current folder does not work, and the parent folder shown in the folder tree is already "C:", and selecting this also didn't help.

For now I'm out of ideas what else I could do to get to the bottom of this problem...

Mario

Quote from: banzai on August 27, 2023, 12:29:18 PMWhen I do a relations refresh while only the folder with the renamed file is selected, I see this:
Code Select Expand
08.27 12:07:00+    0 [775C] 50  I>      #FindRelated: 3 masters, 8 definitions, 2 links found. 18 files analyzed.
When you run a Relation Refresh for a folder, IMatch selects the files in the folder and all files in its sub-folders recursively and then checks for masters and versions (links) using the active definitions.

In your case, 18 files were analyzed. 3 were found to be masters, 2 versions have been identified.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook