Skip to main content
Inspiring
July 29, 2015

P: Wrong timestamp stored in catalog causing wrong metadata status (all Windows versions)

  • July 29, 2015
  • 66 replies
  • 3623 views

Hi,

The problem I describe below is not new (I observed this at least since version 3) but this time I took the time to investigate more deeply...

From time to time, LR tells me that the XMP file of a given image is no longer in sync with the metadata in the catalog. Most often, this is correct because I made changes without recording the XMP file (Ctrl-S - I'm not using the automatic XMP updating mode). But very often, this information is simply wrong. I didn't change anything to the image and suddenly, the little down arrow appears in the upper right corner of the thumbnail.

Hitting Ctrl-S may or may not fix the problem. Sometimes, the little down arrow reappears after a few seconds or minutes although I didn't do anything (hands away from keyboard and mouse).

I recently did the following test for multiple images unduly displaying the "metadata status changed" flag. I compared the following values :

1. Windows "last modified" timestamp for the XMP file.
2. Value of the xmp:MetadataDate field in the XMP file.
3. touchTime column value for that image in the Adobe_images table of the catalog (which is a SQLite database).

The touchTime value is stored in a special format, so I had a hard time converting it to a readable date/time value. However, I will not explain this and how I navigated the database in order to access this timestamp (this requires some knowledge about databases).

Result:
For all the images tested, values #1 and #2 were always strictly identical. The touchTime value was always off (sometimes about 10-15seconds, sometimes much more). So no wonder that LR thought that the XMP file and the metadata in the catalog were not in sync.

Moreover, the difference in time can be negative of positive. So LR displays the up or down arrow accordingly (meaning that the XMP file is older or newer than the metadata in the catalog, respectively - which is wrong in both cases).

I explained above that sometimes, the image reappears as "not in sync" just a few seconds or minutes after I did a Ctrl-S. In that case, a quick look at the database showed me that the touchTime field had not been updated. So the time difference causing the image to be flagged as "not in sync" was still there. In that case, the problem can be fixed by reading the metadata from the XMP file which was actually correctly updated. This operation updates the catalog and everything is in sync again.

Anyway, there's something very wrong in the computation of the touchTime value of the Adobe_images table. That seems to be obvious. This wrong timestamp generates in turn a wrong metadata status.

I made another interesting test :

1. I started from a situation were 0 image was flagged as "not in sync" with the XMP file.

2. I purged all 1:1 previews and started a Build all 1:1 previews.

3. In Library mode, I setup a filter to show only the images that had the Metadata Status set to "has been changed". I got a cup of coffee and waited.

At the beginning of the generation process, no image was displayed in the grid, as expected. While LR was building the previews, images unduly tagged as "not in sync" started to appear. I got about 200 of them. For all these images, the metadata status was just plain wrong. These were finalized images not modified since a long time and for which the XMP file had been timely updated after the last modification. I checked the touchTime field for some of them and each time it was different from the Windows "last modified" timestamp and from the xmp:MetadataDate field of the XMP file as mentioned above.

So now I know what's going wrong but I'd like to have this problem fixed after all these years.

Thanks in advance.

This topic has been closed for replies.

66 replies

Inspiring
January 1, 2020
Is that not because simply looking at an image is 'touching it' and therefore the LR catalog item 'touchtime' will be changed. That puts the catalog at odds with the touchtime stored in the xmp sidecar unless you have set update xmp automatically. I have that set, and never have this problem. Win10.

Just a guess!

Happy New Year,

Bob Frost
Participating Frequently
January 1, 2020
Dear Adobe staff.

I would appreciate any comment.

Thank you and kind regards
SamoreenAuthor
Inspiring
January 1, 2020
Hi,

OK. If the development team are not able to understand what has been explained above, I can describe this bug another way : if an image has not been viewed in the browser since a long time (long enough to cause the preview to be purged), just viewing this image again without changing anything in the image edits can trigger a reset of the metadata status flag.

Is this enough to let us hope for a fix before this bug celebrates its 13th anniversary ?
--Patrick
SamoreenAuthor
Inspiring
November 13, 2019
I confirm that in version 9 the "Ctrl-S - Read Metadata from file" workaround is no longer a safe way to (temporarily)  circumvent the metadata status bug. Occasionally, the image remains flagged as "metadata status changed" after this operation. So, a new bug has been added to the original.

Also, it seems that now, visiting a folder or a collection containing images for which the preview has been purged, systematically causes the metadata status flag of these images to be reset to "changed" when the preview is rebuilt. I got hundreds of images unduly tagged this way after reviewing some folders and collections this morning.

So, this flag that is so important for managing the XMP files effectively (which I consider as a complementary way of backing up my edits, among other uses) is now definitively unreliable. Good Golly, Miss Molly, LR continues to rock. Just a little more effort guys, and this bug will celebrate its tenth anniversary.

I just pre-ordered a Capture One 20 license.
--Patrick
SamoreenAuthor
Inspiring
November 11, 2019
Hi,

Not only this bug still has not been fixed in version 9 after all these years but things now appear to be worse than usual. After installation, I found myself with hundreds of files with their metadata status allegedly marked as "not saved" which is plain wrong. When using the usual trick that temporarily fixes the problem (Ctrl-S, then Read Metatadata from file), I had to "read the metadata from file" multiple times for some of these images before the metadata status got the correct value. And as usual, the status returned to "not saved" for some files after a few seconds.

I regret that the developers of LR have not enough self-esteem and pride to definitively fix this infamous bug lasting since the early versions of LR and disturbing the workflow of many users. I personally would be ashamed of this.
--Patrick
Participating Frequently
August 13, 2019
Hi Adobe.

Another try to help you:
May it be that you store a "Cache Flag" in the metadata?
So - whenever an image goes in or off the cache, you change the metadata, i.e. this flag..
If so - this is ill-designed.==> You have to correct this and store such a flag elsewhere, e.g. in the catalogue!

Kind regards.Michael 
Participating Frequently
July 11, 2019
Dear Adobe Team.
I would appreciate any - ANY ! - kind of feedback to this problem.

Thank you and kind remarks,
Michael
SamoreenAuthor
Inspiring
July 8, 2019
The more I think about this bug and others that are lasting since years, the more I'm convinced that the incapacity to fix them is related to the programming language used to develop a big part of LR : LUA. Beside many other flaws, this language lacks the necessary features to effectively track, spot and fix bugs. After all these years, I'm still wondering why this disastrous choice has been made.

Anyway, there should be a way to fix this bug.

Wake up !
--Patrick
Participating Frequently
June 2, 2019
Dear Lightroom-Team,
anything new?
SamoreenAuthor
Inspiring
May 27, 2019
Sreenivas,

Would you mind answering my question ? Did you actually run that test ?
--Patrick