ExifTool v8.15 not passing test

Started by 753951, March 29, 2010, 10:28:55 PM

Previous topic - Next topic

753951

For years I periodically download ExifTool tarball and build it myself. Last version I was on was v8.05. Yesterday I downloaded v8.15 and for the first time it failed one test (Geotag). And it didn't just fail, it crashed Perl. Here is copy&paste from Windows Event Log:

Faulting application name: perl.exe, version: 5.10.1.1007, time stamp: 0x4b60ba96
Faulting module name: perl510.dll, version: 5.10.1.1007, time stamp: 0x4b60ba95
Exception code: 0xc0000005
Fault offset: 0x000000000001e600
Faulting process id: 0x10ec
Faulting application start time: 0x01cacfad36325971
Faulting application path: D:\Progra~1\Perl64\bin\perl.exe
Faulting module path: D:\Progra~1\Perl64\bin\perl510.dll
Report Id: 7535aa79-3ba0-11df-af80-02004e435049


All other tests, before and after Geotag, passed. I had v5.10.0 of Perl installed, and I tried with latest v5.10.1.1007 from ActivePerl. Same result.
I'm on Windows 7 x64. Any ideas?

Here is complete output:
Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

       D:\Progra~1\Perl64\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/AFCP.t ........... ok
t/AIFF.t ........... ok
t/APE.t ............ ok
t/ASF.t ............ ok
t/BigTIFF.t ........ ok
t/BMP.t ............ ok
t/Canon.t .......... ok
t/CanonRaw.t ....... ok
t/CanonVRD.t ....... ok
t/Casio.t .......... ok
t/DICOM.t .......... ok
t/DjVu.t ........... ok
t/DNG.t ............ ok
t/EXE.t ............ ok
t/ExifTool.t ....... ok
t/FLAC.t ........... ok
t/Flash.t .......... ok
t/FlashPix.t ....... ok
t/Font.t ........... ok
t/FotoStation.t .... ok
t/FujiFilm.t ....... ok
t/Geotag.t ......... Dubious, test returned 5 (wstat 1280, 0x500)
Failed 2/7 subtests
t/GeoTiff.t ........ ok
t/GIF.t ............ ok
t/GPS.t ............ ok
t/HTML.t ........... ok
t/InDesign.t ....... ok
t/IPTC-XMP.t ....... ok
t/ITC.t ............ ok
t/Jpeg2000.t ....... ok
t/JVC.t ............ ok
t/Kodak.t .......... ok
t/KyoceraRaw.t ..... ok
t/Lang.t ........... ok
t/LNK.t ............ ok
t/M2TS.t ........... ok
t/MIE.t ............ ok
t/MIFF.t ........... ok
t/Minolta.t ........ ok
t/MP3.t ............ ok
t/MWG.t ............ ok
t/Nikon.t .......... ok
t/Olympus.t ........ ok
t/Panasonic.t ...... ok
t/PDF.t ............ ok
t/Pentax.t ......... ok
t/PhotoMechanic.t .. ok
t/Photoshop.t ...... ok
t/PICT.t ........... ok
t/PNG.t ............ ok
t/PostScript.t ..... ok
t/PPM.t ............ ok
t/PSP.t ............ ok
t/QuickTime.t ...... ok
t/Real.t ........... ok
t/Ricoh.t .......... ok
t/RIFF.t ........... ok
t/Sanyo.t .......... ok
t/Sigma.t .......... ok
t/Sony.t ........... ok
t/Unknown.t ........ ok
t/Vorbis.t ......... ok
t/Writer.t ......... ok
t/ZIP.t ............ ok

Test Summary Report
-------------------
t/Geotag.t       (Wstat: 1280 Tests: 5 Failed: 0)
 Non-zero exit status: 5
 Parse errors: Bad plan.  You planned 7 tests but ran 5.
Files=64, Tests=349, 23 wallclock secs ( 0.22 usr +  0.08 sys =  0.30 CPU)
Result: FAIL
Failed 1/64 test programs. 0/349 subtests failed.
NMAKE : fatal error U1077: 'D:\Progra~1\Perl64\bin\perl.exe' : return code '0xff'
Stop.


After poking around I found out that it crashes in test 6 (line 89)
$exifTool->SetNewValue(Geosync => '1:30');

If I comment out that line test, understandably, fails, but Perl does not crash.

And since I enjoy so much talking to myself :D fix is to use MM:SS format instead of M:SS
$exifTool->SetNewValue(Geosync => '01:30');

Phil Harvey

THANK YOU VERY MUCH FOR FIGURING THIS OUT!!!!

I have seen this problem in a few of the test reports, but had no way to figure out what was causing the problem.

With your detailed analysis I can guess at the source of the problem:  The Geosync value may be a file name or a time difference, so I use "-f $val" to see if the file exists to see if it is a file name.  My guess is that the form "-f '1:30'" will crash on your system (possibly because it looks like a drive:file specification, but the drive is invalid -- this could only ever be a problem on Windows).  If so, this is a Perl bug which should be reported.

It would be great if you could check my hypothesis -- try commenting out the following line (736) of lib/Image/ExifTool/Geotag.pm to see if this fixes the problem:

        $syncFile = $val if -f $val;

Thanks!

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

753951

#2
Yup. Commenting out that line made all tests in original Geotag.t pass. I suppose you have way more leverage with Perl dev group so please report it to them.

Phil Harvey

This appears to be a bug specific to ActivePerl, so I will submit it to them.  They want a simple script to illustrate the problem, so could you please check to see if the following script crashes?:

#!/usr/bin/perl -w
if (-f '1:30') {
    print "Yes\n";
} else {
    print "No\n";
}
1; # end


Thanks.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

753951

It prints NO and it does not crash.

753951

Well, after little more digging around I found reproducible example. And your one can be used. Problem is in system path. If system path is 1218 characters long or less, example works. If it is 1219 characters or more it crashes.

To reproduce it type this (obviously, adjust path to Perl and remove/add x to end up with 1218 characters - easiest to do in text editor that shows number of characters in file) on your Windows command line:
set Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\Progra~1\Perl64\site\bin;D:\Progra~1\Perl64\bin;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;xxxxxxxxxxxxxxxxxxxxxx;xxxxxxxxxxxxxxxxxxxxxxxxxx;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;x

Then run your example. It should print No and end. If I add one more x to the above, it crashes.

Phil Harvey

I'm very impressed in your diagnostic ability.  This explains why the test crashed on some systems but not others running the exact same Perl version.

I'll submit this bug report.  Thanks.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

753951

Actually, I forgot to thank you for wonderful, one of a kind, tool. I can only imagine how much hard work has gone into it.

Phil Harvey

Thanks.

FYI: The ActivePerl bug report is here

It's been almost 3 weeks now and no response to this bug report yet.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).