ExifTool Forum

ExifTool => Archives => Topic started by: Archive on May 12, 2010, 08:54:11 AM

Title: ExifTool crashing with large TIF Files
Post by: Archive on May 12, 2010, 08:54:11 AM
[Originally posted by ferdinandparis on 2007-10-31 09:00:52-07]

I have a very large TIFF file that is causing the Windows .exe version of ExifTool V7.00 to crash.  It is admittedly unusual.  It was created by PSCS3 as a 16 bit TIFF with multiple adjustment layers, and ZIP compression of both the image and the layers.  Pixel order is "interleaved", byte order is "IBM PC", and neither image pyramid or transparency have been saved.  The file is 518,059,080.

I have reason to believe that it is the file size that is causing ExifTool to crash, as if I simply crop it and save it with the exact same options (now only a few Mb), ExifTool will copy metadata to it, and I can use ExifToolGui to examine it.  I tried saved a slightly larger version without ZIP compression of the image (but still of the layers), with the same problem.  A flat uncompressed version (around 270Mb) was ok.  Perhaps it's a combination of layers and size.

Has anyone else has this problem?

Ferdinand
Title: Re: ExifTool crashing with large TIF Files
Post by: Archive on May 12, 2010, 08:54:11 AM
[Originally posted by exiftool on 2007-10-31 12:28:01-07]

The only thing I know that may cause ExifTool to crash is if it runs out
of memory.  I just tried editing a 862,795,516 byte TIFF file here, and exiftool required
about 510MB of ram.  How much ram it requires depends somewhat on the structure
of the TIFF since any data in sub IFD's is currently buffered in memory (my file had about
250MB of data in the SubIFD's).

This is a true crash, not a hang?  Was there an error message?  If possible, could
you send me the output from the -htmldump option for this file?  (email
to philharvey66 at gmail.com or post on a web server somewhere).  Thanks.

If there is a ton of data in subIFD's then this could be the problem.  If so, perhaps
I need to change things so this isn't buffered in memory.

- Phil
Title: Re: ExifTool crashing with large TIF Files
Post by: Archive on May 12, 2010, 08:54:11 AM
[Originally posted by ferdinandparis on 2007-11-01 07:21:32-07]

Yes, this was a genuine Kerr-rash!  It was the usual Windows dialogue saying "exiftool.exe has encountered a problem and needs to close.  We are sorry for the inconvenience."  Prior to crashing there is usually (but not always) a lot of disk churning, and ExifTool seems to be taking a long time.  (This is on a fairly fast Core 2 Quad Q6600 system.  It only has 2Gb RAM, but the image is on a RAID 10 drive with 400Gb of spare space, and the OS is on a separate drive also with lots of spare space and a 4Gb swap file.  I tried this after a fresh reboot with nothing additional running.)

Error Signature:  "AppName: exiftool.exe    AppVer: 0.0.0.0    ModName: perl58.dll
ModVer: 5.8.7.813    Offset: 00089929"

This report was from my attempt to do the -htmlDump.  This particular crash was quick and quiet.

I could send you the file cropped to just a small size.  Although this file won't show you the problem, as ExifTool can cope with it, it will enable you to look at the file structure.  

Regards

Ferdinand
Title: Re: ExifTool crashing with large TIF Files
Post by: Archive on May 12, 2010, 08:54:11 AM
[Originally posted by exiftool on 2007-11-01 11:01:07-07]

That is a hard crash.  A crash like that indicates a bug in the
version of ActivePerl bundled with exiftool.  And it crashes
when just reading the image.  wow.  I couldn't imagine what
would cause that.

Would it be possible for you to put the image on an ftp
or http server so I could download it?  If not, please email
the cropped image and I'll see if I can guess at the problem.

Thanks.

- Phil
Title: Re: ExifTool crashing with large TIF Files
Post by: Archive on May 12, 2010, 08:54:11 AM
[Originally posted by exiftool on 2007-11-03 16:55:03-07]

I have managed to get exiftool to abort when running on a Mac
with a similar large, layered TIFF image. I suspect the crash on
windows is due to a memory-handling bug in that version of
Perl, but I should be able to bypass the problem if I can decrease
the amount of memory that exiftool requires to process an
image like this.  I'll post again here when I have more information.

- Phil