I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2006-11-24 17:30:18-08 by themonk
exiftool can hang on corrupt jpeg
Hi Phil

We managed to get exiftool to hang whilst writing to a corrupt JPEG...

The JPEG which was ONLY 2 bytes long

\377\330

...Not quite sure how this occurs and we will improve our error checking so that this image is rejected before it gets to ExifTool...

However....

If exiftool comes across such an image and you try and modify it's contents then it will hang indefinately...

exiftool will correctly identify this as an invalid file if you try and read the tags.

Mark
Direct Responses: 3617 | Write a response
Posted on 2006-11-24 18:15:33-08 by exiftool in response to 3616
Re: exiftool can hang on corrupt jpeg
Thanks for this bug report, however I'm not sure I am able to reproduce this error. When I try writing to the specified JPEG, I get the following:

exiftool a.jpg -exif:xresolution=1 Use of uninitialized value in numeric eq (==) at lib/Image/ExifTool/Writer.pl line 3076. Error: Corrupted JPEG image - a.jpg 0 image files updated 1 files weren't updated due to errors

It doesn't hang (or even crash), but it does produce an unwanted run-time error that could be avoided. I have prepared a 6.58 pre-release version which avoids this error and uploaded it here.

If this solves your problem, great. Otherwise, please give me a more specific example of what the command line that is giving you problems and I should be able to sort it out.

- Phil
Direct Responses: 3623 | Write a response
Posted on 2006-11-27 11:40:52-08 by themonk in response to 3617
Re: exiftool can hang on corrupt jpeg
Hi Phil...

I found the issue, we were running with an old version, 5.93..
We also have a version of 6.51 installed but we have not switched over to it, yet....

When I re-tested with 6.51 the update did not hang....

Thanks....

Mark
Direct Responses: 3634 | Write a response
Posted on 2006-11-27 19:44:43-08 by exiftool in response to 3623
Re: exiftool can hang on corrupt jpeg
Please do not use version 6.51. It has a bug with the potential to corrupt images. I suggest downloading the current version (6.58) instead.

But I'm glad to hear your problem was fixed.

- Phil
Direct Responses: Write a response