Closed cgatesman closed 5 months ago
but the exiftool command line tool will not hang.
I suspect you're not running exiftool
with all of the options that this library uses:
time exiftool -json -struct -all -ignoreMinorErrors test/issue-181.jpg > out.json
real 0m24.980s
user 0m24.350s
sys 0m0.617s
And out.json
is a 33 megabyte file. The photoshop:DocumentAncestors
field has 792,787 items.
So: obviously, at least for that file, you don't want to -ignoreMinorErrors
! ExifTool only parses the first 1000 items by default, but refuses to parse some files without that argument.
The next release will support disabling -ignoreMinorErrors
via ExifToolOptions.
v26.0.0 is released with this new option: https://photostructure.github.io/exiftool-vendored.js/interfaces/ExifToolOptions.html#ignoreMinorErrors
const { ExifTool } = require("exiftool-vendored")
new ExifTool({ ignoreMinorErrors: false }).read('evil.jpg').then(console.dir)
Thanks so much @mceachen for the fast turn around on this!
Describe the bug
I am seeing exiftool-vendored hang on some files. I was able to isolate this to with a small example script outside of my application. The file linked below (too large to attach here) will hang if fed into the script. The exiftool command line tool, however, does not hang when executed on the file. I even tried this with the exiftool from exiftool-vendored.pl which I am using, and it does not hang.
https://drive.google.com/file/d/1jhHZL84vR159f2aWX799qvMom0qZ5jNL/view?usp=sharing
To Reproduce
Output:
Expected behavior
As explained, running this script on the provided file (see link above) hangs and eventually times out after 20s, but the exiftool command line tool will not hang.
Environment (please complete the following information):