Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid type value detected in Image::printIFDStructure: 21059 #373

Closed
potuz opened this issue Jun 30, 2018 · 4 comments
Closed

invalid type value detected in Image::printIFDStructure: 21059 #373

potuz opened this issue Jun 30, 2018 · 4 comments
Milestone

Comments

@potuz
Copy link

potuz commented Jun 30, 2018

I am attaching a picture taken yesterday with my camera. Exiv2 fails on this picture with the messages

invalid type value detected in Image::printIFDStructure:  21059
Exiv2 exception in print action for file _MG_2027.CR2:
invalid type value detected in Image::printIFDStructure

Perhaps I should debug this before posting here, but this issue and #156 which is raised often by photos from my camera are preventing me from using other software that relies on exiv2.

If it's anything useful I realized that the photos that are failing are all that I have taken with an external flash
_MG_2027.zip

@D4N
Copy link
Member

D4N commented Aug 30, 2018

This issue will be closed by #180. I hope to merge it in the next few days.

@potuz
Copy link
Author

potuz commented Sep 30, 2018

Thanks! this can be closed for all I know

@D4N
Copy link
Member

D4N commented Oct 11, 2018

I'd like to keep this issue open for now, although it is no longer reachable from the standard application, you can still trigger the bug via exiv2 -pR $file. Looks like printStructure continues processing the image file, whereas the tiff-parser gives up earlier (or just ignores invalid entries).

@clanmills
Copy link
Collaborator

I'm going to close this one. Thanks to @D4N, we are no long preprocessing the file with printStructure(recursive), so exiv2 now finds the metadata with a warning:

595 rmills@rmillsmbp:~/gnu/github/exiv2/exiv2/build $ bin/exiv2 -pa ~/Downloads/_MG_2027.CR2
Warning: Directory Canon has an unexpected next pointer; ignored.
Exif.Image.ImageWidth                        Short       1  1536
...
Exif.Image3.StripByteCounts                  Long        1  6577889
596 rmills@rmillsmbp:~/gnu/github/exiv2/exiv2/build $ 

When you explicitly use printStructure(recursive) with $ exiv2 -pR image-path, the output is sane and reasonable.

594 rmills@rmillsmbp:~/gnu/github/exiv2/exiv2/build $ bin/exiv2 -pR ~/Downloads/_MG_2027.CR2
STRUCTURE OF TIFF FILE (II): /Users/rmills/Downloads/_MG_2027.CR2
 address |    tag                              |      type |    count |    offset | value
      18 | 0x0100 ImageWidth                   |     SHORT |        1 |           | 1536
      30 | 0x0101 ImageLength                  |     SHORT |        1 |           | 1024
...
  STRUCTURE OF TIFF FILE (II): /Users/rmills/Downloads/_MG_2027.CR2
   address |    tag                              |      type |    count |    offset | value
       272 | 0x829a ExposureTime                 |  RATIONAL |        1 |       612 | 1/60
       284 | 0x829d FNumber                      |  RATIONAL |        1 |       620 | 40/10
...
    STRUCTURE OF TIFF FILE (II): /Users/rmills/Downloads/_MG_2027.CR2
     address |    tag                              |      type |    count |    offset | value
         702 | 0x0001 Version                      |     SHORT |       46 |       996 | 92 2 0 4 2 ...
         714 | 0x0002 ISOSpeed                     |     SHORT |        4 |      1088 | 1 28 907 605
...
         978 | 0x4003                              |     SHORT |       22 |      8988 | 0 0 0 0 0 ...
invalid type value detected in Image::printIFDStructure:  21059
Exiv2 exception in print action for file /Users/rmills/Downloads/_MG_2027.CR2:
invalid type value detected in Image::printIFDStructure
595 rmills@rmillsmbp:~/gnu/github/exiv2/exiv2/build $ 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants