I was processing some old images and three images (all from a Canon 40D) gave me the warning "Warning: [minor] Removed 1 invalid entry from MakerNotes" when I wrote updates to the metadata.
I'm curious as to what the erroneous entry was and how it got there. Note too that the warning is also given on the original unaltered copy of the file (yes, the one that came right out of the camera!).
Interesting...
Hi Hayo,
The best way to see what is going on for things like this is the -htmlDump option. I couldn't speculate as to the cause of this without seeing this output.
- Phil
Hi Phil,
From the html dump, it looks like exiftool thinks there's an invalid entry that's somehow simply displaced by a couple of bytes (in fact, those bytes are repeated). I did some more testing on this file and here's some more interesting outcome.
$ exiftool -Make=CANON 20091009_11362200_40D.cr2
Warning: [minor] Ignored 1 invalid entry from MakerNotes - 20091009_11362200_40D.cr2
1 image files updated
$ exiftool -Make=Canon 20091009_11362200_40D.cr2
Warning: [minor] Possibly incorrect maker notes offsets (fix by 12?) - 20091009_11362200_40D.cr2
Warning: [minor] Suspicious MakerNotes offset for CanonCameraSettings - 20091009_11362200_40D.cr2
1 image files updated
$ exiftool -htmldump 20091009_11362200_40D.cr2 > htmldump2.html
Warning: Invalid CanonCameraSettings data - 20091009_11362200_40D.cr2
Warning: Invalid CanonFileInfo data - 20091009_11362200_40D.cr2
So, after updating the file, it seems as if exiftool actually corrupted the file...
EDIT: Ah, right, it's likely that changing the Make was actually the corrupting factor here. After restoring the original:
$ exiftool -DateTimeOriginal 20091009_11362200_40D.cr2
[EXIF:ExifIFD] Date/Time Original : 2009:10:09 11:36:22
$ exiftool -DateTimeOriginal="2009:10:09 11:36:23" 20091009_11362200_40D.cr2
Warning: [minor] Removed 1 invalid entry from MakerNotes - 20091009_11362200_40D.cr2
1 image files updated
$ exiftool -DateTimeOriginal="2009:10:09 11:36:22" 20091009_11362200_40D.cr2
1 image files updated
$ exiftool -htmldump 20091009_11362200_40D.cr2 > htmldump2.html
Anyway, here's the html dump of the out-of-camera file as well as the dump after these last two updates (attached as zip).
If you want, I can also send you the original .cr2 file so you can analyse yourself.
The problem is that there are 35 entries in the makernote IFD, but the entry count says there are 36. I have a 40D sample here for comparison (firmware 1.0.3), and it has 36 entries. The missing entry in your CR2 is ImageUniqueID.
Ah. Looking at the ExifTool source code, I can see a patch that is specifically for the EOS 40D, with this comment:
# patch for Canon EOS 40D firmware 1.0.4 bug (incorrect directory counts)
I see that I also mention this on the Maker Note Idio(t)syncracies page (https://exiftool.org/idiosyncracies.html#Canon).
Well, there you go. Your image has this firmware version.
And yes, changing the Make or Model may affect the processing of the maker notes. (This is FAQ 8 (https://exiftool.org/faq.html#Q8).)
- Phil
Quote from: Phil Harvey on May 03, 2015, 07:14:13 AM
The problem is that there are 35 entries in the makernote IFD, but the entry count says there are 36. I have a 40D sample here for comparison (firmware 1.0.3), and it has 36 entries. The missing entry in your CR2 is ImageUniqueID.
Ah. Looking at the ExifTool source code, I can see a patch that is specifically for the EOS 40D, with this comment:
# patch for Canon EOS 40D firmware 1.0.4 bug (incorrect directory counts)
Well, there you go.
Right, so after writing, the file now has the correct number of entries and is basically fixed. Excellent!
Quote
And yes, changing the Make or Model may affect the processing of the maker notes. (This is FAQ 8 (https://exiftool.org/faq.html#Q8).)
This is what I figured too after posting the first bit, and hence the retest with a different tag to confirm...
Thanks for confirming!
Cheers,
Hayo
Is there also a bug in the Canon EOS 7D firmware version 2.0.3?
I have a directory full of files from a colleague who used that camera and EXIFtool reports all of them as having "invalid CanonCameraSettings data". I would be willing to just wipe out that entire set of metadata, but EXIFtool won't write to CanonCameraSettings. I can send the htmldump if that's useful.
Is there some way I can "clean up" those files so that I can write to a few other metadata fields?
Try adding -m to the command so you can ignore the error preventing you writing the other fields.
Send me and original JPG image and I'll take a look. My email is philharvey66 at gmail.com
- Phil
I was briefly confused by an error message that said Warning: Error .....
The -m allowed the writes to other metadata.
I have now been able to process all my files in the directories.
Took me a while to get these, but all is well.