Skip to main content
mhorvath
Known Participant
May 4, 2023

P: Sony Hif Images reading image and writing metadata error

  • May 4, 2023
  • 16 replies
  • 4979 views

Today I imported some HEIF images (Camera: Sony Alpha 7 IV) into lightroom. Everything was fine until I opened the develop module. Whenever I did so it first showed a warning that there was an "error writing the metadata" and after deselecting the image the prompt "error reading the image" came up.

 

I already tried following: Re-importing the images (directly via Lightroom copying from the SD card to the MacBooks desktop), manually copying the images to desktop folder and then importing. Checking all the privacy settings (accessability  and full disk access), first-aid for the harddrive and restarting both LR and the MacBook. Also LR is running on the latest update. My catalouge is currently running from a 64GB USB Stick (formated for Mac OS Extended (Journaled)) and the images are in a folder on my desktop. So I don’t see a reason why or what is causing this errors.

This topic has been closed for replies.

16 replies

Rikk Flohr_Photography
Community Manager
Community Manager
May 5, 2023

I've added those notes to the bug. Thanks @johnrellis 

Rikk Flohr: Adobe Photography Org
johnrellis
Legend
May 5, 2023

[This post contains formatting and embedded images that don't appear in email. View the post in your Web browser.]

 

@Rikk Flohr: Photography, the same problem occurs with an .avif file, which isn't surprising given that .hif and .avif both use the HEIF container format:

https://www.dropbox.com/s/81x4nrskg541ekj/sample-avif.2023.05.04.avif?dl=0

 

 

 

Rikk Flohr_Photography
Community Manager
Community Manager
May 4, 2023

I've grabbed the file and see the same result here. I've bugged it to the Classic team. Thanks for the file and the info. 

Rikk Flohr: Adobe Photography Org
johnrellis
Legend
May 4, 2023

@mhorvath, I recommend that you stop using .hif files from your camera (use .jpg instead) until Adobe fixes this file-corruption bug. While avoiding the using of Save Metadata To File and Automatically Write Changes To XMP will avoid the bug, if you accidentally invoke those commands, the file will become corrupted and you'll have to retrieve a copy from backups.

 

HIF support was added in LR 12.3 and apparently wasn't fully tested. This is one of the very rare instances in which LR corrupts a file.

mhorvath
mhorvathAuthor
Known Participant
May 4, 2023

Okay one thing I found out, apperantly this problem with the HEIF images doesn’t occur if I turn of "Automatically write changes into XMP" in the catalouge settings. (Though the already "compromised" images stay that way)

 

I also tried it with RAW images that are saved within the same subfolder. They don’t get this error either way. So it seems it’s just with the HEIF images.

DdeGannes
Community Expert
Community Expert
May 4, 2023

I am not familiar with the HEIF file type so I am not aware why that would happen. Maybe another user would explain.

The Lightroom Classic option to "Automatically write metadata to XMP" is not the default for Lightroom. I do not use it in my workflow.

See if the article at the link below helps.

https://helpx.adobe.com/lightroom-classic/help/supported-file-formats.html

 

 

 

Regards, Denis: iMac 27” mid-2015, macOS 11.7.10 Big Sur; 2TB SSD, 24 GB Ram, GPU 2 GB; LrC 12.5,; Lr 6.5, PS 24.7,; ACR 15.5,; (also Laptop Win 11, ver 24H2, LrC 15.0.1, PS 27.0; ) Camera Oly OM-D E-M1.
johnrellis
Legend
May 4, 2023

[This post contains formatting and embedded images that don't appear in email. View the post in your Web browser.]

 

LR will corrupt a .hif from a Sony Alpha 7 IV when it tries to write the file's metadata. To reproduce:

 

1. Import this .hif:

https://www.dropbox.com/s/7bz72jd7q2qoq5e/test.2023.05.04.hif?dl=0 

 

2. Select the imported photo and do Metadata > Save Metadata To File.

 

3. Observe these errors:

 

4. Open the .hif in Mac OS Preview and observe this error:

 

5. Observe that "exiftool -v test.2023.05.04.hif" produces this error message:

Warning = Truncated 'mdat' data (missing 111779 bytes)

 

 

 

DdeGannes
Community Expert
Community Expert
May 4, 2023

Was this workflow working previously?

 

Regards, Denis: iMac 27” mid-2015, macOS 11.7.10 Big Sur; 2TB SSD, 24 GB Ram, GPU 2 GB; LrC 12.5,; Lr 6.5, PS 24.7,; ACR 15.5,; (also Laptop Win 11, ver 24H2, LrC 15.0.1, PS 27.0; ) Camera Oly OM-D E-M1.
mhorvath
mhorvathAuthor
Known Participant
May 4, 2023

I just switched to it because the previous workflow didn’t work. (Cloud based)