ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: rbpeirce on January 27, 2012, 03:06:50 PM

Title: Use of uninitialized value in lc
Post by: rbpeirce on January 27, 2012, 03:06:50 PM
I am running exiftool 8.77 on Mac OS 10.7.2.  The same problem occurred in 8.66.  I don't recall the release I was running before this upgrade but I don't recall seeing this message until now:

Use of uninitialized value in lc at /usr/bin/lib/Image/ExifTool/TagLookup.pm line 6880, <EXIFTOOL_FILE> chunk 3.

I don't know what this means.  It seems to happen on every use of exiftool.  Here is a recent one:


exiftool -nikon DSCN2034.jpg
Use of uninitialized value in lc at /usr/bin/lib/Image/ExifTool/TagLookup.pm line 6880, <EXIFTOOL_FILE> chunk 3.
Camera Model Name               : E4300
Focal Length                    : 8.0 mm
Image Size                      : 1704x2272
Shutter Speed                   : 1/46
Aperture                        : 2.8
ISO                             : 100
ISO                             : 0
Noise Reduction                 : Off
Exposure Program                : Program AE
Exposure Compensation           : 0
White Balance                   : Auto
White Balance                   : Auto
Quality                         : Fine
Metering Mode                   : Multi-segment
Focus Mode                      : AF-C
Color Space                     : sRGB
Saturation                      : 0
Saturation                      : Normal
Sharpness                       : Auto
Sharpness                       : Normal
Flash                           : Auto, Did not fire
Title: Re: Use of uninitialized value in lc
Post by: Phil Harvey on January 27, 2012, 03:28:58 PM
Thanks for this report.  This one is new to me.

Do you have any user-defined tags?  If so, try running without the config file (-config "") to see if the problem still occurs.  If it does, could you please email me DSCN2034.jpg so I can attempt to reproduce the problem?  My email is philharvey66 at gmail.com.  Thanks.  I do have a sample image from a Coolpix 4300, but it doesn't give me this error.

If I can't reproduce the error the likely cause would be a bad installation or different versions of the exiftool application and its libraries.  Try "exiftool -ver" to see the version.  This will warn you if the libraries are a different version.

- Phil
Title: Re: Use of uninitialized value in lc
Post by: rbpeirce on January 27, 2012, 07:20:37 PM
Adding -config "" removed the problem.  I tried it on some other jogs which were also producing this error and it went away.  I don't have any idea why.

exiftool -ver says 8.77.  There was no warning about libraries.
Title: Re: Use of uninitialized value in lc
Post by: Phil Harvey on January 27, 2012, 07:43:54 PM
OK, great.  In your home directory or the exiftool application directory there is a hidden file called ".ExifTool_config" that you should erase or fix because it seems this is causing the problem.

use "ls -la ~" in the terminal to list hidden files in your home directory, then "rm ~/.ExifTool_config" to remove it.   If it isn't there, type "whereis exiftool" to determine the exiftool application directory, then try there instead.

- Phil
Title: Re: Use of uninitialized value in lc
Post by: rbpeirce on January 28, 2012, 08:31:48 AM
Got it.  It was in my home directory.  I have viewable hidden files so it was easy to find.  After removal the error went away.  However, the file was not re-created when I ran exiftool.  How did it get there in the first place?
Title: Re: Use of uninitialized value in lc
Post by: Phil Harvey on January 28, 2012, 09:15:38 AM
Someone (ie. you) must have put the it there.  A sample user-defined file named "ExifTool_config" is included in the full ExifTool distribution, but to activate it you must manually rename it to ".ExifTool_config" and move it to your home directory.

It is possible that older versions of the sample config file are incompatible with the current ExifTool, which could have caused this problem if you had done this.

- Phil

Edit:  See this thread (https://exiftool.org/forum/index.php/topic,3877.0.html) for a related discussion